Let's say i have the following WAN:
Suppose that all arp tables are empty and that E wants to send a packet to A.
- The E will send an arp request with destination ip of Router 2(unicast), get its mac and send it the packet.
- Router 2 will receive the packet, finds the packet's subnet next hop using BGP using past calculations, in this case Router 1, then using its intranetwork protocol(RIP,OSPF) find that Router 1 is the next router and then it makes arp request with the address of Router 1 in order to get its mac. Then it sends the packet with the new ethernet addresses to Router 1
- Router 1 receives the packet, recognize that it belongs to its own subnet and makes an arp request using the destination ip address of A. After that it delivers the packet A.
I would like to know if the procedure flow is correct.
a)Also if the E got its ip manually (not with DHCP), it would need to broadcast the arp request.
Am i right? (since it wouldn't know the network mask)
Thank you.
Best Answer
You're almost 100% correct. Slight corrections bolded below:
ffff.ffff.ffff
, which would indeed make it a broadcast. Router2 responds unicst with its MAC address, and HostE generates the packet with a Source and Destination IP of 192.168.3.1 and 192.168.1.1, and a Source and Destination MAC of 7777.7777.7777 and 8888.8888.8888 (respectively).And to answer your last question. Whether HostE gets its address from DHCP or not, the process flow would appear as above if HostE did not have an entry in its ARP Cache for Router2's MAC address.
IF, Router2 was the DHCP Server (which it doesn't have to be). And Router2 just assigned HostE its address. Then theoretically, HostE would know Router2's MAC address. But ARP entries don't last forward, particularly on clients. For example, my Windows 7 laptop keeps ARP entries for only 34.5 seconds (see below).
So even if Router2 was the DHCP server, and gave HostE its IP address, sooner or later HostE's ARP cache would time out, and it would have to run the broadcast ARP request all over again, just like if HostE had always only had a static IP assigned.