MAC to IP mapping

Jan 11, 2006 7 Replies

We have catalyst 3500xl switches running c3500xl-c3h2s-mz.120-5.WC13.bin. If I issue a show mac I get which mac address of a client PC is attached to which fast ethernet port. However, I would like to find out the IP as well. I currently use LanSpy to match the mac from the switch command to the ip attached to the mac in LanSpy. Is there a more detailed option in the switch to see which port has which IP? Any help is appreciated.



No. Switches are L2 devices so their world revolves around MAC addresses. To resolve a MAC address to an IP address you need to reference a routers' ARP table. ARP tables map L2 addresses (MAC) to L3 addresses (IP). We do this in PERL with NETSNMP.

No kidding! Are you telling me that if I ping a device from the switch, the switch won't have an entry in its OWN ARP table, mapping IP to MAC, even if it is not a router?

On 13.01.2006 03:11 papaia wrote

Actually, a switch does not need an IP address to do its work. Hence no need to have an ARP table. Of course if the switch has an IP addess for

*management* purposes, it will also maintain its own ARP table. But typically you only see the per Vlan MAC table.

Arnold

I did NOT say that a switch needs an IP address to do its work, I said "if I can ping ... from ..." which implies association of an IP address with the switch, as ICMP runs ON TOP of IP (the "ping .... from" part). This just for clarification.

As far as [being willing to be] using a 3500 switch w/out remote management (aside from a terminal server for console connnection, just to cover our basis), thus w/out an IP - I will leave this up to those who want to do that ...

Does the switch -have- an IP? Deos the switch -have- a ping facility? Does the switch have a way to show its "OWN ARP table"? Does the switch offer SNMP? Does the switch tell the truth about the port number of devices that are talking to the switch itself?

Unmanaged switches are plentiful these days, and they don't have IPs.

Configurable consumer-level switches usually don't offer SNMP or a way to examine the ARP table.

Managed switches with SNMP -often- offer a standard MIB that would allow their ARP table to be examined; sometimes it's a custom MIB though, and sometimes it just isn't there.

When switches do have appropriate MIBs, it is not particularily uncommon for them to indicate that the port being used to talk to the remote device is one of: the first port; the last port; or a "pseudo-port" that exists just for management purposes (or to make implementations easier.)

!!!!!!!!!!!!!!!!

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

This thread is becoming really funny ;)

Not really. You do not appear to be the original poster with the 3500xl, so when -you- posted talking about the ARP behaviour on pinging from "the" switch, your post became a general comment about switches rather than a reference to the 3500xl with some particular IOS version.

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required