11-15-2004 01:03 PM - edited 03-02-2019 07:58 PM
- 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.
11-15-2004 01:50 PM
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
11-16-2004 12:15 AM
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
11-16-2004 01:38 AM
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 ..
11-16-2004 08:15 AM
Hi,
there is also
trace mac ip ...
usefull command on Cat3550.
Regards,
Milan
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide