arp question

Unanswered Question
Oct 26th, 2007

host A and B are in different subnet, connected like the following:

host A-----sw1------(fa0/0)Router1(fa0/1)-----sw2-----host B

A first pings B, and succeed. After this,what is in A's arp table?

I know MAC of router1's fa0/0 will be in A's arp table, but which IP address it will associated with? IP of fa0/0 or IP of host B?

The following is my thought. When A tried to ping B, but without the knowledge of B's MAC. It generated an ARP flooding in its subnet, asking for B's MAC. Since no one else knew this IP, except fa0/0 of router1 knew it is in another subnet. So fa0/0 will reply the ARP request with its own MAC. Then A will record fa0/0's MAC associated with B's IP in its ARP table. Is this right? (the answer gave me the different way, it says A will record fa0/0's MAC with fa0/0's IP in its arp table.)

I have this problem too.
0 votes
  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 0 (0 ratings)
scottmac Fri, 10/26/2007 - 10:24

The host knows nothing of any other LAN / Segment / Broadcast domain. All it knows, and all it can decide on is "Is this request Local (in my broadcast domain, ARP) or is it remote (outside my broadcast domain, send to Default Gateway).

The ARP table of the router will show the MAC of each interface associated with the IP address of that interface, and any other MACs & IP addresses it sees and the interface that saw it.

So, even though the destination exists on the same device (Router1 in your example), HostA decides that HostB is not Local, and forwards the packet (inside an Ethernet frame with the Default Gateway's MAC, but HostB's IP address) to Router1{fa0/0), the Default Gateway.

The router strips the Ethernet Frame, looks at the Destination IP address and sees that it belongs to a Directly Connected LAN segment.

Router1 (if ncessary) does an ARP process to get the MAC of HostB, then re-encapsulates the Packet (all IP addresses remain the same) in a new Ethernet Frame with HostB's MAC as the destination and Router1{fa0/1)'s MAC as the source and puts it on the wire.

It is up to the router to decide where the destination LAN is and get the packet there. The last router/L3 device (the one that has a Directly Connected broadcast domain containing the destination host) is the device responsible for ARPing (if necessary) and putting the packet on the wire aimed directly at the destination host.

All intermediate routers only look at the "network" portion of the address to see which path it should use to forward the packet.

Hope this helps, Good Luck


xs_echoss Fri, 10/26/2007 - 10:45

Thanks for your explanation. But still, what is in the host A's ARP table, not the router's?


This Discussion