华为交换机常见命令

合集下载

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

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

华为路由器交换机常用命令一、设备管理命令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地质。

华为交换机命令大全

华为交换机命令大全
4.在基于IOS的交换机上启用和浏览CDP信息: switch(config-if)# cdp enable switch(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]
1.在基于IOS的交换机上设置主机名/系统名: switch(config)# hostname hostname 在基于CLI的交换机上设置主机名/系统名: switch(enable) set system name name-string
2.在基于IOS的交换机上设置登录口令: switch(config)# enable password level 1 password 在基于CLI的交换机上设置登录口令: switch(enable) set password switch(enable)tch(enable) set spantree portcost moudle/port cost switch(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 seconds switch(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-name 21. 为了从一条中继链路上删除VLAN,可使用下列命令: switch(enable) clear trunk module/port vlan-range 22. 用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-num 26. 在创建好TrBRF VLAN之后,就可以给它分配交换机端口.对于以太网交换,可以采用如下命令给VLAN分配端口: switch(enable) set vlan vlan-num mod-num/port-num 27. 命令show spantree显示一个交换机端口的STP状态. 28. 配置一个ELAN的LES和BUS,可以使用下列命令: ATM (config)# interface atm number.subint multioint

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

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

华为交换机基本配置命令详解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业务环回组。

华为交换机常用命令

华为交换机常用命令

1.进入管理界面:system-view2.设置用户登录时需要进行口令验证,且验证口令为huawei。

[Quidway] user-interface 0[Quidway-ui0] authentication-mode password[Quidway-ui0] set authentication password simple huawei3. 设置从用户界面登录后可以访问的命令级别: user privilege level level恢复从用户界面登录后可以访问的命令级别为缺省级别: undo user privilege level4.系统IP配置:a.创建并进入管理VLAN接口视图:interface vlan-interface vlan-id删除管理VLAN :undo interface vlan-interface vlan-idb.配置管理VLAN接口IP地址:ip address ip-address net-mast删除管理VLAN接口IP地址:undo ip address [ip-address net-mast]5. 进入Ethernet0/1以太网端口视图。

[Quidway] interface ethernet0/16. 配置端口Ethernet0/1为Trunk端口,并允许2、6到50、100等VLAN通过。

[Quidway-Ethernet0/1] port link-type trunk[Quidway-Ethernet0/1] port trunk permit vlan 2 6 to 50 100创建VLAN 100。

[Quidway] vlan 100配置端口Ethernet0/1的缺省VLAN ID为100。

[Quidway-Ethernet0/1] port trunk pvid vlan 1007. 创建VLAN并进入VLAN视图: vlan vlan_id删除已创建的VLAN: undo vlan{ vlan_id [ to vlan_id ] | all }8. 为指定的VLAN增加以太网端口: port interface_list删除指定的VLAN的某些以太网端口: undo port interface_list创建VLAN2并进入其视图。

华为交换机基础命令

华为交换机基础命令

华为交换机基础命令⼀.简单命令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。

华为交换机常用配置命令

华为交换机常用配置命令

华为交换机基本配置命令一、单交换机VLAN划分命令命令解释system 进入系统视图system-view 进入系统视图quit 退到系统视图undo vlan 20 删除vlan 20sysname 交换机命名disp vlan 显示vlanvlan 20 创建vlan(也可进入vlan 20)port e1/0/1 to e1/0/5 把端口1-5放入VLAN 20 中disp vlan 20 显示vlan里的端口20int e1/0/24 进入端口24port access vlan 20 把当前端口放入vlan 20undo port e1/0/10 表示删除当前VLAN端口10disp curr 显示当前配置二、配置交换机支持TELNETsystem 进入系统视图sysname 交换机命名int vlan 1 进入VLAN 1ip address 192.168.3.100 255.255.255.0 配置IP地址user-int vty 0 4 进入虚拟终端authentication-mode password (aut password) 设置口令模式set authentication password simple 222 (set aut pass sim 222) 设置口令user privilege level 3(use priv lev 3) 配置用户级别disp current-configuration (disp cur) 查看当前配置disp ip int 查看交换机VLAN IP配置删除配置必须退到用户模式reset saved-configuration(reset saved) 删除配置reboot 重启交换机三、跨交换机VLAN的通讯在sw1上:vlan 10 建立VLAN 10int e1/0/5 进入端口5port access vlan 10 把端口5加入vlan 10vlan 20 建立VLAN 20int e1/0/15 进入端口15port access vlan 20 把端口15加入VLAN 20int e1/0/24 进入端口24port link-type trunk 把24端口设为TRUNK端口port trunk permit vlan all 同上在SW2上:vlan 10 建立VLAN 10int e1/0/20 进入端口20port access vlan 10 把端口20放入VLAN 10int e1/0/24 进入端口24port link-type trunk 把24端口设为TRUNK端口port trunk permit vlan all (port trunk permit vlan 10 只能为vlan 10使用)24端口为所有VLAN使用disp int e1/0/24 查看端口24是否为TRUNKundo port trunk permit vlan all 删除该句四、路由的配置命令system 进入系统模式sysname 命名int e1/0 进入端口ip address 192.168.3.100 255.255.255.0 设置IPundo shutdown 打开端口disp ip int e1/0 查看IP接口情况disp ip int brief 查看IP接口情况user-int vty 0 4 进入口令模式authentication-mode password(auth pass) 进入口令模式set authentication password simple 222 37 设置口令user privilege level 3 进入3级特权save 保存配置reset saved-configuration 删除配置(用户模式下运行)undo shutdown 配置远程登陆密码int e1/4ip route 192.168.3.0(目标网段) 255.255.255.0 192.168.12.1(下一跳:下一路由器的接口)静态路由ip route 0.0.0.0 0.0.0.0 192.168.12.1 默认路由disp ip rout 显示路由列表sw1(三层交换机):int vlan 10 创建虚拟接口VLAN 10ip address 192.168.10.254 255.255.255.0 设置虚拟接口VLAN 10的地址int vlan 20 创建虚拟接口VLAN 20ip address 192.168.20.254 255.255.255.0 设置虚拟接口IP VLAN 20的地址注意:vlan 10里的计算机的网关设为 192.168.10.254vlan 20里的计算机的网关设为 192.168.20.254[S9306-GigabitEthernet2/0/42]dis this#interface GigabitEthernet2/0/42 原先的为trunk,port link-type trunkport trunk allow-pass vlan 2 to 4094Duplex {auto/half/full}Speed {auto/10/100/1000}#interface GigabitEthernet2/0/42 现在改为accessundo port trunk allow-pass vlan allport trunk allow-pass vlan 1port link-type accessport default vlan 10Stp enableStp priority 4096Stp root {primary/secondary}华为路由器交换机配置命令:路由器命令[Quidway]displayversion;显示版本信息[Quidway]displaycurrent-configuration;显示当前配置[Quidway]displayinterfaces;显示接口信息[Quidway]displayiproute;显示路由信息[Quidway]sysnameaabbcc;更改主机名[Quidway]superpasswrod123456;设置口令[Quidway]interfaceserial0;进入接口[Quidway-serial0]ipaddress;配置端口IP地址[Quidway-serial0]undoshutdown;激活端口配置ospf[S9300-A] router id 1.1.1.1[S9300-A] ospf 100[S9300-A-ospf-100] area 0[S9300-A-ospf-100-area-0.0.0.0] network 192.168.0.0 0.0.0.255 [S9300-A-ospf-100-area-0.0.0.0] quit[S9300-A-ospf-1] area 1[S9300-A-ospf-100-area-0.0.0.1] network 192.168.1.0 0.0.0.255 [S9300-A-ospf-100-area-0.0.0.1] quit[S9300-A-ospf-1] quit。

华为交换机命令大全

华为交换机命令大全

华为交换机基本配置命令详解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业务环回组。

华为交换机常用命令及解释

华为交换机常用命令及解释

华为交换机常用命令及解释一、基本配置1、视图system-view //用户视图[quidway]interface ethernet 0/1 //系统视图[quidway-ethernet0/1]//接口视图2、密码及基本参数配置(1) console口登录配置system-view[quidway]user-interface aux 0[quidway-aux0]authentication-mode{none|password|scheme} //设置登录的验证方法。

none是不要验证,password是密码验证,scheme是服务器验证。

[quidway-aux0]set authentication password {cipher|simple} 123456 //当上面的模式为paaword时,设置验证的密码。

simple是明文密码。

[quidway-aux0]user privilege level 2 //设置从AUX登录后可以访问的命令级别为2级,默认是1级。

[quidway-aux0]speed 19200 //设置console口使用的传输速率[quidway-aux0]screen-length 30 //设置一屏显示30行命令[quidway-aux0]history-command max-size 20 //设置历史命令缓冲区最多存放20条命令[quidway-aux0]idle-timeout 6 //设置超时时间为6分钟(2)telnet 登录system-view[quidway]user-interface vty 0 4[quidway-aux0]authentication-mode{none|password|scheme} //设置登录的验证方法。

none是不要验证,password是密码验证,scheme是服务器验证。

[quidway-aux0]set authentication password {cipher|simple} 123456 //当上面的模式为paaword时,设置验证的密码。

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

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

<HUAWEI> reset saved-configurationWarning: The action will delete thesaved configuration in the device.The configuration will be erased toreconfigure. 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为例,配置如下。

<HUAWEI> system-view[HUAWEI] user-interface console 0[HUAWEI-ui-console0] authentication-mode password[HUAWEI-ui-console0] set authentication password cipher Huawei@123[HUAWEI-ui-console0] return<HUAWEI> save# 以登录用户界面的认证方式为AAA认证,用户名为admin123,密码为Huawei@123为例,配置如下。

<HUAWEI> system-view[HUAWEI] user-interface console 0[HUAWEI-ui-console0] authentication-mode aaa[HUAWEI-ui-console0] quit[HUAWEI] aaa[HUAWEI-aaa] local-user admin123 password irreversible-cipher Huawei@123 [HUAWEI-aaa] local-user admin123 service-type terminal(本地防务终端用户)[HUAWEI-aaa] return(返回)<HUAWEI> save(保存)三、查看某个接口学习到的MAC地址<HUAWEI> display mac-address dynamic gigabitethernet1/0/1MAC Address VLAN/VSI Learned-From Type-------------------------------------------------------------------------0000-0000-0003 300/- GE1/0/1 dynamic 0026-6e5c-feac 3000/- GE1/0/1 dynamic四、查看某个VLAN学习到的MAC地址<HUAWEI> display mac-address dynamic vlan 10MAC Address VLAN/VSI Learned-From Type--------------------------------------------------------------------------0000-0000-0003 10/- GE1/0/1 dynamic0026-6e5c-feac 10/- GE1/0/2 dynamic五、查看系统的MAC地址<HUAWEI> display interface gigabitethernet1/0/1GigabitEthernet1/0/1 current state : UPLine protocol current state : UPDescription:Switch Port, Link-type : access(configured),IP Sending Frames' Format is PKTFMT_ETHNT_2, Hardware address is00e0f74b-6d00六、根据IP获取对应设备的MAC地址<HUAWEI> display arp | include 192.168.150.20配置端口安全# 配置GE1/0/1接口的端口安全功能。

<HUAWEI> system-view[HUAWEI] interface gigabitethernet 1/0/1[HUAWEI-GigabitEthernet1/0/1] port-security enable# 配置GE1/0/1接口的MAC地址学习限制数为5,即最多可以学习到5个MAC地址表项。

<HUAWEI> system-view[HUAWEI] interface gigabitethernet 1/0/1[HUAWEI-GigabitEthernet1/0/1] port-security enable[HUAWEI-GigabitEthernet1/0/1] port-security max-mac-num 5配置永久端口组# 配置接口GE1/0/1至GE1/0/8加入到永久端口组portgroup1(使用port-group命令)<HUAWEI> system-view[HUAWEI] port-group portgroup1[HUAWEI-port-group-portgroup1] group-member gigabitethernet 1/0/1 togigabitethernet 1/0/8配置接口速率自协商模式下,手动配置接口速率# 配置以太网接口GE1/0/1在自协商模式下协商速率为100Mbit/s。

<HUAWEI> system-view[HUAWEI] interface gigabitethernet 1/0/1[HUAWEI-GigabitEthernet1/0/1] negotiation auto[HUAWEI-GigabitEthernet1/0/1] auto speed 100配置双工模式自协商模式下,手动配置双工模式# 配置以太网电接口GE1/0/1在自协商模式下双工模式为全双工模式。

<HUAWEI> system-view[HUAWEI] interface gigabitethernet 1/0/1[HUAWEI-GigabitEthernet1/0/1] negotiation auto[HUAWEI-GigabitEthernet1/0/1] auto duplex full配置接口切换到三层模式接口视图下执行命令undo portswitch,配置接口切换到三层模式。

# 将接口GE1/0/1切换为三层模式。

<HUAWEI> system-view[HUAWEI] interface gigabitethernet 1/0/1[HUAWEI-GigabitEthernet1/0/1] undo portswitch[HUAWEI-GigabitEthernet1/0/1] ip address 10.10.10.10 255.255.255.0支持二层模式与三层模式切换的款型及版本如下:lS5700EI:V200R005C00&C01lS5700HI:V100R005C01、V100R006C01、V200R001C00、V200R002C00、V200R003C00、V200R005C00&C01lS5710EI:V200R002C00、V200R003C00、V200R005C00lS5720EI:V200R007C00、V200R008C00、V200R009C00、V200R010C00lS5710HI:V200R003C00、V200R005C00lS5720HI:V200R006C00、V200R007C00、V200R008C00、V200R009C00、V200R010C00lS6700EI:V200R005C00&C01lS6720EI:V200R008C00、V200R009C00、V200R010C00lS6720S-EI:V200R008C00、V200R009C00、V200R010C00lS7700&S9700:V200R001C00&C01、V200R002C00、V200R003C00、V200R005C00、V200R006C00、V200R007C00、V200R008C00、V200R009C00、V200R010C00对于V200R005C00及后续版本,在接口使用命令undo portswitch,将以太网接口从二层模式切换到三层模式后,支持配置IP地址。

一键清除接口下的配置执行命令一键式清除接口下配置后,接口的状态将被置为shutdown状态。

# 在系统视图下执行命令clear configuration interface清除GE1/0/1接口下的配置<HUAWEI> system-view[HUAWEI] clear configuration interface gigabitethernet 1/0/1Warning: Allconfigurations of the interface will be cleared, and its state will beshutdown. Continue? [Y/N] :yInfo: Total 5 command(s) executed, 5 successful, 0 failed.查看设备支持的链路聚合组数目和成员接口数目# 查看设备支持的链路聚合组数目和成员接口数目。

相关文档
最新文档