mac地址和mac地址表,每个mac地址对应哪个交换机的接口
查看mac地址列表
[Huawei]display mac-address
MAC address table of slot 0:
-------------------------------------------------------------------------------
MAC Address VLAN/ PEVLAN CEVLAN Port Type LSP/LSR-ID
VSI/SI MAC-Tunnel
-------------------------------------------------------------------------------
5489-98d0-42f9 1 - - GE0/0/3 dynamic 0/-
5489-98f9-06c3 1 - - GE0/0/1 dynamic 0/-
-------------------------------------------------------------------------------
Total matching items on slot 0 displayed = 2
arp,地址解析协议,ping操作时之前,会广播消息到所有的ip,返回消息是,mac和端口的对应关系就确定出来
system-view 进入系统视图,quit 推出系统视图
<Huawei>system-view
Enter system view, return user view with Ctrl+Z.
[Huawei]
[Huawei]quit
<Huawei>system-view
[Huawei-port-group-link-type]quit
[Huawei]quit
创建两个虚拟局域网vlan
[Huawei]vlan batch 10 20
Info: This operation may take a few seconds. Please wait for a moment...done.
[Huawei]
Nov 24 2025 12:03:36-08:00 Huawei DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5
.25.191.3.1 configurations have been changed. The current change number is 6, th
e change loop count is 0, and the maximum number of records is 4095.
进入接口设置接口的类型
[Huawei]interface g0/0/1
[Huawei-GigabitEthernet0/0/1]
设置端口的连接方式,常用方式为access和trunk类型
[Huawei-GigabitEthernet0/0/1]port link-type ?
access Access port
dot1q-tunnel QinQ port
hybrid Hybrid port
trunk Trunk port
[Huawei-GigabitEthernet0/0/1]port link-type access
[Huawei-GigabitEthernet0/0/1]
把某个接口放在某个虚拟网10下
[Huawei-GigabitEthernet0/0/1]port default vlan 10
[Huawei-GigabitEthernet0/0/1]
对第二个口设置虚拟网20,进入接口,设置类型,设置虚拟网
[Huawei-GigabitEthernet0/0/1]interface g0/0/2
[Huawei-GigabitEthernet0/0/2]port link-type access
[Huawei-GigabitEthernet0/0/2]
Nov 24 2025 12:12:16-08:00 Huawei DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5
.25.191.3.1 configurations have been changed. The current change number is 10, t
he change loop count is 0, and the maximum number of records is 4095.
[Huawei-GigabitEthernet0/0/2]port default vlan 10
[Huawei-GigabitEthernet0/0/2]
打开和关闭英语提示
[Huawei-GigabitEthernet0/0/2]in en
Info: Information center is enabled.
[Huawei]undo in en
Info: Information center is disabled.
[Huawei]
删除vlan
[Huawei-GigabitEthernet0/0/2]port default vlan 10
4112

被折叠的 条评论
为什么被折叠?



