Switches, Hubs, and Modems
Showing results for 
Search instead for 
Did you mean: 

showing IP for all port

Frequent Advisor

showing IP for all port

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
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


or simpler


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.