Does anyone know if it is possible to find a port number of a switch from a IP or MAC address? If that makes sense?
how to find a port number
Jun 25, 2007
6 Replies
- On router that owns the subnet: show arp | include a.b.c.d
- Then take the resulting mac from the above command, put in format aa-bb-cc-dd-ee-ff
- Go to core switch: show cam aa-bb-cc-dd-ee-ff
- Should tell you the port it is on, including if it is off a trunk. If it is off a trunk, do show cdp neigh detail, and telnet to the next switch.
- Do task 3 and 4 as necessary till you find the port.
Note - If it is an IOS based switch, the command is show mac-address- table | include (rather than show cam), but the outcome should be similar.
The syntax I use is "show ip arp a.b.c.d".
The syntax I use for IOS is is "show mac-addr addr xxxx.xxxx.xxxx"
Either should work....different abbreviations, syntax, or shortcuts.
Cheers guys!
I'll give it ago later on!
ive tried the show cam (macaddress) and i get the following stuff come up but it doesnt say what port it is plugged into (i dont think it is
8/8, like it says there) any idas?switch> (enable) show cam xx-xx-xx-xx-xx-xx
- = Static Entry. + = Permanent Entry. # = System Entry. R = Router Entry. X = Port Security Entry
VLAN Dest MAC/Route Des [CoS] Destination Ports or VCs / [Protocol Type]
---- ------------------ -----
-------------------------------------------
100 xx-xx-xx-xx-xx-xx 8/8 [ALL] Total Matching CAM Entries Displayed = 1
Is 8/8 a trunk? It could be a trunk or uplink to another switch. Regardless, it should be right, else your network would not be accurate servicing that IP address. What I mean by that is, at layer
2, the switch relies on its MAC table for frame delivery, and if your core has a mac on a port that is not accurate, then traffic will not make it correctly.Join the Discussion
Have something to add? Share your thoughts — no account required.
Didn't find your answer?
Ask the community — no account required