华为:查询mac地址从哪里来的?查看此时网络的ip对应的mac地址?(查arp表、查mac地址表、查lldp邻居表)

华为:查询mac地址从哪里来的?查看此时网络的ip对应的mac地址?(查arp表、查mac地址表、查lldp邻居表)

(1)拓扑

图片.png

(2)有人乱接线了

图片.png

知道了ip地址

图片.png

查看出这个ip对应的mac地址

<sw1>display arp     

IP ADDRESS      MAC ADDRESS     EXPIRE(M) TYPE INTERFACE      VPN-INSTANCE     

                                          VLAN

------------------------------------------------------------------------------

192.168.1.254   4c1f-ccae-2ec8            I -  Vlanif1

192.168.1.101   5489-986e-76e3  20        D-0  GE0/0/1  1

192.168.1.102   5489-98b1-72da  20        D-0  GE0/0/1  1

192.168.1.200   5489-98f7-2cef  20        D-0  GE0/0/1  1

192.168.2.254   4c1f-ccae-2ec8            I -  Vlanif2

------------------------------------------------------------------------------

Total:5         Dynamic:3       Static:0     Interface:2   

<sw1>

<sw1>display mac-address

MAC address table of slot 0:

-------------------------------------------------------------------------------

MAC Address    VLAN/       PEVLAN CEVLAN Port            Type      LSP/LSR-ID 

               VSI/SI                                              MAC-Tunnel 

-------------------------------------------------------------------------------

5489-98f7-2cef 1           -      -      GE0/0/1         dynamic   0/-        

5489-98b1-72da 1           -      -      GE0/0/1         dynamic   0/-        

5489-986e-76e3 1           -      -      GE0/0/1         dynamic   0/-        

-------------------------------------------------------------------------------

Total matching items on slot 0 displayed = 3


<sw1>

图片.png

<sw3>display arp

IP ADDRESS      MAC ADDRESS     EXPIRE(M) TYPE INTERFACE      VPN-INSTANCE     

                                          VLAN

------------------------------------------------------------------------------

Total:0         Dynamic:0       Static:0     Interface:0   

<sw3>

<sw3>

<sw3>display mac-address

MAC address table of slot 0:

-------------------------------------------------------------------------------

MAC Address    VLAN/       PEVLAN CEVLAN Port            Type      LSP/LSR-ID  VSI/SI      MAC-Tunnel 

-------------------------------------------------------------------------------

5489-986e-76e3 1           -      -      GE0/0/2         dynamic   0/-        

5489-98f7-2cef 1           -      -      GE0/0/1         dynamic   0/-        

-------------------------------------------------------------------------------

Total matching items on slot 0 displayed = 2

<sw3>



<sw5>display arp

IP ADDRESS      MAC ADDRESS     EXPIRE(M) TYPE INTERFACE      VPN-INSTANCE      VLAN

------------------------------------------------------------------------------

Total:0         Dynamic:0       Static:0     Interface:0   

<sw5>

<sw5>

<sw5>display mac-address

MAC address table of slot 0:

-------------------------------------------------------------------------------

MAC Address    VLAN/       PEVLAN CEVLAN Port            Type      LSP/LSR-ID 

               VSI/SI                                              MAC-Tunnel 

-------------------------------------------------------------------------------

5489-986e-76e3 2           -      -      GE0/0/7         dynamic   0/-        

5489-98f7-2cef 2           -      -      GE0/0/6         dynamic   0/-        

-------------------------------------------------------------------------------

Total matching items on slot 0 displayed = 2

<sw5>




图片.png

从上表中,可以知道人ip对就的mac地址以及mac地址从哪个交换机的哪一个接口过来的。

(3)除了查arp表与mac地址,还有什么方法?

图片.png

相关交换机上都开户lldp:

sw1:

lldp enable

sw2:

lldp enable

sw3:

lldp enable

sw4:

lldp enable

sw5:

lldp enable


查询邻居表:

[sw1]display lldp neighbor brief

Local Intf   Neighbor Dev             Neighbor Intf             Exptime

GE0/0/1      sw2                      GE0/0/2                   103   

GE0/0/4      sw4                      GE0/0/2                   113   

[sw1]



[sw2]display lldp neighbor brief

Local Intf   Neighbor Dev             Neighbor Intf             Exptime

GE0/0/2      sw1                      GE0/0/1                   95    

GE0/0/5      sw3                      GE0/0/3                   99    

[sw2]



[sw3]display lldp neighbor brief

Local Intf   Neighbor Dev             Neighbor Intf             Exptime

GE0/0/1      sw5                      GE0/0/7                   119   

GE0/0/3      sw2                      GE0/0/5                   110 



[sw4]display lldp neighbor brief

Local Intf   Neighbor Dev             Neighbor Intf             Exptime

GE0/0/1      sw5                      GE0/0/3                   107   

GE0/0/2      sw1                      GE0/0/4                   100   

[sw4



[sw5]display lldp neighbor brief

Local Intf   Neighbor Dev             Neighbor Intf             Exptime

GE0/0/3      sw4                      GE0/0/1                   119   

GE0/0/7      sw3                      GE0/0/1                   118   

[sw5]



mac地址(列表、list、全)maclist

http://www.zh-cjh.com/wenzhangguilei/1009.html

文章归类、所有文章列表、LISTLIST

http://www.zh-cjh.com/wangzhangonggao/2195.html




1、本站资源长期持续更新。
2、本资源基本为原创,部分来源其他付费资源平台或互联网收集,如有侵权请联系及时处理。
3、本站大部分文章的截图来源实验测试环境,请不要在生产环境中随意模仿,以免带来灾难性后果。

转载请保留出处:  www.zh-cjh.com珠海陈坚浩博客 » 华为:查询mac地址从哪里来的?查看此时网络的ip对应的mac地址?(查arp表、查mac地址表、查lldp邻居表)

作者: cjh


手机扫一扫,手机上查看此文章:

一切源于价值!

其他 模板文件不存在: ./template/plugins/comment/pc/index.htm

未雨绸缪、居安思危!

数据安全、有备无患!

注意操作、数据无价!

一切源于价值!