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

Unanswered Question
Nov 15th, 2004
User Badges:

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

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 0 (0 ratings)
amitsin Mon, 11/15/2004 - 13:50
User Badges:
  • Cisco Employee,
  • Events Top Contributors,


  • Events Top Contributors,


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

Kevin Dorrell Tue, 11/16/2004 - 00:15
User Badges:
  • Green, 3000 points or more

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


sachinraja Tue, 11/16/2004 - 01:38
User Badges:
  • Red, 2250 points or more


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

milan.kulik Tue, 11/16/2004 - 08:15
User Badges:
  • Red, 2250 points or more


there is also

trace mac ip ...

usefull command on Cat3550.




This Discussion