交換機:Cisco 2960Cisco 3560
1、查看IP對應(yīng)交換機接口MAC地址
Switch_master#show arp | include 10.0.3.85
Internet 10.0.3.85 0 94de.80ff.c61a ARPA Vlan30
2、通過MAC地址查看對應(yīng)交換機端口
Switch_master#show mac address-table dynamic address 94de.80ff.c6aa
Mac Address Table
——————————————-
Vlan Mac Address Type Ports
—- ———– ——– —–
30 94de.80ff.c61a DYNAMIC Gi1/0/3
Total Mac Addresses for this criterion: 1
3、通過接口查看對應(yīng)的設(shè)備
Switch_master#show cdp neighbors gigabitEthernet 1/0/3
Capability Codes: R – Router, T – Trans Bridge, B – Source Route Bridge
S – Switch, H – Host, I – IGMP, r – Repeater, P – Phone,
D – Remote, C – CVTA, M – Two-port Mac Relay
Device ID Local Intrfce Holdtme Capability Platform Port ID
switch_slave Gig 1/0/3 140 S I WS-C3750X Gig 1/0/1
Total cdp entries displayed : 1
#對應(yīng)接口為Cisco交換機,繼續(xù)登陸交換機查詢
switch_slave#show mac address-table dynamic address 94de.80ff.c6aa
Mac Address Table
——————————————-
Vlan Mac Address Type Ports
—- ———– ——– —–
30 94de.80ff.c61a DYNAMIC Gi1/0/11
Total Mac Addresses for this criterion: 1
#先查看對應(yīng)端口下活動的MAC地址,來判斷接口下的活躍的設(shè)備
switch_slave#show mac address-table dynamic interface gigabitEthernet 1/0/11
Mac Address Table
——————————————-
Vlan Mac Address Type Ports
—- ———– ——– —–
30 94de.80ff.c61a DYNAMIC Gi1/0/11
Total Mac Addresses for this criterion: 1
4、通過交換機端口查看對應(yīng)接口設(shè)備IP
#查看接口對接設(shè)備的mac地址
switch_slave#show mac address-table dynamic interface gigabitEthernet 1/0/11
Mac Address Table
——————————————-
Vlan Mac Address Type Ports
—- ———– ——– —–
30 94de.80ff.c61a DYNAMIC Gi1/0/11
#通過mac地址查看你對應(yīng)設(shè)備IP
switch_slave#show arp | include 94de.80ff.c6aa
Internet 10.0.3.85 0 94de.80ff.c61a ARPA Vlan30