华为交换机常见命令

上传人:文*** 文档编号:195257273 上传时间:2023-03-16 格式:DOCX 页数:11 大小:335.20KB
收藏 版权申诉 举报 下载
华为交换机常见命令_第1页
第1页 / 共11页
华为交换机常见命令_第2页
第2页 / 共11页
华为交换机常见命令_第3页
第3页 / 共11页
资源描述:

《华为交换机常见命令》由会员分享,可在线阅读,更多相关《华为交换机常见命令(11页珍藏版)》请在装配图网上搜索。

1、一、清空配置: reset saved-configuration(清楚下次启动时使用的配置文件信息)然后重启设备,重启设备室提示保存信息,选择“NO”。 reset saved-configurationWarning: The action will delete the saved configuration in the device.The configuration will be erased to reconfigure. Continue? Y/N:yWarning: Now clearing the configuration in the device.Info: Suc

2、ceeded in clearing the configuration in the device. rebootInfo: The system is now comparing the configuration, please wait.Warning: The configuration has been modified, and it will be saved to the next startup saved-configuration file flash:/vrpcfg.zip. Continue? Y/N:n /此处请选择“N”Info: If want to rebo

3、ot with saving diagnostic information, input N and then execute reboot save diagnostic-information.System will reboot! Continue?Y/N:y二、通过STelnet/Telnet登录交换机设置新的Console口登录密码# 以登录用户界面的认证方式为密码认证,密码为Huawei123为例,配置如下。 system-viewHUAWEI user-interface console 0HUAWEI-ui-console0 authentication-mode passwo

4、rdHUAWEI-ui-console0 set authentication password cipher Huawei123HUAWEI-ui-console0 return save# 以登录用户界面的认证方式为AAA认证,用户名为admin123,密码为Huawei123为例,配置如下。 system-viewHUAWEI user-interface console 0HUAWEI-ui-console0 authentication-mode aaaHUAWEI-ui-console0 quitHUAWEI aaaHUAWEI-aaa local-user admin123 pa

5、ssword irreversible-cipher Huawei123HUAWEI-aaa local-user admin123 service-type terminal(本地防务终端用户)HUAWEI-aaa return(返回) save(保存)三、查看某个接口学习到的MAC地址 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

6、 dynamic 四、查看某个VLAN学习到的MAC地址 display mac-address dynamic vlan 10MAC Address VLAN/VSI Learned-From Type -0000-0000-0003 10/- GE1/0/1 dynamic 0026-6e5c-feac 10/- GE1/0/2 dynamic 五、查看系统的MAC地址 display interface gigabitethernet1/0/1GigabitEthernet1/0/1 current state : UP Line protocol current state : UPD

7、escription: Switch Port, Link-type : access(configured), IP Sending Frames Format is PKTFMT_ETHNT_2, Hardware address is00e0f74b-6d00 六、根据IP获取对应设备的MAC地址 display arp | include 192.168.150.20配置端口安全# 配置GE1/0/1接口的端口安全功能。 system-viewHUAWEI interface gigabitethernet 1/0/1HUAWEI-GigabitEthernet1/0/1 port-s

8、ecurity enable# 配置GE1/0/1接口的MAC地址学习限制数为5,即最多可以学习到5个MAC地址表项。 system-viewHUAWEI interface gigabitethernet 1/0/1HUAWEI-GigabitEthernet1/0/1 port-security enableHUAWEI-GigabitEthernet1/0/1 port-security max-mac-num 5配置永久端口组# 配置接口GE1/0/1至GE1/0/8加入到永久端口组portgroup1(使用port-group命令) system-viewHUAWEI port-gr

9、oup portgroup1HUAWEI-port-group-portgroup1 group-member gigabitethernet 1/0/1 to gigabitethernet 1/0/8配置接口速率 自协商模式下,手动配置接口速率# 配置以太网接口GE1/0/1在自协商模式下协商速率为100Mbit/s。 system-viewHUAWEI interface gigabitethernet 1/0/1HUAWEI-GigabitEthernet1/0/1 negotiation autoHUAWEI-GigabitEthernet1/0/1 auto speed 100配置

10、双工模式 自协商模式下,手动配置双工模式 # 配置以太网电接口GE1/0/1在自协商模式下双工模式为全双工模式。 system-viewHUAWEI interface gigabitethernet 1/0/1HUAWEI-GigabitEthernet1/0/1 negotiation autoHUAWEI-GigabitEthernet1/0/1 auto duplex full配置接口切换到三层模式 接口视图下执行命令undo portswitch,配置接口切换到三层模式。# 将接口GE1/0/1切换为三层模式。 system-viewHUAWEI interface gigabite

11、thernet 1/0/1HUAWEI-GigabitEthernet1/0/1 undo portswitchHUAWEI-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、V200R005C00lS5720

12、EI:V200R007C00、V200R008C00、V200R009C00、V200R010C00lS5710HI:V200R003C00、V200R005C00lS5720HI:V200R006C00、V200R007C00、V200R008C00、V200R009C00、V200R010C00lS6700EI:V200R005C00&C01lS6720EI:V200R008C00、V200R009C00、V200R010C00lS6720S-EI:V200R008C00、V200R009C00、V200R010C00lS7700&S9700:V200R001C00&C01、V200R00

13、2C00、V200R003C00、V200R005C00、V200R006C00、V200R007C00、V200R008C00、V200R009C00、V200R010C00对于V200R005C00及后续版本,在接口使用命令undo portswitch,将以太网接口从二层模式切换到三层模式后,支持配置IP地址。一键清除接口下的配置 执行命令一键式清除接口下配置后,接口的状态将被置为shutdown状态。# 在系统视图下执行命令clear configuration interface清除GE1/0/1接口下的配置 system-viewHUAWEI clear configuration

14、 interface gigabitethernet 1/0/1Warning: All configurations of the interface will be cleared, and its state will be shutdown. Continue? Y/N :yInfo: Total 5 command(s) executed, 5 successful, 0 failed.查看设备支持的链路聚合组数目和成员接口数目# 查看设备支持的链路聚合组数目和成员接口数目。 display trunk configuration接口加入VLANl Access接口加入VLAN sy

15、stem-viewHUAWEI interface gigabitethernet0/0/1HUAWEI-GigabitEthernet0/0/1 port link-type access /设置接口的链路类型为AccessHUAWEI-GigabitEthernet0/0/1 port default vlan 10 /把接口GigabitEthernet0/0/1加入VLAN 10Trunk接口加入VLAN system-viewHUAWEI interface gigabitethernet0/0/1HUAWEI-GigabitEthernet0/0/1 port link-type

16、trunk /设置接口的链路类型为TrunkHUAWEI-GigabitEthernet0/0/1 port trunk allow-pass vlan 10 /把接口GigabitEthernet0/0/1加入VLAN 10Hybrid接口加入VLAN system-viewHUAWEI interface gigabitethernet0/0/1HUAWEI-GigabitEthernet0/0/1 port link-type hybrid /设置接口的链路类型为HybridHUAWEI-GigabitEthernet0/0/1 port hybrid tagged vlan 10 /接

17、口GigabitEthernet0/0/1以Tagged方式加入VLAN 10HUAWEI-GigabitEthernet0/0/1 port hybrid untagged vlan 20 /接口GigabitEthernet0/0/1以Untagged方式加入VLAN 20批量创建VLAN批量创建10个连续的VLAN:VLAN11到VLAN20。 system-viewHUAWEI vlan batch 11 to 20批量创建10不连续的VLAN:VLAN10、VLAN15到VLAN19、VLAN25、VLAN28到VLAN30。 system-viewHUAWEI vlan batch

18、 10 15 to 19 25 28 to 30接口批量加入VLANaccess接口类型。 system-viewHUAWEI port-group pg1 /创建端口组pg1HUAWEI-port-group-pg1 group-member gigabitethernet1/0/1 to gigabitethernet1/0/5 /把接口gigabitethernet1/0/1到gigabitethernet1/0/5加入端口组HUAWEI-port-group-pg1 port link-type access /批量修改端口gigabitethernet1/0/1 to gigabit

19、ethernet1/0/5的链路类型为accessHUAWEI-port-group-pg1 port default vlan 10 /批量把端口gigabitethernet1/0/1 to gigabitethernet1/0/5加入VLAN10trunk接口类型。 system-viewHUAWEI port-group pg1 /创建端口组pg1HUAWEI-port-group-pg1 group-member gigabitethernet1/0/1 to gigabitethernet1/0/5 /把接口gigabitethernet1/0/1到gigabitethernet1

20、/0/5加入端口组HUAWEI-port-group-pg1 port link-type trunk /批量修改端口gigabitethernet1/0/1 to gigabitethernet1/0/5的链路类型为trunkHUAWEI-port-group-pg1 port trunk allow-pass vlan 10 20 /批量把端口gigabitethernet1/0/1 to gigabitethernet1/0/5加入VLAN10和VLAN20删除单个VLAN10。 system-viewHUAWEI undo vlan 10删除批量VLAN10到VLAN20。 syste

21、m-viewHUAWEI undo vlan batch 10 to 20将接口类型修改为Access system-viewHUAWEI interface gigabitethernet0/0/1HUAWEI-GigabitEthernet0/0/1 port link-type accessHUAWEI-GigabitEthernet0/0/1 port default vlan 10 /设置接口的PVID为VLAN 10,并同时将VLAN 10加入接口将接口类型修改为Trunk system-viewHUAWEI interface gigabitethernet0/0/1HUAWEI-GigabitEthernet0/0/1 port link-type trunkHUAWEI-GigabitEthernet0/0/1 port trunk pvid vlan 10 /设置接口的PVID为VLAN 10HUAWEI-GigabitEthernet0/0/1 port trunk allow-pass vlan 2 10 20 /将VLAN 2、VLAN 10和VLAN 20加入接口

展开阅读全文
温馨提示:
1: 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
2: 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
3.本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
5. 装配图网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
关于我们 - 网站声明 - 网站地图 - 资源地图 - 友情链接 - 网站客服 - 联系我们

copyright@ 2023-2025  zhuangpeitu.com 装配图网版权所有   联系电话:18123376007

备案号:ICP2024067431-1 川公网安备51140202000466号


本站为文档C2C交易模式,即用户上传的文档直接被用户下载,本站只是中间服务平台,本站所有文档下载所得的收益归上传人(含作者)所有。装配图网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。若文档所含内容侵犯了您的版权或隐私,请立即通知装配图网,我们立即给予删除!