Switches, Hubs, and Modems
1836604 Members
2952 Online
110102 Solutions
New Discussion

showing IP for all port

 
patlamhk
Frequent Advisor

showing IP for all port

Hi,
Could someone able to give me a handle ?

Is there any command able to show what IP address connected to each port ?

Thanks in advance
1 REPLY 1
Ron Kinner
Honored Contributor

Re: showing IP for all port

Depends on the switch. Which one are you talking about?

A layer 3 switch may tell you with

sh arp

Layer 2 switches only know the MAC addresses and the command to see those varies depending on which one you have.

sh mac

sh cam dyn

are two that come to mind. I'd have to look them up. They will usually also respond to sh arp but will only show you the IP addresses of devices that connect to them or that they have pinged. Some switches have a gui which may tell you more.

You can run a scanner on a PC connected to a layer 2 switch to find all the active IP addresses

http://insecure.org/nmap/

or simpler

http://www.soft32.com/download_572.html

Then manually find which is where based on the mac addresses seen by the switch on each port.

If you just want to trace one particular PC then ping it and immediately afterwards do
arp -a
That should give you the MAC address.

Ron