交换机配置
原创
©著作权归作者所有:来自51CTO博客作者我菜就爱学的原创作品,请联系作者获取转载授权,否则将追究法律责任
1、配置交换机的设备名称、管理VLAN和ITELNET:
<huawei>
[huawei] system-view
[huawei] vlan 5
[huawei-vlan5] management-vlan
[huawei-vlan5]quit
[huawei]interface vlanif 5
[huawei-vlanif5] ip address 10.10.1.1.24
[huawei-vlanif5]quit
[huawei]telnet server enable //打开telent接口
[huawei]user-interface vty 0 4
[huawei-ui-vty0-4]protocol inbound telnet
[huawei-ui-vty0-4]authentication-mode aaa
[huawei-ui-vty0-4]idle-timeout 15
[huawei-ui-vty0-4]quit
[huawei] aaa
[huawei-aaa]local-user admin password irreversible-cipher Helloworl@6789
[huawei-aaa]local-user admin service-type telnet
[huawei-aaa]quit
[huawei]quit
<huawei>save
2、配置交换机接口,配置的对象一般为接口隔离、速率、双工
<swithch1>system-view
[switch1]port-ioslate mode 12 //端口隔离
[switch1]interface gigabitethernet 1/0/1
[switch1-GigabitEthernet 1/0/1]port-isolate enable group 1
[switch1-GigabitEthernet 1/0/1]quit
[switch1]interface gigabitethernet 1/0/2
[switch-GigabitEthernet 1/0/2]port-isolate enable group 1
[switch-GigabitEthernet 1/0/2]quit
3、配置以太网接口GE0/0/1在自协商模式下速率为100Mb/s
<switch1>system-view
[switch1]interface gigabitethernet 0/0/1
[switch-GigabitEthernet 0/0/1]negotiation auto
[switch-GigabitEthernet 1/0/1]auto speed 100
4、配置以太网接口GE0/0/1在自协商模式下双工模式为全双工
<switch1>system-view
[switch1]interface gigabitEthernet 0/0/1
[switch-GigabitEthernet0/0/1]negotiation auto
5、查看MAC地址表,由MAC、VLAN和端口组成
<switch1>display mac-address
6、显示VLANIF接口的MAC地址
<switch1>display interface vlanif5
7、在MAC地址表中增加静态MAC地址表项,目的MAC地址为0001-0002-0003,vlan5报文
[switch1]mac-address static 0001-0002-0003 gigabitetherbet 0/0/5 vlan 5