Finding IP addresses on a switch

  • 0
  • 1
  • Question
  • Updated 1 year ago
  • Answered

Does anyone know of way to find the IP addresses and the port that IP address is connected on a switch? Using either CLI or EMC?  I know the MACs but don't really want to sit there and try to find what MAC goes with what IP, if not I think I would just use compass.  Any ideas?  And thank you guys for the help!!
Photo of Ryan Johnson

Ryan Johnson

  • 80 Points 75 badge 2x thumb

Posted 1 year ago

  • 0
  • 1
Photo of Darin Seiler

Darin Seiler

  • 402 Points 250 badge 2x thumb
Show arp
Photo of David Rahn

David Rahn

  • 1,036 Points 1k badge 2x thumb
switch has to have an ip in the vlan to see arp entries
Photo of Ryan Johnson

Ryan Johnson

  • 80 Points 75 badge 2x thumb
The switch has an ip on a vlan and I want the ip addresses to that switch from that vlan
Photo of Ronald Dvorak

Ronald Dvorak, Embassador

  • 51,328 Points 50k badge 2x thumb
In case it's an XOS here a example....

Photo of Erik Auerswald

Erik Auerswald, Embassador

  • 13,792 Points 10k badge 2x thumb
Hi Ryan,

EMC compass is a good choice if available, because it queries all switches and thus allows to easily correlate the info. EAC (formerly NAC) is a better solution for this.

A pure layer 2 switch may just know the MAC address, but not the IP address of a connected end system. The MAC address may even have timed out. Thus it is not always possible to provide the information you seek.

EOS switches (and EXOS 22.2) provide the so called "Node Alias Table," which saves information about packets seen on switch ports. This can show you which ports an IP address was seen on.

DHCP snooping builds a database of IP to MAC bindings and can be used to connect an IP address to a port on a layer 2 switch.

A layer 3 switch will build an ARP cache. Entries in this cache can time out, just like MAC addresses in the FDB. EXOS will build an ARP cache if it has an IP interface in the VLAN, even if forwarding is not enabled. If the end system is directly connected to the layer 3 switch, the "show arp" output on EXOS and EOS shows the port as well as the ARP information.

In general, you would ping the device (to refresh ARP and MAC tables), query the layer 3 switch for the MAC address, then follow the FDB entries for the MAC address just found out to the access switch the end system is connected to. That works for every vendor, but requires that the end system is currently connected correctly and responding to pings.