I know that it's possible to whitelist/blacklist IP addresses (for example, only allowing a few external IP addresses to be contacted from within a VPN). But since IP address destinations are the result of the recursive DNS resolution process (from what what I understand at least).

Does this mean that the DNS resolution phase of a network request is completed prior to network communication between a source and destination and therefore a completely separate process from the establishing/maintaining of a connection. Does this mean that IP/TCP is completely unaware of DNS hostname resolution?

Where does DNS resolution occur WRT the TCP/IP stack?

1 Answer 1


DNS resolution sits at the application layer: a host communicates over DNS to a server, which is encapsulated in (usually) UDP (the transport layer), which is encapsulated in an IP packet (the internet layer), which is typically wrapped in an ethernet frame (the link layer) and sent to either a local resolver or a local router for forwarding to a resolver.

But, exactly as you say, this happens before the main TCP connection. For example in a web connection to www.example.com, the client will do a DNS resolution for www.example.com to get the IP address.

Only after it has the address, the client opens an HTTP connection (application layer) over TCP (transport layer) to the appropriate address over IP (internet layer) over whatever appropriate link (link layer).

  • 1
    Ah. Thank you - my mind is expanded. I did not consider that DNS resolution was in itself an application, and that as such the process utilizes the entirety of the network stack
    – Zach Smith
    Oct 9, 2018 at 20:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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