0

I have just started to study networks and I have a confusion about what happens when a default DNS server does iterative queries to other DNS servers to resolve a name in an IP address. I am very confused especially about what happens at the Data link layer during this process. Looking on the internet, books and asking around what I understood is that during the iterative queries the Data link layer is not involved, but what I also know is that a packet, when it is sent, has to travel through all the layers, so also through layer 2. So my confusion is if a default DNS needs to know the MAC address of the DNS at which it asks the iterative query, so if it needs to do ARP requests.

Can someone help me resolve my confusion?

  • Did any answer help you? If so, you should accept the answer so that the question doesn't keep popping up forever, looking for an answer. Alternatively, you can provide and accept your own answer. – Ron Maupin Dec 25 '18 at 9:18
2

The DNS is no different from any other upper layer protocol in this. If it decides to contact another host at some arbitrary IP address a.b.c.d, it constructs its data and sends it to a.b.c.d over appropriate UDP or TCP (or whatever) protocol. The lower layer decides how to send packets to a.b.c.d. If local, will do whatever is normal for that local layer 2: if it's ethernet it will ARP for it; if it's a direct serial link will just send it. If the target address is non-local, it sends the packet along according to its routing table: typically forwarding to a default gateway over whatever kind of link is available.

The whole point of the layers is that we don't think about what a layer 4 protocol (DNS) is doing at layer 2 (ethernet). The DNS software on a given server doesn't even know whether that server even has ethernet: it knows only the IP addresses of other DNS servers, either upstream or root. The ethernet software on a given server pays no attention to the content of the frames and never looks at the insides of a packet except for copying it to the appropriate hardware.

Looked at overall, it's correct to say that the server hardware is running two programs, one of which knows "next nameserver is a.b.c.d" and (on the assumption it's local and connected via ethernet) the other knows "host a.b.c.d has address aa:bb:cc:xx:yy:zz" but no single piece of software has both facts.

  • To those who edited the addresses: it's clearer to use obviously-example type addresses, especially for readers and questioners who are still learning about non-interactions at the level of this question. I have therefore undone this edit. RFCs 5737 and 7042 do not apply here: they only prohibit the use of some special addresses on real networks, there is no suggestion examples are required to use them – jonathanjo Aug 30 '18 at 8:03
  • It is wrong not to use the dedicated addresses for example. Doing like you do means innocent bystander get traffic because people just copy and paste without consideration. Re-reads the RFC and the part it says addresses are reserved for documentation purposes so they completely apply here... – Patrick Mevzek Aug 31 '18 at 1:48
  • It is also incorrect saying 1.2.3.4 is a fake address! Not at all: It exists and is in a block of totally valid addresses, delegated to someone. Just like 1.1.1.1. Also why would suddenly 1.2.3.4 be a fake address and not 5.6.7.8 or any other arbitrary arrangement that you decide regardless of RIRs allocations and IETF clear guidance in RFCs on which blocks are reserved or not? – Patrick Mevzek Aug 31 '18 at 1:50
  • I used as examples the addresses I have found people understand the easiest, over decades of explaining networking. Obviously they are "real", I don't say they aren't. There is nothing to cut and paste in my example, so I don't really see what you are suggesting this causes; and you are inferring something I don't say about 5.6.7.8 etc. – jonathanjo Sep 1 '18 at 7:38
  • I edited the answer to avoid the literals you complained about. – jonathanjo Sep 3 '18 at 9:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.