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

Unanswered Question
Nov 15th, 2004

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

I have this problem too.
0 votes
  • 1
  • 2
  • 3
  • 4
  • 5
Average Rating: 0 (0 ratings)
amitsin Mon, 11/15/2004 - 13:50

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 Tue, 11/16/2004 - 00:15

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

sachinraja Tue, 11/16/2004 - 01:38

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

milan.kulik Tue, 11/16/2004 - 08:15

Hi,

there is also

trace mac ip ...

usefull command on Cat3550.

Regards,

Milan

Actions

Login or Register to take actions

This Discussion

Posted November 15, 2004 at 1:03 PM
Stats:
Replies:4 Avg. Rating:
Views:2558 Votes:0
Shares:0
Tags: No tags.

Discussions Leaderboard

Rank Username Points
1 2,069
2 1,732
3 1,675
4 1,624
5 1,529