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

2010-02-27
一、基础配置
1.1配置文件处理
导入配置文件
tftp x.x.x.x get vrpcfg.zip vrpcfg.zip
导出配置文件
tftp x.x.x.x put vrpcfg.zip vrpcfg.zip
1.2配置交换机远程管理
aaa 方式
system-view
qos lr cir 625 cbs 625000//端口限速
quit
端口隔离举例
2.2
system-view
interface eth-trunk 1
interface gigabitgibabitethernet0/0/1
eth-trunk 1
interface gigabitgibabitethernet0/0/2
Radius-server template radiusserver
Radius-server authentication 10.1.1.254 1812
Radius-server according 10.1.1.254 1813
Radius-server shared-key huawei
Undo radius-server user-name domain-included
aaa
local-user huawei password simple huawei
local-user huawei service-type telnet
local-user huawei priority level 3
quit
user-interface vty 0 4
authentication-mode aaa
华为交换机配置命令大全

华为交换机配置命令大全华为交换机是一种高性能、高可靠的数据通信设备,广泛应用于各种网络环境中。
为了更好地使用华为交换机,我们需要了解一些基本的配置命令。
本文将为大家详细介绍华为交换机的配置命令大全,帮助大家更好地了解和使用华为交换机。
1. 登录华为交换机。
首先,我们需要登录华为交换机进行配置。
一般来说,我们可以通过串口、Telnet或SSH方式登录交换机。
以SSH方式登录为例,我们可以使用以下命令:```shell。
ssh -l username 192.168.1.1。
```。
其中,username为登录用户名,192.168.1.1为交换机的IP地址。
登录成功后,我们需要输入密码进行验证。
2. 查看交换机当前配置。
在登录成功后,我们可以使用以下命令查看交换机的当前配置信息:```shell。
display current-configuration。
```。
这条命令可以显示出交换机当前的全部配置信息,包括接口配置、VLAN配置、路由配置等。
3. 配置交换机接口。
接下来,我们可以对交换机的接口进行配置。
比如,我们可以通过以下命令配置一个VLAN接口:```shell。
interface Vlanif1。
ip address 192.168.1.1 255.255.255.0。
```。
这条命令将为VLAN接口Vlanif1配置IP地址为192.168.1.1,子网掩码为255.255.255.0。
4. 配置交换机VLAN。
除了配置接口,我们还可以对交换机的VLAN进行配置。
比如,我们可以使用以下命令创建一个VLAN:```shell。
vlan 10。
```。
这条命令将创建一个VLAN ID为10的VLAN。
5. 配置交换机路由。
在需要进行路由配置时,我们可以使用以下命令添加静态路由:```shell。
ip route-static 0.0.0.0 0.0.0.0 192.168.1.254。
```。
华为交换机操作命令

1) display access-user 查看在线用户信息
<nanfang_sizhong>display access-user
------------------------------------------------------------------------------
User Set Rx Power Low Threshold(dBM) :-20.00
User Set Tx Power High Threshold(dBM) :8.00
User Set Tx Power Low Threshold(dBM) :-2.00
admin123 A T 15
----------------------------------------------------------------------------
Total 2 user(s)
Manu. Serial Number :A23451110001
Manufacturing Date :2015-11-02
Vendor Name :OEM
-------------------------------------------------------------
[nanfang_sizhong]display user-interface maximum-vty
Maximum of VTY user:15 最大用户数是15个
5)创建管理帐户
[nanfang_sizhong]aaa
[nanfang_sizhong-aaa]local-user yiyucheng password cipher yiyucheng 创建用户yiyucheng,密码yiyucheng
H3C华为交换机配置命令大全

H3C交换机配置命令大全1、system-view进入系统视图模式2、sysname为设备命名3、displaycurrent-configuration当前配置情况4、language-modeChinese|English中英文切换5、interfaceEthernet1/0/1进入以太网端口视图6、portlink-typeAccess|Trunk|Hybrid设置端口访问模式7、undoshutdown打开以太网端口8、shutdown关闭以太网端口9、quit退出当前视图模式10、vlan10创建VLAN10并进入VLAN10的视图模式11、portaccessvlan10在端口模式下将当前端口加入到vlan10中12、portE1/0/2toE1/0/5在VLAN模式下将指定端口加入到当前vlan中13、porttrunkpermitvlanall允许所有的vlan通过H3C路由器1、system-view进入系统视图模式2、sysnameR1为设备命名为R13、displayiprouting-table显示当前路由表4、language-modeChinese|English中英文切换5、interfaceEthernet0/0进入以太网端口视图6、ipaddress配置IP地址和子网掩码7、undoshutdown打开以太网端口8、shutdown关闭以太网端口9、quit退出当前视图模式10、iproute-staticdescriptionTo.R2配置静态路由11、iproute-static0.0.0.0descriptionTo.R2配置默认的路由H3CS3100SwitchH3CS3600SwitchH3CMSR20-20Router1、调整超级终端的显示字号;2、捕获超级终端操作命令行,以备日后查对;3、language-modeChinese|English中英文切换;4、复制命令到超级终端命令行,粘贴到主机;5、交换机清除配置:<H3C>resetsave;<H3C>reboot;6、路由器、交换机配置时不能掉电,连通测试前一定要检查网络的连通性,不要犯最低级的错误。
华为交换机基础命令

华为交换机基础命令⼀.简单命令1.进⼊到管理员配置模式<Huawei>sys2.更改名字[Huawei]sysname test3.查看VLAN[test]dis vlan[test]dis port vlan4.进⼊VLAN[test]int g0/0/15.查看端⼝模式[test-GigabitEthernet0/0/1]port link-type ?access Access portdot1q-tunnel QinQ porthybrid Hybrid porttrunk Trunk port6.划分端⼝[test]vlan 107.将端⼝设置为trunk模式[test-GigabitEthernet0/0/2]port link-type trunk8.允许所有VLAN通过[test-GigabitEthernet0/0/2]port trunk allow-pass vlan all⼆.划分vlan1.进⼊配置模式并修改名称<test>sysEnter system view, return user view with Ctrl+Z.[test]sysname lianxi[lianxi]2.开启端⼝0/0/1端⼝(分别开启1、2、3、4号端⼝)[lianxi]int GigabitEthernet 0/0/1[lianxi-GigabitEthernet0/0/1]port link-type access[lianxi-GigabitEthernet0/0/1]quit[lianxi]3.划分VALM,添加端⼝(同样的⽅法添加vlan 20)[lianxi]vlan 10[lianxi-vlan10]port GigabitEthernet 0/0/1 to 0/0/2[lianxi-vlan10]display vlanThe total number of vlans is : 3--------------------------------------------------------------------------------U: Up; D: Down; TG: Tagged; UT: Untagged;MP: Vlan-mapping; ST: Vlan-stacking;#: ProtocolTransparent-vlan; *: Management-vlan;--------------------------------------------------------------------------------VID Type Ports--------------------------------------------------------------------------------1 common UT:GE0/0/5(D) GE0/0/6(D) GE0/0/7(D) GE0/0/8(D)GE0/0/9(D) GE0/0/10(D) GE0/0/11(D) GE0/0/12(D)GE0/0/13(D) GE0/0/14(D) GE0/0/15(D) GE0/0/16(D)GE0/0/17(D) GE0/0/18(D) GE0/0/19(D) GE0/0/20(D)GE0/0/21(D) GE0/0/22(D) GE0/0/23(D) GE0/0/24(D)10 common UT:GE0/0/1(U) GE0/0/2(U)20 common UT:GE0/0/3(U) GE0/0/4(U)4.删除vlan[lianxi]undo vlan 10[lianxi]display vlan1 common UT:GE0/0/1(U) GE0/0/2(U) GE0/0/5(D) GE0/0/6(D)GE0/0/7(D) GE0/0/8(D) GE0/0/9(D) GE0/0/10(D)GE0/0/11(D) GE0/0/12(D) GE0/0/13(D) GE0/0/14(D)GE0/0/15(D) GE0/0/16(D) GE0/0/17(D) GE0/0/18(D)GE0/0/19(D) GE0/0/20(D) GE0/0/21(D) GE0/0/22(D)GE0/0/23(D) GE0/0/24(D)20 common UT:GE0/0/3(U) GE0/0/4(U)三.交换机连接[lianxi]int GigabitEthernet 0/0/6[lianxi-GigabitEthernet0/0/6]port link-type trunk #trunk模式[lianxi-GigabitEthernet0/0/6]port trunk allow-pass vlan all #让所有vlan通过四.交换机DHCP分配地址开启DHCP<Huawei>sys[Huawei]dhcp enable #开启DHCP划分vlan[Huawei]vlan 10[Huawei-vlan10]q[Huawei]vl[Huawei]vlan 20[Huawei-vlan20]q[Huawei]进⼊vlan,分配IP地址[Huawei]int vlan 10[Huawei-Vlanif10]ip address 192.168.10.1 24 #为vlan10 分配IP地址[Huawei-Vlanif10]dhcp select interface #在VLAN中开启DHCP[Huawei-Vlanif10]dhcp server dns-list 192.168.10.254 #设置⽹关[Huawei-Vlanif10]dhcp server excluded-ip-address 192.168.10.254 #禁⽌⽹关分配到客户机将0/0/1端⼝划分到VLAN 10中,有[Huawei]int g0/0/1[Huawei-GigabitEthernet0/0/1]port hybrid pvid vlan 10[Huawei-GigabitEthernet0/0/1]port hybrid untagged vlan 10。
华为交换机基本切换的命令行

一、华为交换机基本切换的命令行1、用户视图2、系统视图system-view进系统视图命令[HUAWEI]进系统试图状态3、接口视图[HUAWEI]interface GigabitEthernet 0/0/1进接口视图命令进第一接口[Huawei-GigabitEthernet0/0/1]进接口视图状态4、退出命令视图[HUAWEI]quit5、配置主机名[huawei]sysname6、显示系统IOS名称以及版本信息[huawei]dis version7、查看交换机当前配置信息[huawei]display current-configuration8、显示已保存的配置信息[huawei]display saved-configuration9、保存当前配置信息save10、删除已保存的配置信息#reset saved-configuration11、进入接口视图[huawei]interface g0/0/1[huawei-GigabitEthernet]12、配置接口类型[huawei-GigabitEthernet]port link-type access [huawei-GigabitEthernet]port default vlan 213、shutdown命令用来关闭当前接口。
14、undo shutdown命令用来开启当前接口。
15、display interface命令用来查看接口当前运行状态和接口统计信息16、display interface brief命令用来查看接口状态和配置的简要信息。
17、display ip interface brief命令用来查看接口与IP相关的简要信息,包括IP地址、子网掩码、物理链路和协议的Up/Down状态以及处于不同状态的接口数目。
二、划分vlanvlan 2quitintervlan 2ip add 192.168.1.254 24 quitvlan 3quitintervlan 3ip add 192.168.2.254 24 quitinter g0/0/1port link-type access port default vlan 2 quitinter g0/0/2port link-type trunk port trunk all vlan 2 to 3 quit。
华为交换机 配置命令大全

交换机命令---华为路由器配置1.在基于IOS的交换机上设置主机名/系统名:switch(config)# hostname hostname在基于CLI的交换机上设置主机名/系统名:switch(enable) set system name name-string2.在基于IOS的交换机上设置登录口令:switch(config)# enable password level 1 password在基于CLI的交换机上设置登录口令:switch(enable) set passwordswitch(enable) set enalbepass3.在基于IOS的交换机上设置远程访问:switch(config)# interface vlan 1switch(config-if)# ip address ip-address netmaskswitch(config-if)# ip default-gateway ip-address在基于CLI的交换机上设置远程访问:switch(enable) set interface sc0 ip-address netmaskbroadcast-addressswitch(enable) set interface sc0 vlanswitch(enable) set ip route default gateway4.在基于IOS的交换机上启用和浏览CDP信息:switch(config-if)# cdp enableswitch(config-if)# no cdp enable为了查看Cisco邻接设备的CDP通告信息:switch# show cdp interface [type modle/port] switch# show cdp neighbors [type module/port] [detail]在基于CLI的交换机上启用和浏览CDP信息: switch(enable) set cdp {enable|disable} module/port 为了查看Cisco邻接设备的CDP通告信息: switch(enable) show cdp neighbors[module/port] [vlan|duplex|capabilities|detail]5.基于IOS的交换机的端口描述:switch(config-if)# description description-string基于CLI的交换机的端口描述:switch(enable)set port name module/number description-string6.在基于IOS的交换机上设置端口速度:switch(config-if)# speed{10|100|auto}在基于CLI的交换机上设置端口速度:switch(enable) set port speed moudle/number{10|100|auto}switch(enable) set port speed moudle/number{4|16|auto}7.在基于IOS的交换机上设置以太网的链路模式: switch(config-if)# duplex {auto|full|half}在基于CLI的交换机上设置以太网的链路模式: switch(enable) set port duplex module/number {full|half}8.在基于IOS的交换机上配置静态VLAN: switch# vlan databaseswitch(vlan)# vlan vlan-num name vlaswitch(vlan)# exitswitch# configure teriminalswitch(config)# interface interface module/number switch(config-if)# switchport mode accessswitch(config-if)# switchport access vlan vlan-num switch(config-if)# end在基于CLI的交换机上配置静态VLAN:switch(enable) set vlan vlan-num [name name] switch(enable) set vlan vlan-num mod-num/port-list9. 在基于IOS的交换机上配置VLAN中继线: switch(config)# interface interface mod/portswitch(config-if)# switchport mode trunkswitch(config-if)# switchport trunk encapsulation {isl|dotlq}switch(config-if)# switchport trunk allowed vlan remove vlan-listswitch(config-if)# switchport trunk allowed vlan add vlan-list在基于CLI的交换机上配置VLAN中继线: switch(enable) set trunk module/port[on|off|desirable|auto|nonegotiate]Vlan-range [isl|dotlq|dotl0|lane|negotiate] 10.在基于IOS的交换机上配置VTP管理域: switch# vlan databaseswitch(vlan)# vtp domain domain-name在基于CLI的交换机上配置VTP管理域: switch(enable) set vtp [domain domain-name]11.在基于IOS的交换机上配置VTP 模式: switch# vlan databaseswitch(vlan)# vtp domain domain-name switch(vlan)# vtp {sever|cilent|transparent} switch(vlan)# vtp password password在基于CLI的交换机上配置VTP 模式: switch(enable) set vtp [domain domain-name] [mode{ sever|cilent|transparent }][password password]12. 在基于IOS的交换机上配置VTP版本: switch# vlan databaseswitch(vlan)# vtp v2-mode在基于CLI的交换机上配置VTP版本: switch(enable) set vtp v2 enable13. 在基于IOS的交换机上启动VTP剪裁: switch# vlan databaseswitch(vlan)# vtp pruning在基于CL I 的交换机上启动VTP剪裁: switch(enable) set vtp pruning enable14.在基于IOS的交换机上配置以太信道:switch(config-if)# port group group-number[distribution {source|destination}]在基于CLI的交换机上配置以太信道:switch(enable) set port channel moudle/port-rangemode{on|off|desirable|auto}15.在基于IOS的交换机上调整根路径成本:switch(config-if)# spanning-tree [vlan vlan-list] costcost在基于CLI的交换机上调整根路径成本:switch(enable) set spantree portcost moudle/portcostswitch(enable) set spantree portvlancost moudle/port[cost cost][vlan-list]16.在基于IOS的交换机上调整端口ID:switch(config-if)# spanning-tree[vlan vlan-list]port-priority port-priority在基于CLI的交换机上调整端口ID:switch(enable) set spantree portpri {mldule/port}priority switch(enable) set spantree portvlanpri {module/port}priority [vlans]17. 在基于IOS的交换机上修改STP时钟:switch(config)# spanning-tree [vlan vlan-list] hello-time secondsswitch(config)# spanning-tree [vlan vlan-list] forward-time seconds` switch(config)# spanning-tree [vlan vlan-list] max-age seconds在基于CLI的交换机上修改STP时钟:switch(enable) set spantree hello interval[vlan]switch(enable) set spantree fwddelay delay [vlan]switch(enable) set spantree maxage agingtiame[vlan] 18. 在基于IOS的交换机端口上启用或禁用Port Fast 特征:switch(config-if)#spanning-tree portfast在基于CLI的交换机端口上启用或禁用Port Fast 特征: switch(enable) set spantree portfast {module/port}{enable|disable}19. 在基于IOS的交换机端口上启用或禁用UplinkFast 特征:switch(config)# spanning-tree uplinkfast [max-update-rate pkts-per-second]在基于CLI的交换机端口上启用或禁用UplinkFast 特征: switch(enable) set spantree uplinkfast {enable|disable}[rate update-rate] [all-protocols off|on]20. 为了将交换机配置成一个集群的命令交换机,首先要给管理接口分配一个IP地址,然后使用下列命令: switch(config)# cluster enable cluster-name21. 为了从一条中继链路上删除VLAN,可使用下列命令: switch(enable) clear trunk module/port vlan-range22. 用show vtp domain 显示管理域的VTP参数.23. 用show vtp statistics显示管理域的VTP参数.24. 在Catalyst交换机上定义TrBRF的命令如下:switch(enable) set vlan vlan-name [name name] type trbrf bridge bridge-num[stp {ieee|ibm}]25. 在Catalyst交换机上定义TrCRF的命令如下:switch (enable) set vlan vlan-num [name name] type trcrf {ring hex-ring-num|decring decimal-ring-num} parent vlan-num26. 在创建好TrBRF VLAN之后,就可以给它分配交换机端口.对于以太网交换,可以采用如下命令给VLAN分配端口:switch(enable) set vlan vlan-num mod-num/port-num27. 命令show spantree显示一个交换机端口的STP状态.28. 配置一个ELAN的LES和BUS,可以使用下列命令:ATM (config)# interface atm number.subint multiointATM(config-subif)# lane serber-bus ethernet elan-name 29. 配置LECS:ATM(config)# lane database database-nameATM(lane-config-databade)# name elan1-name server-atm-address les1-nsap-addressATM(lane-config-databade)# name elan2-name server-atm-address les2-nsap-addressATM(lane-config-databade)# name …30. 创建完数据库后,必须在主接口上启动LECS.命令如下:ATM(config)# interface atm numberATM(config-if)# lane config database database-nameATM(config-if)# lane config auto-config-atm-address31. 将每个LEC配置到一个不同的ATM子接口上.命令如下:ATM(config)# interface atm number.subint multipointATM(config)# lane client ethernet vlan-num elan-num32. 用show lane server 显示LES的状态.33. 用show lane bus显示bus的状态.34. 用show lane database显示LECS数据库可内容.35. 用show lane client显示LEC的状态.36. 用show module显示已安装的模块列表.37. 用物理接口建立与VLAN的连接:router# configure terminalrouter(config)# interface media module/portrouter(config-if)# description description-stringrouter(config-if)# ip address ip-addr subnet-maskrouter(config-if)# no shutdown38. 用中继链路来建立与VLAN的连接:router(config)# interface module/port.subinterfacerouter(config-ig)# encapsulation[isl|dotlq] vlan-number router(config-if)# ip address ip-address subnet-mask39. 用LANE 来建立与VLAN的连接:router(config)# interface atm module/port router(config-if)# no ip addressrouter(config-if)# atm pvc 1 0 5 qsaalrouter(config-if)# atm pvc 2 0 16 ilnirouter(config-if)# interface atm module/port.subinterface multipointrouter(config-if)# ip address ip-address subnet-maskrouter(config-if)# lane client ethernet elan-numrouter(config-if)# interface atm module/port.subinterface multipointrouter(config-if)# ip address ip-address subnet-namerouter(config-if)# lane client ethernet elan-namerouter(config-if)# …40. 为了在路由处理器上进行动态路由配置,可以用下列IOS命令来进行:router(config)# ip routingrouter(config)# router ip-routing-protocolrouter(config-router)# network ip-network-numberrouter(config-router)# network ip-network-number41. 配置默认路由:switch(enable) set ip route default gateway42. 为一个路由处理器分配VLANID,可在接口模式下使用下列命令:router(config)# interface interface numberrouter(config-if)# mls rp vlan-id vlan-id-num43. 在路由处理器启用MLSP:router(config)# mls rp ip44. 为了把一个外置的路由处理器接口和交换机安置在同一个VTP域中:router(config)# interface interface numberrouter(config-if)# mls rp vtp-domain domain-name45. 查看指定的VTP域的信息:router# show mls rp vtp-domain vtp domain name46. 要确定RSM或路由器上的管理接口,可以在接口模式下输入下列命令:router(config-if)#mls rp management-interface47. 要检验MLS-RP的配置情况:router# show mls rp48. 检验特定接口上的MLS配置:router# show mls rp interface interface number49. 为了在MLS-SE上设置流掩码而又不想在任一个路由处理器接口上设置访问列表:set mls flow [destination|destination-source|full]50. 为使MLS和输入访问列表可以兼容,可以在全局模式下使用下列命令:router(config)# mls rp ip input-acl51. 当某个交换机的第3层交换失效时,可在交换机的特权模式下输入下列命令:switch(enable) set mls enable52. 若想改变老化时间的值,可在特权模式下输入以下命令:switch(enable) set mls agingtime agingtime53. 设置快速老化:switch(enable) set mls agingtime fast fastagingtime pkt_threshold54. 确定那些MLS-RP和MLS-SE参与了MLS,可先显示交换机引用列表中的内容再确定:switch(enable) show mls include55. 显示MLS高速缓存记录:switch(enable) show mls entry56. 用命令show in arp显示ARP高速缓存区的内容。
华为交换机常用命令

华为交换机常用命令 Hessen was revised in January 2021
1、通过AC telnet到交换机(交换机管理IP为:),需要输入交换机的用户名和密码,
下图中用户名为:smxyd,密码为:smxyd;
2、进入交换机特权模式:sys
3、查看交换机端口信息:display interface brief
4、查看交换机各端口连接AP的MAC地址:display mac-address
5、显示当前交换机信息:display current-configuration
6、进交换机端口命令:interface ethernet0/0/28
7、关交换机某个端口,要先进入到某个端口下:shutdown
8、开交换机某个端口,要先进入到某个端口下:undo shutdown
9、开交换机某个端口poe供电功能,要先进入到某个端口下:poe enable
10、关交换机某个端口poe供电功能,要先进入到某个端口下:undo poe enable
11、看交换机所有端口poe供电功能是开还是关:display poe power-state
12、地址解析协议,AP MAC对应的AP ip地址:dis arp
13、返回:quit
14、保存设置:save
15、删除某条命令,一般使用命令: undo。
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
1.1产品简介随着Internet(因特网)的高速发展,人们对通信的需求已逐渐从传统的电话、传真、电报等低速业务向高速的Internet接入、可视电话、视频点播等宽带业务领域延伸,用户对上网速率的需求也越来越高。
在这种需求条件下,以太网接入因其成本低、速度高、使用简单而倍受市场的关注。
面对宽带网络建设的迅猛发展,华为公司根据不同的客户类型需求,推出了Quidway系列以太网交换机。
Quidway S2008B/Quidway S2016B/Quidway S2026B以太网交换机是华为公司自主开发的三款二层线速以太网交换产品,它除了能提供传统以太网的功能外,还针对楼道级交换机的特点,从软件、硬件及结构造型等方面进行了优化设计,因而特别适合于以太网宽带接入的要求。
Quidway S2008B/Quidway S2016B以太网交换机均为44mm高的盒式设备,可以壁挂安装。
S2008B以太网交换机提供8个固定的10/100Base-TX自适应端口,S2016B以太网交换机提供16个固定的10/100Base-TX自适应端口,此外两者都提供1个10/100Base-TX 自适应上行端口及1个用于配置的Console口。
另外S2016B以太网交换机还提供1个扩展模块插槽,可选插100Base-FX多模光纤接口模块或100Base-FX单模光纤接口模块。
Quidway S2026B以太网交换机为42mm高的盒式设备,可以壁挂安装,也可以通过19英寸机架安装。
Quidway S2026B以太网交换机提供24个固定的10/100Base-TX自适应端口、1个100Base-TX上行端口(实际为1个100Base-TX上行端口复用为1个MDIX 端口和1个MDI端口,同时只能有1个端口工作)、1个用于配置的Console口和1个扩展模块插槽,可选插100Base-FX多模光纤接口模块或100Base-FX单模光纤接口模块。
Quidway S2008B/Quidway S2016B/Quidway S2026B以太网交换机支持:l 宽带小区以太网接入l 企业网和园区网组网l 组播服务,支持组播音频/视频服务在本手册中,Quidway S2008B/Quidway S2016B/Quidway S2026B以太网交换机简称为S2000B系列以太网交换机。
1.2 功能特性列表表1-1 功能特性列表业务实现线速二层交换所有端口支持线速转发交换容量:1.8Gbps/3.6Gbps/5.2Gbps(S2008B/S2016B/S2026B)包转发率:1.3Mpps/2.6Mpps/3.9Mpps(S2008B/S2016B/S2026B)交换模式存储转发模式(Store and Forward)VLAN(Virtual Local Area Network)最多支持32个基于端口的VLANQoS(Quality of Service)按端口设置转发优先级,支持2个优先级设置端口汇聚S2016B支持Ethernet0/15和Ethernet0/16两个端口的汇聚S2026B支持Ethernet0/23和Ethernet0/24两个端口的汇聚端口镜像支持基于端口的镜像,将特定端口的流量全部复制到监控端口MAC地址表地址自学习地址表规格:最多支持4K个单播MAC地址,2个组播MAC地址(HGMP启动后将占用ID为0的组播地址,如果该地址已存在,则会被覆盖)流控支持IEEE 802.3x流控(全双工)支持背压式流控(半双工)加载与升级支持通过串口以XModem协议实现加载升级支持通过华为组管理协议HGMP(Huawei Group Management Protocol)实现远程加载升级管理支持命令行接口CLI(Command Line Interface)配置支持通过Console口配置支持HGMP Client维护支持状态查询信息输出支持通过HGMP进行远程维护支持上行端口远端馈电(仅限于S2008B/S2016B直流设备)第2章登录以太网交换机2.1 命令行接口S2000B系列以太网交换机向用户提供一系列的配置命令以及命令行接口,以方便用户配置和管理。
命令行接口有如下特性:l 通过Console口进行本地配置。
l 通过HGMP进行远程配置。
l 配置命令分级保护,确保未授权用户无法侵入交换机。
l 用户可以随时键入“?”以获得在线帮助。
l 提供种类丰富、内容详尽的调试信息,帮助诊断网络故障。
l 提供类似Doskey的功能,可以执行某条历史命令。
l 命令行解释器对关键字采取不完全匹配的搜索方法,用户只需键入无冲突关键字即可解释,如display命令,键入disp即可。
2.1.1 命令行视图S2000B系列以太网交换机的命令行视图是针对不同的配置要求实现的,它们之间有联系又有区别,比如,与S2000B系列建立连接即进入用户视图,它只完成查看运行状态和统计信息的简单功能,再键入system-view进入系统视图,在系统视图下,可以键入不同的命令进入相应的视图。
命令行提供如下视图:l 用户视图l 系统视图l 用户界面视图l VLAN视图l 以太网端口视图视图关系简图如图2-1所示:图2-1 视图关系简图各命令视图的功能特性、进入各视图的命令等细则如表2-1所示。
表2-1 命令视图功能特性列表视图功能提示符进入命令退出命令用户视图查看交换机的简单运行状态和统计信息查看交换机的全部运行状态和统计信息,进行文件管理和系统管理<Quidway>与交换机建立连接即进入quit断开与交换机连接系统视图配置系统参数[Quidway]在用户视图下键入system-viewquit返回用户视图return返回用户视图以太网端口视图配置以太网端口参数[Quidway-Ethernet0/1]固定以太网端口视图:在系统视图下键入interface ethernet0/1quit返回系统视图return返回用户视图[Quidway-Ethernet1/1]扩展百兆以太网端口视图:在系统视图下键入interface ethernet 1/1 VLAN视图配置VLAN参数[Quidway-vlan1]在系统视图下键入vlan 1quit返回系统视图return返回用户视图用户界面视图配置用户界面参数[Quidway-ui-aux0]在系统视图下键入user-interface auxquit返回系统视图return返回用户视图2.1.2 设置用户分级保护密码为了防止未授权用户的非法侵入,S2000B系列以太网交换机将用户分为两个级别:参观级别和监控级别。
从串口登录上以太网交换机后就只见进入参观用户,仅能执行简单的查询操作;监控级别的用户则可以执行监控、配置、管理等操作。
在使用super命令从参观级别用户切换到监控级别用户时,要进行用户身份验证,即需要输入切换口令(如果用户已经使用命令super password password设置了切换口令)。
为了保密,用户在屏幕上看不到所键入的口令,如果三次以内输入正确的口令,则切换到监控级别用户,否则保持原用户级别不变。
请在系统视图下进行下列配置。
表2-2 设置用户分级保护密码,操作,命令切换用户级别至监控级super设置切换用户级别密码super password password取消切换用户级别密码undo super password命令中的参数含义如下:password:明文字符串,取值范围为1~16个字符。
& 说明:(1) 密码区分大小写。
(2) 如果用户丢失了super密码,请与代理商联系。
例:在系统视图下设置切换用户级别密码为Quidway。
<Quidway> super<Quidway> system-view[Quidway] super password Quidway2.1.3 设置终端屏幕一屏显示的行数当某命令显示信息的行数多于一屏能够显示的范围时,可以使用以下命令设置用户终端上屏幕一屏显示的行数,以便将信息分成几段,方便查看。
请在用户界面视图下进行下列配置。
表2-3 设置终端屏幕行数,操作,命令设置用户终端上屏幕一屏显示的行数screen-length screen-length恢复用户终端上屏幕一屏显示的行数为缺省值undo screen-length命令中的参数含义如下:screen-length:用户终端一屏显示的行数,取值范围为0~512。
缺省情况下,用户终端屏幕一屏显示25行。
& 说明:screen-length 0表示关闭分屏功能。
例:将终端线的屏幕一屏显示行数设置为30。
[Quidway] user-interface aux[Quidway-ui-aux0] screen-length 302.1.4 命令行在线帮助命令行接口提供如下几种在线帮助:l 完全帮助l 部分帮助通过上述各种在线帮助能够获得帮助信息,分别描述如下:(1) 在任一视图下,键入<?>获取该视图下所有的命令及其简单描述。
<Quidway> ?Monitor view commands:debugging Enable system debugging functionsdisplay Display running system informationquit Exit from current command viewreboot Reset slotreset Reset all ethernet interfaces counter informationsave Save current configurationsuper Enter the monitor view with specified priority levelsystem-view Enter the system viewundo Cancel current setting(2) 键入一命令,后接以空格分隔的“?”,如果该位置为关键字,则列出全部关键字及其简单描述。
<Quidway>display ?current-configuration Current configurationdiagnostic-information System information for diagnosishgmp Hgmp informationinterface Interface status and configuration informationlink-aggregation Ports aggregation modemac-address Configure MAC addressmemory Display mem infomonitor Display the monitor portqos-info Display Qos informationsaved-configuration The saved configuration informationversion System hardware and software version informationvlan Vlan configuration information(3) 键入一字符串,其后紧接<?>,列出以该字符串开头的所有命令。