cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
4342
Views
0
Helpful
8
Replies

How to relate a MAC address to an IP address

e-alvarez
Level 1
Level 1

Hi,

I need to relate a mac address to an IP address on a 3560 switch. The problem I have is that the arp table only has three addresses and the mac address I need is not one of them.

#sh arp

Protocol Address Age (min) Hardware Addr Type Interface

Internet xx.zz.44.10 223 000e.8307.8261 ARPA Vlan160

Internet xx.zz.160.1 - 0019.56a6.6541 ARPA Vlan160

Internet xx.zz.160.15 5 0018.8b43.3a54 ARPA Vlan160

sh mac add

Mac Address Table

-------------------------------------------

Vlan Mac Address Type Ports

---- ----------- -------- -----

161 0004.0df8.995b DYNAMIC Gi0/1

161 0004.0df8.995c DYNAMIC Gi0/1

161 0004.0dfb.e7e8 DYNAMIC Fa0/10

161 0004.0dfb.e7ef DYNAMIC Gi0/1

161 0004.0dfb.e844 DYNAMIC Gi0/1

161 0004.0dfb.ece5 DYNAMIC Fa0/11 <------------- I need the IP for this

161 0004.0dfb.ed27 DYNAMIC Fa0/9

I will appreciate any ideas as to how to proceed.

Thank you all.

1 Accepted Solution

Accepted Solutions

Eduardo

The response from Mat is on the right approach. Perhaps we can clarify the underlyig principles: the arp table on a layer 2 switch shows only IP addresses that have been accessed by the management interface of that switch (in this case the management interface seems to be on VLAN 160). Since the address you are interested in seems to be in VLAN 161 it is not included in the arp table of the switch. To find the IP address associated with the MAC address you need to go to the layer 3 interface that is forwarding for VLAN 161 and look at its arp table.

HTH

Rick

HTH

Rick

View solution in original post

8 Replies 8

crow930us
Level 3
Level 3

Switches usually only work at layer 2 and ports aren't associated with IP addresses. The IP addresses you have listed are associated with vlan160.

Using show IP interface brief will show which IP addresses are associated with which interfaces

In addition ..

What is the upstream router connected to this device? or if your switch is the L3 device you can simply issue "show ip arp " to get its associated IP address if any configured in the host.

e.i

from the upstream router

show ip arp 0004.0dfb.ece5

Rgds

Jorge

Jorge Rodriguez

Davy Ad
Level 1
Level 1

Hi,

Do Show ip arp

This will give you the ip with the mac.

HTH

David

The IP address you look for is in Vlan 161. The show ip arp output only shows entries from Vlan 160. I assume that you don't have a vlan interface for Vlan 161 on the 3560. Therefore you probably go for the device that does the routing for Vlan 161. In that device normally you can find the IP address in the ARP table. If it is not there you might perform a ping to the broadcast address of the IP subnet of Vlan 161 on the default gateway. Then you probably get the IP address you are looking for.

HTH.

mat

Thank all you for your ideas. I'll give them a try next Wednesday when I'm back in the office and keep you posted.

Thanks again.

Eduardo

The response from Mat is on the right approach. Perhaps we can clarify the underlyig principles: the arp table on a layer 2 switch shows only IP addresses that have been accessed by the management interface of that switch (in this case the management interface seems to be on VLAN 160). Since the address you are interested in seems to be in VLAN 161 it is not included in the arp table of the switch. To find the IP address associated with the MAC address you need to go to the layer 3 interface that is forwarding for VLAN 161 and look at its arp table.

HTH

Rick

HTH

Rick

Thanks to everyone for your valuable comments. Taking part of the answers provided by all of you, I foun that I needed to go one step further. I did a #sh mac-address-table vlan 161, which showed me the MAC address I was interested in, and also showed me the outgoing port. Then I telnetted to that other device, and there I found the port that had connected the router taht in turn had connected the server. Thanks to all of your comments, I learned a bit more about switching! (Did I mentioned I was a newbie? :-) Thanks again to everyone.

Eduardo

I am glad that you got it figured out and that our responses were helpful. Thank you for posting back to the thread indicating that you had figured it out and how you achieved that. It makes the forum more useful when people can read about an issue and can read how someone solved the issue. Also thank you for using the rating system to indicate that your issue was resolved (and thanks for the rating).

HTH

Rick

HTH

Rick
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:

Review Cisco Networking products for a $25 gift card