Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

At what layer in the protocol stack does DNS happen? [closed]

Tags:

http

tcp

dns

Let's use a browser as an example. HTTP requests do not need to contain any IP addresses. So would www.example.com be translated into an IP address at the TPC layer?

EDIT

Seems like DNS is used to tell TCP which IP address to connect to. So does HTTP call DNS?

With this stack:

HTTP


DNS


TCP

like image 597
user2939415 Avatar asked Feb 09 '14 02:02

user2939415


1 Answers

DNS is a protocol that arguably sits at the application-level, but is a separate application in and of itself that makes use of the whole TCP/IP "stack". (LDAP is similar, if that helps "place" DNS.) It's a fundamental "phone book"-like directory for the Internet and has absolutely nothing specific to do with the HTTP protocol. DNS uses UDP and TCP transport to query other distributed DNS servers to answer client questions like "what IP addresses are associated with the name www.google.com?". Once a client application, like a web browser, has an IP address with which to connect, DNS is then out of the picture. The browser opens up a TCP connection to the IP address and then initiates the HTTP protocol over that TCP transport session to talk web stuff.

like image 72
milli Avatar answered Oct 11 '22 01:10

milli