show

enable mode

#show mac address-table | include 0026.ab

2 0026.ab9f.99d2 dynamic ip,ipx,assigned,other GigabitEthernet2/5
4 0026.abb1.7984 dynamic ip,ipx,assigned,other GigabitEthernet3/14
4 0026.abb1.79c6 dynamic ip,ipx,assigned,other GigabitEthernet3/14

vlan mac address type protocols port

顯示目前該switch看得到的開頭為00:26:ab的mac(注意格式為xxxx.xxxx.xxxx),最前面顯示是哪個vlan,最後會顯示從那個port來的。

#show cdp neighbors

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
2960-10G_115 Gig 3/22 152 S I WS-C2960S Gig 1/0/48
2960-10G_117 Gig 3/23 172 S I WS-C2960X Gig 1/0/48
2960G_96 Gig 3/24 167 S I WS-C2960G Gig 0/48
Switch Gig 2/4 177 T S WS-C3524- Gig 0/2
Switch Gig 2/5 152 S I WS-C2960S Gig 1/0/49
Switch Gig 3/14 161 S I WS-C2960G Gig 0/48
DIR-101 Ten 1/1 146 S I WS-C2960X Ten 1/0/2

顯示目前該switch經cdp協定看得到所接連的cisco switch.

#show cdp neighbors detail

亦可加detail得知更詳細資訊,如:各divce IP。