cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
17403
Views
0
Helpful
4
Replies

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

monkp
Level 1
Level 1

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

4 Replies 4

amitsin
Cisco Employee
Cisco Employee

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 192.168.1.30 YES NVRAM up up

Vlan2 192.168.2.30 YES manual administratively down down

FastEthernet0/1 unassigned YES unset up up

Kevin Dorrell
Level 10
Level 10

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

Luxembourg

hi..

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

Hi,

there is also

trace mac ip ...

usefull command on Cat3550.

Regards,

Milan

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: