ARP Questions

ARP Questions

by Devrim Celik -
Number of replies: 1
Hello,
I think I am missing something crucial. Looking at homework sheet 8, I tried to do the tasks, but encountered the following question:

In the last task "wrapping up", I understand that we first have to send out an ARP broadcast for the MAC address of our local gateway, but why do we need the ARP address of the local DNS server? I thought, because we configured a local gateway, we send the gateway a packet of the form (Src. IP: Our IP | Dst. IP: local DNS | Src. MAC: Our MAC | Dst. MAC: Gateway MAC) and the gateway will take care of the MAC address resolution.

Furthermore, why are the packets in this task only encapsulated in an Ethernet frame on my local subnet and not anymore, once they pass the first hop router (where they are in IP frames).


Thanks in advance!
In reply to Devrim Celik

Re: ARP Questions

by Katerina Argyraki -

Nothing crucial, if I read your question correctly.

Q1: "In the last task "wrapping up", I understand that we first have to send out an ARP broadcast for the MAC address of our local gateway, but why do we need the ARP address of the local DNS server?"

The solution makes an underlying assumption that (a) your laptop's local DNS server is in the same IP subnet, while (b) the web server hosting the target URL is in a foreign IP subnet. With that said:

The problem statement says that you type a URL in your web browser. This means your laptop needs to know the IP address of the corresponding web server (in order to establish a TCP connection with it etc). How does your laptop get the IP address of the web server? It asks the local DNS server. To do that, it needs to know the MAC address of the local DNS server. That's why it ARPs for it.


Q2: "I thought, because we configured a local gateway, we send the gateway a packet of the form (Src. IP: Our IP | Dst. IP: local DNS | Src. MAC: Our MAC | Dst. MAC: Gateway MAC) and the gateway will take care of the MAC address resolution."

I think the confusion comes from the fact that, in this problem, the local DNS server is in the local IP subnet. Hence, the destination MAC address must be the MAC address of the DNS server.

I think what you have in mind is that the DNS server would be in the neighboring IP subnet, so your laptop would send a packet as you describe and then the default gateway would ARP for the MAC address of the DNS server -- right? This would certainly be correct if the DNS server was in the neighboring IP subnet.


Q3: "Furthermore, why are the packets in this task only encapsulated in an Ethernet frame on my local subnet and not anymore, once they pass the first hop router (where they are in IP frames)?"

If the next IP subnet is an Ethernet (as is typically the case), the packets are encapsulated in an Ethernet frame everywhere. It's just that they get decapsulated at the edge of the local IP subnet (at the default gateway) and encapsulated again.