1、假如知道192.168.1.100主机地址,如何查看该主机连接交换机的端口
在核心交换机上使用:show arp | in 192.168.1.100
Internet 192.168.1.100 - 8480.2d0d.1ccc ARPA Vlan1
通过以上知道192.168.1.100主机的MAC地址
2、使用:TEST#show mac address-table address 8480.2d0d.1ccc
Mac Address Table
-------------------------------------------
Vlan Mac Address Type Ports
---- ----------- -------- -----
18 8480.2d0d.1ccc DYNAMIC Gi1/0/48
以上可以知道该主机的地址是从G1/0/48接口学习过来的;
3、使用:show cdp neighbors /detail 查看本地G1/0/48接口连接情况;
TEST#show cdp neighbors(通过detail可以看到对端设备IP地址)
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
LAB Gig 0/47 148 S I WS-C3750G Gig 2/0/2
4、查到连接具体设备的时候,登录此设备使用:
LAB#show mac address-table address 8480.2d0d.1ccc
Mac Address Table
-------------------------------------------
Vlan Mac Address Type Ports
---- ----------- -------- -----
18 8480.2d0d.1ccc DYNAMIC Gi1/0/9
从而得知192.168.1.100主机接在交换机LAB的G1/0/9口;