华为交换机基本切换的命令行

合集下载

华为路由器交换机的基本命令

华为路由器交换机的基本命令

华为QuidWay交换机配置命令手册:1、开始建立本地配置环境,将主机的串口通过配置电缆与以太网交换机的Console 口连接。

在主机上运行终端仿真程序(如Windows的超级终端等),设置终端通信参数为:波特率为9600bit/s、8位数据位、1位停止位、无校验和无流控,并选择终端类型为VT100。

以太网交换机上电,终端上显示以太网交换机自检信息,自检结束后提示用户键入回车,之后将出现命令行提示符(如<Quidway>)。

键入命令,配置以太网交换机或查看以太网交换机运行状态。

需要帮助可以随时键入"?"2、命令视图(1)用户视图(查看交换机的简单运行状态和统计信息)<Quidway>:与交换机建立连接即进入(2)系统视图(配置系统参数)[Quidway]:在用户视图下键入system-view(3)以太网端口视图(配置以太网端口参数)[Quidway-Ethernet0/1]:在系统视图下键入interface ethernet 0/1(4)VLAN视图(配置VLAN参数)[Quidway-Vlan1]:在系统视图下键入vlan 1(5)VLAN接口视图(配置VLAN和VLAN汇聚对应的IP接口参数)[Quidway-Vlan-interface1]:在系统视图下键入interface vlan-interface 1(6)本地用户视图(配置本地用户参数)[Quidway-luser-user1]:在系统视图下键入local-useruser1(7)用户界面视图(配置用户界面参数)[Quidway-ui0]:在系统视图下键入user-interface3、其他命令设置系统时间和时区<Quidway>clock time Beijing?add 8<Quidway>clock datetime 12:00:00 2005/01/23设置交换机的名称[Quidway]sysname TRAIN-3026-1[TRAIN-3026-1]配置用户登录[Quidway]user-interface vty 0 4[Quidway-ui-vty0]authentication-mode scheme创建本地用户[Quidway]local-user huawei[Quidway-luser-huawei]password simple huawei[Quidway-luser-huawei] service-type telnet level 34、VLAN配置方法『配置环境参数』SwitchA端口E0/1属于VLAN2,E0/2属于VLAN3『组网需求』把交换机端口E0/1加入到VLAN2 ,E0/2加入到VLAN3数据配置步骤『VLAN配置流程』(1)缺省情况下所有端口都属于VLAN 1,并且端口是access端口,一个access端口只能属于一个vlan;(2)如果端口是access端口,则把端口加入到另外一个vlan的同时,系统自动把该端口从原来的vlan中删除掉;(3)除了VLAN1,如果VLAN XX不存在,在系统视图下键入VLAN XX,则创建VLAN XX并进入VLAN视图;如果VLAN XX已经存在,则进入VLAN视图。

华为交换机常见视图命令进入及退出方法

华为交换机常见视图命令进入及退出方法

华为交换机常见视图命令进入及退出方法华为交换机VRP系统常见命令试图及进入退出方法视图功能提示符示例进入命令示例退出命令用户视图查看交换机的简单运行状态和统计信息<HUAWEI>与交换机建立连接即进入quit ,断开与交换机的连接系统视图配置系统参数[HUAWEI]在用户视图下键入system-view quit或return ,或Ctrl+Z组合键返回用户视图以太网端口视图配置以太网端口参数[HUAWEI-GigabitEthernet0/0/1]千兆以太网端口视图在系统视图下键入interfacegigabitethernet0/0/1quit返回系统试图,return ,或Ctrl+Z组合键返回用户视图NULL接口视图配置NULL接口视图参数[HUAWEI-NULL0]在系统视图下键入interfacenull 0Tunnel接口视图配置隧道接口视图参数[HUAWEI-Tunnel0]在系统视图下键入interfacetunnel 0LookBack接口视图配置LookBack接口参数[HUAWEI-LookBack0]在系统视图下键入interfacelookback 0Eth-Trunk接口视图配置Eth-Trunk接口视图参数[HUAWEI-Eth-Trunk1]在系统视图下键入interfaceeth-trunk1VLAN视图配置VLAN参数[HUAWEI-Eth-vlan1]在系统视图下键入vlan 1VLAN接口视图配置配置VLAN接口参数[HUAWEI-Eth-vlanif1]在系统视图下键入interfacevlanif 1本地用户视图配置本地用户参数[HUAWEI-luser-user1]在aaa视图下键入local-useruser1备注:aaa视图见aaa配置手册VTY用户界面视图配置单个或多个VTY用户界面参数[HUAWEI-ui-vty1]或[HUAWEI-ui-vty1-3]在系统视图下键入user-interface vty1或user-interface vty1 3Console用户界面配置Console用户界面参数[HUAWEI-ui-console0]在系统视图下键入user-interface console 0FTP Client视图配置FTP Client参数[ftp]在用户视图下键入ftp 10.0.0.1SFTP Client 视图配置SFTPClient参数Sftp-client>在系统视图下键入sftp 10.0.0.1基本ACL视图定义基本ACL的子规则(取值范围为[HUAWEI-acl-basic-2000]在系统视图下键入acl number20002000-2999)高级ACL视图定义高级ACL的子规则(取值范围为3000-3999)[HUAWEI-acl-adv-3000]在系统视图下键入acl number3000二层ACL视图定义二层ACL的子规则(取值范围为4000-4999)[HUAWEI-acl-l2-4000]在系统视图下键入acl number4000用户自定义ACL视图定义用户自定义ACL的子规则(取值范围为5000-5999)[HUAWEI-acl-user-5000]在系统视图下键入acl number5000。

华为路由器交换机常用命令

华为路由器交换机常用命令

华为路由器交换机常用命令一、设备管理命令1.登录管理命令- ssh [ip地质] -p [端口号]:通过SSH协议登录设备。

- telnet [ip地质]:通过Telnet协议登录设备。

- logout:退出设备。

2.用户管理命令- display current-configuration:显示当前设备配置信息。

- save:保存当前配置。

- undo save:取消保存的配置。

- super:切换到超级用户模式。

- user-interface console 0:配置控制台终端的参数。

- user-interface vty 0 4:配置远程登录终端的参数。

3.设备操作命令- reboot:重启设备。

- reset saved-configuration:恢复出厂配置。

- display version:显示设备的硬件和软件版本信息。

- display device:显示设备的基本信息。

- display interface[接口名称]:显示指定接口信息。

- display ip routing-table:显示IP路由表信息。

二、网络配置命令1.IP配置命令- interface [接口名称]:进入指定接口。

- ip address [IP地质] [子网掩码]:配置接口IP地质。

- undo ip address:取消接口IP地质配置。

- ip route-static [目标网络] [子网掩码] [下一跳地质]:配置静态路由。

- undo ip route-static [目标网络] [子网掩码] [下一跳地质]:取消静态路由配置。

2.VLAN配置命令- vlan [VLAN ID]:创建指定VLAN。

- quit:退出VLAN配置模式。

- interface vlan [VLAN ID]:进入指定VLAN接口。

- ip address [IP地质] [子网掩码]:为VLAN接口配置IP地质。

华为交换机设备基础命令大全,拿走不谢!

华为交换机设备基础命令大全,拿走不谢!

华为交换机设备基础命令大全,拿走不谢!终将渡过成长的海01正文01交换机的基础命令汇总system-view 进入系统视图quit 退到系统视图sysname 交换机命名vlan 20 创建vlan(进入vlan20)display vlan 显示vlanundo vlan 20 删除vlan20display vlan 20 显示vlan里的端口20Interface e1/0/24 进入端口24portlink-type access vlan 20 把当前端口放入vlan20 undo porte1/0/10 删除当前VLAN端口10display current-configuration 显示当前配置02配置交换机支持TE L N E Tinterfacevlan 1 进入VLAN1ip address192.168.3.100 255.255.255.0 配置IP地址user-interfacevty 0 4 进入虚拟终端authentication-modepassword (aut password) 设置口令模式setauthentication password simple 222 (set aut pass sim 222) 设置口令userprivilege level 3(use priv lev 3) 配置用户级别dispcurrent-configuration (disp cur) 查看当前配置display ipinterface 查看交换机VLANIP配置resetsaved-configuration(reset saved) 删除配置(必须退到用户模式)reboot重启交换机03跨交换机V L AN的通讯在sw1上:vlan 10建立VLAN 10interfacee1/0/5 进入端口5Portdefault vlan 10 把端口5加入vlan10vlan 20建立VLAN 20interfacee1/0/15 进入端口15portdefault vlan 20 把端口15加入VLAN20interfacee1/0/24 进入端口24portlink-type trunk 把24端口设为TRUNK端口port trunkpermit vlan all 所有端口都能经过此路径在SW2上:vlan 10建立VLAN 10interfacee1/0/20 进入端口20portdefault vlan 10 把端口20放入VLAN10interfacee1/0/24 进入端口24portlink-type trunk 把24端口设为TRUNK端口port trunkpermit vlan all (port trunk permit vlan 10 只能为vlan10使用)24端口为所有VLAN使用displayinterface e1/0/24 查看端口24是否为TRUNKundo porttrunk permit vlan all 删除该句04路由器的基础命令汇总dispaly version 显示系统软件版本及硬件信息system-view 切换到系统视图quit 返回interface +接口进入接口视图ip address +IP +mask 配置IP和子网掩码return 返回用户视图<Ctrl+Z> 返回用户视图sysname R1 修改路由器名称为R1display current-configuration 查看路由器当前配置dispaly interface +接口查看路由器接口的状态信息save 保存当前配置display ip interface brief 查看接口与IP相关摘要信息display ip routing-table 查看路由表05t e l ne t远程登陆配置user-interface vty 0 4 进入0~4前五个的VTY用户界面进行整体配置authentication-mode password 设置验证方式为密码user privilege level 3 设置用户登陆级别aaa 进入aaa视图local-user admin password cipher hello privilege level 3在aaa视图下设置账号密码和用户级别local-user admin service-type telnet 配置该用户接入类型为aaaq 退回到用户视图user-interface vty 0 4 进入到VTY用户视图authentication-mode aaa 设置验证方式aaa06配置S te l ne t配置SSHserver:rsalocal-key-pair create 生成本地RSA主机密钥对display rsa local-key-pair public 查看本地密钥对中的公钥信息user-interface vty 0 4 进入VTY用户视图authentication-mode aaa 设置用户验证方式为aaa授权验证方式protocol inbound ssh 指定VTY用户只支持sshq 返回到系统视图aaa 进入aaa视图local-user huawei1 password cipher huawei1 创建用户和设置用户密码local-user huawei1 service-type ssh 配置本地用户接入类型为sshq 退回到用户视图ssh user huawei1 authentication-type password新建ssh用户指定ssh用户认证方式为passwordaaa 进入aaa视图local-user huawei1 privilege level 3 设置huawei1用户级别为3级别范围0~15stelnet server enable 开启ssh功能display ssh user-information huawei1 查看ssh用户配置信息不指定用户默认查看所有用户display ssh server status 查看ssh服务器全局配置信息07S TP配置和选路规则stp enable 在交换机上启用STPstp mode stpdis stp 查看stp配置dis stp brief 查看接口摘要信息stp priority 4096 修改交换机优先级为4096stp root primary 设置交换机为主根交换机stp root secondary 命令配置备份交换机display stp interface Ethernet 0/0/2 查看e0/0/2接口的开销值int e0/0/2stp cost 2000 配置接口e0/0/2的带价值为2000stp timer forward-delay 3000 修改STP的ForwardDelay时间为3000cs也就是30sstp bridge-diameter 3 命令设置网络的直径为3stp mode rstp 启用RSTP使用RSTP可以缩短收敛时间int e0/0/1stp edged-port enable 配置接口e0/0/1为边缘端口不参与生成树的计算08配置MS TP多实例stp region-configuration 进入MST域视图region-name huawei 配置MST域名为huaweirevision-level 1 配置MSTP的修订级别为1instance 1 vlan 10 指定VLAN10映射到MSTI1active region-configuration 激活MST域配置display stp region-configuration 查看交换机上当前生效的MST域配置信息dis stp instance 0 brief 查看实例0中的生成树状态和统计的摘要信息stp instance 2 priority 0 配置交换机成位实例2中的根交换机09R I P路由协议配置rip 创建开启协议进程network + ip 对指定网段接口使能RIP功能IP地址是与路由器直连的网段debugging rip 1 查看RIP定期更新情况terminal debuggingterminal monitor 在屏幕上显示debug信息undo debugging rip 1undo debug all 命令关闭debug调试功能在上面的配置基础上配置RIP2rip 进入子视图模式version 2 配置版本或者直接配置rip 1version 2network + ip10O S P F单区域配置ospf 1 进入ospf视图1代表进程号area 0 创建区域并进入OSPF区域视图,输入要创建的区域ID,骨干区域即区域0network +IP +匹配码display ospf interface 命令查看OSPF接口通告是否正确、display ospf peer 查看OSPF邻居状态display ip routing-table protocol ospf 查看OSPF路由表11配置O S P F区域明文认证ospf 1area 1authentication-mode simple plain huawei plain是口令以明文方式显示authentication-mode md5 1 huawei 配置区域密文认证12配置链路认证int g0/0/1ospf authentication-mode md5 1 huawei 在一条链路中的两个接口配置要相同13配置抑制接口ospf 1silent-interface GigabitEthernet 0/0/1 禁止接口g0/0/1接收和发送ospf报文14技巧对多个接口配置接口抑制ospf 1silent-interface all 抑制所有接口undisplay ip routing-table 10.0.1.1 查看10.0.1.1所在网段的路由条目15基于接口修改int g0/0/0ospf network-type p2mp 修改ospf的网络类型为多到多点ospf network-type broadcast 修改ospf的网络类型为广播ospf dr-priority 100 修改g0/0/0接口的DR优先级为100reset ospf process 重启ospf进程ospf cost 1000 修改ospf的开销值为1000ospf timer hello 20 修改HELLO计时器为20sospf timer dead 80 修改dead计时器为80sospf 1preference 110 修改ospf优先级为110值越大优先级越低16路由引入ospf 1import-route rip 1 在ospf进程中引入ripdefault-route-advertise always 在ospf进程中引入默认路由ripimport-route ospf 1 在rip进程中引入ospfimport-route ospf cost 3 ospf 引入rip时配置开销值default-route originate 在RIP进程中发布默认路由17v r r p(虚拟路由器冗余协议)基本配置int g0/0/0vrrp vrid 1 virtual-ip 172.16.1.254创建VRRP备份组,备份组号为1,配置虚拟IP为172.16.1.254vrrp vrid 1 priority 120 修改优先级为120display vrrp 查看vrrp信息display vrrp briefdisplay vrrp interface g0/0/0 查看VRRP的工作状态18配置V R RP多备份组int g0/0/0vrrp vrid 1 virtual-ip 172.16.1.254创建VRRP备份组,备份组号为1,配置虚拟IP为172.16.1.254vrrp vrid 1 priority 120 修改优先级为120vrrp vrid 2 virtual-ip 172.16.1.253创建VRRP备份组,备份组号为2,配置虚拟IP为172.16.1.253int g0/0/0vrrp vrid 1 virtual-ip 172.16.1.254创建VRRP备份组,备份组号为1,配置虚拟IP为172.16.1.254vrrp vrid 2 virtual-ip 172.16.1.253创建VRRP备份组,备份组号为2,配置虚拟IP为172.16.1.253vrrp vrid 2 priority 120 修改优先级为120vrrp vrid 2 preempt-mode disable 开启非抢占方式19配置V R RP的跟踪接口及认证int g0/0/1vrrp vrid 1 track interface GigabitEthernet 0/0/0 reduced 50监视上行接口G0/0/0,当此接口断掉时,裁减优先级50,使优先级为70 vrrp vrid 1 authentication-mode md5 huawei 认证配置20配置基本的访问控制表acl 2000 创建一个编号型ACL,基本ACL的范围是2000~29999rule 5 permit source 1.1.1.1 0指定规则ID为5,允许数据源地址为1.1.1.1的报文通过,反掩码全为0,即精确匹配rule 10 deny source any 指定ID为10,拒绝任意源地址的数据包通过display acl all 查看设备上所有的访问控制列表。

(完整版)华为交换机命令大全

(完整版)华为交换机命令大全

华为交换机基本配置命令详解1、配置文件相关命令[Quidway]display current-configuration 显示当前生效的配置[Quidway]display saved-configuration显示flash中配置文件,即下次上电启动时所用的配置文件reset saved-configuration 檫除旧的配置文件reboot 交换机重启display version 显示系统版本信息2、基本配置[Quidway]super password 修改特权用户密码[Quidway]sysname 交换机命名[Quidway]interface ethernet 1/0/1 进入接口视图[Quidway]interface vlan 1进入接口视图[Quidway-Vlan-interfacex]ip address 10.1.1.11 255.255.0.0配置VLAN的IP地址[Quidway]ip route-static 0.0.0.0 0.0.0.0 10.1.1.1静态路由=网关3、telnet配置[Quidway]user-interface vty 0 4 进入虚拟终端[S3026-ui-vty0-4]authentication-mode password 设置口令模式[S3026-ui-vty0-4]set authentication-mode password simple xmws123设置口令[S3026-ui-vty0-4]user privilege level 3 用户级别4、端口配置[Quidway-Ethernet1/0/1]duplex {half|full|auto} 配置端口工作状态[Quidway-Ethernet1/0/1]speed {10|100|auto} 配置端口工作速率[Quidway-Ethernet1/0/1]flow-control 配置端口流控[Quidway-Ethernet1/0/1]mdi {across|auto|normal} 配置端口平接扭接[Quidway-Ethernet1/0/1]port link-type {trunk|access|hybrid} 设置端口工作模式[Quidway-Ethernet1/0/1]undo shutdown 激活端口[Quidway-Ethernet1/0/2]quit 退出系统视图5、链路聚合配置[DeviceA] link-aggregation group 1 mode manual 创建手工聚合组1[Qw_A] interface ethernet 1/0/1 将以太网端口Ethernet1/0/1加入聚合组1 [Qw_A-Ethernet1/0/1] port link-aggregation group 1[Qw_A-Ethernet1/0/1] interface ethernet 1/0/2 将以太网端口Ethernet1/0/1加入聚合组1[Qw_A-Ethernet1/0/2] port link-aggregation group 1[Qw_A] link-aggregation group 1 service-type tunnel # 在手工聚合组的基础上创建t unnel业务环回组。

华为交换机命令.docx

华为交换机命令.docx

华为交换机命令返回上一级命令:quit 配置保存命令:save 华为交换机命令<>sys 进入配置模式[Quidway]dis cur[Quidway]display current-configuration[Quidway]display interfaces[Quidway]display vlan all[Quidway]display version [Quidway]super password[Quidway]sysname[Quidway]interface ethernet 0/1 [Quidway]interface vlan x [Quidway-Vlan-interfacex]ip address 10.65.1.1 255.255.0.0 址[Quidway]ip route-static 0.0.0.0 0.0.0.0 10.65.1.2 [Quidway]rip [Quidway]local-user ftp [Quidway]user-interface vty 0 4 [S3026-ui-vty0-4]authentication-mode password [S3026-ui-vty0-4]set authentication-mode password simple 222 [S3026-ui-vty0-4]user privilege level 3[Quidway]interface ethernet 0/1[Quidway]int e0/1[Quidway-Ethernet0/1]duplex {half|full|auto} [Quidway-Ethernet0/1]speed {10|100|auto} [Quidway-Ethernet0/1]flow-control [Quidway-Ethernet0/1]mdi {across|auto|normal} [Quidway-Ethernet0/1]port link-type {trunk|access|hybrid} [Quidway-Ethernet0/1]port access vlan 3[Quidway-Ethernet0/2]port trunk permit vlan {ID|All} [Quidway-Ethernet0/3]port trunk pvid vlan 3 [Quidway-Ethernet0/1]undo shutdown[Quidway-Ethernet0/1]shutdown [Quidway-Ethernet0/1]quit [Quidway]vlan 3[Quidway-vlan3]port ethernet 0/1 [Quidway-vlan3]port e0/1 [Quidway-vlan3]port ethernet 0/1 to ethernet 0/4 [Quidway-vlan3]port e0/1 to e0/4[Quidway]monitor-port <interface_type interface_num> [Quidway]port mirror <interface_type interface_num> [Quidway]port mirror int_list observing-port int_type int_num;显示当前配置;显示当前配置;显示接口信息;显示路由信息;显示版本信息;修改特权用户密码;交换机命名;进入接口视图;进入接口视图;配置VLAN的IP地;静态路由=网关;三层交换支持;进入虚拟终端;设置口令模式;设置口令;用户级别;进入端口模式;进入端口模式;配置端口工作状态;配置端口工作速率;配置端口流控;配置端口平接扭接;设置端口工作模式;当前端口加入到VLAN ;设trunk 允许的VLAN ;设置trunk端口的PVID ;激活端口;关闭端口;返回;创建VLAN;在VLAN中增加端口;简写方式;在VLAN中增加端口;简写方式 ;指定镜像端口 ;指定被镜像端口;指定镜像和被镜像[Quidway]description string[Quidway]description[Quidway]display vlan [vlan_id][Quidway]stp {enable|disable}闭[Quidway]stp priority 4096级[Quidway]stp root {primary|secondary}份[Quidway-Ethernet0/1]stp cost 200 花费[Quidway]link-aggregation e0/1 to e0/4 ingress|both ; [Quidway]undo link-aggregation e0/1|all ;[SwitchA-vlanx]isolate-user-vlan enable [SwitchA]isolate-user-vlan <x> secondary <list> 子vlan[Quidway-Ethernet0/2]port hybrid pvid vlan <id> [Quidway-Ethernet0/2]port hybrid pvid[Quidway-Ethernet0/2]port hybrid vlan vlan_id_list untagged如果包的vlan id 与PVId 一致,则去掉vlan 信息. 默认PVID=1。

H3C华为交换机配置基本命令

H3C华为交换机配置基本命令

H3C交换机路由器常用命令local-useradmin (建立TELNET用户)passwordsimpleadminauthorization-attributelevel3service-typetelnetstpenable (开启生成树功能)interfaceVlan-interface1ipaddressportaccessvlan20 (在端口模式下将接口增加到相关V LAN)(为只定VLAN配置IP地址)(接口的TRUNK配置)portlink-typetrunkporttrunkpermitvlanalluser-interfacevty04authentication-modescheme (开启TELNET服务的虚假端口)user-interfacevty515description第一配置交换机的管理IP地址[H3C]interfaceVlan-interface1[H3C-vlan-interface1]ipaddress只用密码的用户认证[H3C]user-interfacevty04[H3C-ui-vty0-4]authentication-modepassword[H3C-ui-vty0-4]setauthenticationpasswordsimple123456远程用户缺省的级别都是0级,Telnet 用户登录后的用户级别[H3C-ui-vty0-4]userprivilegelevel3当地用户名和口令的认证[H3C]user-interfacevty04[H3C-ui-vty0-4]authentication-modescheme[H3C]local-userH3C[H3C-ui-vty0-4]passwordsimplehuawei[H3C-ui-vty0-4]service-typetelnetlevel31.调整超级终端的显示字号;2.捕获超级终端操作命令行,以备今后查对;3.复制命令到超级终端命令行,粘贴到主机;4.路由器.交换机配置时不能够掉电,连通测试前必然要检查网络的连通性,不要犯最先级的错误。

华为交换机常见命令

华为交换机常见命令

一、清空配置:<HUAWEI> reset saved-configuration(清楚下次启动时使用的配置文件信息)然后重启设备,重启设备室提示保存信息,选择“NO”。

<HUAWEI> reset saved-configurationWarning: The action will delete thesaved configuration in the device.The configuration will be erased to reconfigure. Continue? [Y/N]:yWarning: Now clearing the configuration inthe device.Info: Succeeded in clearing the configuration in the device.<HUAWEI> rebootInfo: The system is now comparing the configuration, pleasewait.Warning: The configuration has been modified, and it will be saved tothe next startup saved-configuration file flash:/vrpcfg.zip. Continue?[Y/N]:n //此处请选择“N”Info: If want to reboot with saving diagnosticinformation, input 'N' and then execute 'reboot save diagnostic-information'.System will reboot! Continue?[Y/N]:y二、通过STelnet/Telnet登录交换机设置新的Console口登录密码# 以登录用户界面的认证方式为密码认证,密码为Huawei@123为例,配置如下。

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

一、华为交换机基本切换的命令行
1、用户视图
2、系统视图
system-view进系统视图命令
[HUAWEI]进系统试图状态
3、接口视图
[HUAWEI]interface GigabitEthernet 0/0/1进接口视图命令进第一接口
[Huawei-GigabitEthernet0/0/1]进接口视图状态
4、退出命令视图
[HUAWEI]quit
5、配置主机名
[huawei]sysname
6、显示系统IOS名称以及版本信息
[huawei]dis version
7、查看交换机当前配置信息
[huawei]display current-configuration
8、显示已保存的配置信息
[huawei]display saved-configuration
9、保存当前配置信息
save
10、删除已保存的配置信息
#reset saved-configuration
11、进入接口视图
[huawei]interface g0/0/1
[huawei-GigabitEthernet]
12、配置接口类型
[huawei-GigabitEthernet]port link-type access [huawei-GigabitEthernet]port default vlan 2
13、shutdown命令用来关闭当前接口。

14、undo shutdown命令用来开启当前接口。

15、display interface命令用来查看接口当前运行状态和接口统计信息
16、display interface brief命令用来查看接口状态和配置的简要信息。

17、display ip interface brief命令用来查看接口与IP相关的简要信息,包括IP地址、子网掩码、物理链路和协议的Up/Down状态以及处于不同状态的接口数目。

二、划分vlan
vlan 2
quit
intervlan 2
ip add 192.168.1.254 24 quit
vlan 3
quit
intervlan 3
ip add 192.168.2.254 24 quit
inter g0/0/1
port link-type access port default vlan 2 quit
inter g0/0/2
port link-type trunk port trunk all vlan 2 to 3 quit。

相关文档
最新文档