how to find a port number

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?

Reply to
dan_fleming99
Loading thread data ...

  1. On router that owns the subnet: show arp | include a.b.c.d
  2. Then take the resulting mac from the above command, put in format aa-bb-cc-dd-ee-ff
  3. Go to core switch: show cam aa-bb-cc-dd-ee-ff
  4. 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.
  5. 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.

Reply to
Trendkill

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"

Reply to
briggs

Either should work....different abbreviations, syntax, or shortcuts.

Reply to
Trendkill

Cheers guys!

I'll give it ago later on!

Reply to
dan_fleming99

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
Reply to
dan_fleming99

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.
Reply to
Trendkill

Cabling-Design.com Forums website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.