1. 基本配置
A. 查看MAC表
<Huawei>dis mac-address
MAC address table of slot 0:
-------------------------------------------------------------------------------
MAC Address VLAN/ PEVLAN CEVLAN Port Type LSP/LSR-ID
VSI/SI MAC-Tunnel
-------------------------------------------------------------------------------
5489-982e-0171 1 - - Eth0/0/2 dynamic 0/-
5489-986c-4022 1 - - Eth0/0/1 dynamic 0/-
-------------------------------------------------------------------------------
Total matching items on slot 0 displayed = 2
B. 设置ARP表老化时间
<Huawei>sys
//设置arp老化时间为200秒
[Huawei]mac-address aging-time 200
C. 配置端口的速率和工作模式
[Huawei]int e0/0/1
//关闭端口自动协商
[Huawei-Ethernet0/0/1]undo negotiation auto
//设定端口速率为10M
[Huawei-Ethernet0/0/1]speed 10
//设定端口速率为100M
[Huawei-Ethernet0/0/1]speed 100
//设置端口工作模式为全双工
[Huawei-Ethernet0/0/1]duplex full
//设置端口工作模式为半双工
[Huawei-Ethernet0/0/1]duplex half
D. 设置端口描述
[Huawei]int eth0/0/1
//描述的内容为“TO-SW2-E0/0/1”
[Huawei-Ethernet0/0/1]description TO-SW2-E0/0/1
E. 清空端口配置
[Huawei]clear configuration int eth0/0/1
Warning: All configurations of the interface will be cleared, and its state will
be shutdown. Continue? [Y/N] :y
Info: Total execute 2 command(s), 2 successful, 0 failed.
2. VLAN
A. 配置单个VLAN
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
//创建vlan 10
[Huawei]vlan 10