分类: 系统运维
2013-02-26 13:49:48
6C6509#sh ip arp | include 10.6.231.4 //也可以用sh ip arp | include 10.6. //arp 是ip、Mac的关联
Internet 10.6.231.4 3 0030.4821.befc ARPA Vlan31
6C6509#sh mac-address-table address 0030.4821.befc
Codes: * - primary entry
vlan mac address type learn qos ports
------+----------------+--------+-----+---+--------------------------
Supervisor:
* 31 0030.4821.befc dynamic Yes -- Gi4/3
6C6509#sh cdp nei gi4/3
Capability Codes: R - Router, T - Trans Bridge, B - Source Route Bridge
S - Switch, H - Host, I - IGMP, r - Repeater, P - Phone
Device ID Local Intrfce Holdtme Capability Platform Port ID //没有,则说明直接接6509的,或是接HUB,或不是cisco设备,或cisco设备,但cdp关掉了的。
6C6509#sh mac- inter g4/3
Codes: * - primary entry
vlan mac address type learn qos ports
------+----------------+--------+-----+---+--------------------------
* 31 0030.4821.befc dynamic Yes -- Gi4/3
从终结层开始一层一层往下找,,,四个相关的命令
sh ip arp | include 10.6.233.45(也可mac)
sh mac-address-table address 0030.4821.befc
sh cdp nei gi4/3
sh mac-address-table inter g4/3 //和sh mac-address-table address相对照,其实起验证作用。