Cisco Support Community
Showing results for 
Search instead for 
Did you mean: 

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. And see here for current known issues.

New Member

How can I show IP to Switch Port mappings - cisco IOS

- Show ARP will give me all the mac to ip addresses

- Show mac-address-table will give me all the mac to switch ports.

- Is there a command that would give me the mac to ip and switchport????

I know I can do this 1 address at a time but that is not very efficient.

Cisco Employee

Re: How can I show IP to Switch Port mappings - cisco IOS

As such there is no command for mac to ip and switchport

Show IP int brief will give you IP and the switch port.

C2950#sh ip interface brief

Interface IP-Address OK? Method Status Protocol

Vlan1 YES NVRAM up up

Vlan2 YES manual administratively down down

FastEthernet0/1 unassigned YES unset up up

Re: How can I show IP to Switch Port mappings - cisco IOS

I don't know whether you are working on a multilayer switch like the 3550, or a layer-2 switch like the 2950.

If you are using a layer-2 switch, then there is bad news: the method you suggest will not work too well either. The reason is that the arp cache will show you only those hosts that are talking to the switch itself, i.e. management stations, and not the hosts that are talking through the switch. For the hosts talking through the switch, the switch does not need to know anything about the IP-to-MAC mapping, so the ARP cache will be almost empty.

In this case, your best bet is to get the IP-to-MAC mapping by looking at the ARP cache on your router, then going to your switch to map the MAC address to the switch port. This does kind of assume that the host is using the router to get out of its subnet - if not you are out of luck. You could also ping the host from a PC on the same subnet, then look at the ARP cache on the PC.

If you have a multilayer switch, then at least both router and switch functions are in the same box, which makes life easier.

Also, if you have a Network Management System, this will usually do such tasks for you.

Hope this helps.

Kevin Dorrell


Re: How can I show IP to Switch Port mappings - cisco IOS


as kevin said, during the manual process, it will be a 2 step procedure...

1) give a sh arp and see the mac address (in case of layer 3 switches & routers)

2) give show mac-address table | include x.x.x.x (mac) or show cam dynamic (incase of catalyst) to see the port in which they are connected...

if you use tools like cisco works, on the topology service, you can see both the ip address and the port connected directly.. this is only in case of such network management devices , which are automated to do this !!!

hope this helps ..

Re: How can I show IP to Switch Port mappings - cisco IOS


there is also

trace mac ip ...

usefull command on Cat3550.