用交换机查看pc机的mac地址配置如下
作者:互联网
条件1:拓扑图:
pc机的ip地址和子网掩码 ipv6地址
配置如下:
sw1:
<Huawei>system-view
[Huawei]sysname SW-1 修改主机名
=======================================
sw2:
<Huawei>system-view
[Huawei]sysname SW-2
===================================================
前提是:pc1去ping,pc2,pc3,pc,的IP地址
注意:这里没有pc2的mac地址,如果让pc2的mac地址出现在交换机上,往下看
在sw1上查看mac地址:
[SW-1]display mac-address
MAC address table of slot 0:
-------------------------------------------------------------------------------
MAC Address VLAN/ PEVLAN CEVLAN Port Type LSP/LSR-ID
VSI/SI MAC-Tunnel
-------------------------------------------------------------------------------
5489-981a-4222 1 - - GE0/0/1 dynamic 0/-
5489-9835-46b6 1 - - GE0/0/3 dynamic 0/-
5489-98f2-7497 1 - - GE0/0/3 dynamic 0/-
-------------------------------------------------------------------------------
Total matching items on slot 0 displayed = 3
pc2去ping,pc3 或pc4 的某个ip地址
这里我用的是20去ping的30
PC>ping 192.168.1.30
Ping 192.168.1.30: 32 data bytes, Press Ctrl_C to break
From 192.168.1.30: bytes=32 seq=1 ttl=128 time=78 ms
From 192.168.1.30: bytes=32 seq=2 ttl=128 time=63 ms
From 192.168.1.30: bytes=32 seq=3 ttl=128 time=78 ms
From 192.168.1.30: bytes=32 seq=4 ttl=128 time=62 ms
From 192.168.1.30: bytes=32 seq=5 ttl=128 time=78 ms
--- 192.168.1.30 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 62/71/78 ms
PC>
=====================================================================
在此查看交换机的mac地址
[SW-1]dis mac-address
MAC address table of slot 0:
-------------------------------------------------------------------------------
MAC Address VLAN/ PEVLAN CEVLAN Port Type LSP/LSR-ID
VSI/SI MAC-Tunnel
-------------------------------------------------------------------------------
5489-98f2-7497 1 - - GE0/0/3 dynamic 0/-
5489-9835-46b6 1 - - GE0/0/3 dynamic 0/-
5489-9876-2fd0 1 - - GE0/0/2 dynamic 0/-
5489-981a-4222 1 - - GE0/0/1 dynamic 0/-
-------------------------------------------------------------------------------
Total matching items on slot 0 displayed = 4
就会查看到pc2的mac地址
标签:GE0,dynamic,192.168,pc,mac,交换机,5489,1.30 来源: https://blog.csdn.net/qq_38936227/article/details/104203403