View Full Version : Dns over tcp/udp
ghmajeed
Mar 6, 2006, 06:00 AM
Dear Sir
How DNS works over both TCP & UDP. What are the cases that dns use tcp instead of udp.
ScottGem
Mar 6, 2006, 06:46 AM
DNS is Domain Name Services. This is the system used by the Internet to transalate URLs into the physical address of the Machine. There are a bunch of DNS servers run by VeriSign across the net. Local ISPs will replicate with those services as needed. When you plug a URL into a browser, the browser first queries your local POC, then your ISP's DNS, then the root DNS servers until it finds a match for the URL and get the IP for it.
ghmajeed
Mar 7, 2006, 05:16 AM
Sorry, I will write the question in another way, how DNS can use both TCP and UDP? Or why all other services (DHCP, FTP.. ) associate with either TCP or UDP, while DNS associates with both?
ScottGem
Mar 7, 2006, 06:44 AM
You are mixing apples and oranges. I explained what DNS is. The request is made by some software, usually a browser, but sometimes an FTP client or maybe just a ping. When the request is made the software making the request detects whether you are calling an IP address or a URL. If tis a URL, then it looks through the DNS system until it finds a match and returns an IP. The software calling the address, then starts pulling what it needs from that IP.
I'm not that familiar with UDP, But UDP is generally used when small packets of data are sent. This is because that UDP, unlike TCP, can't breake the packets into smaller chunks and reassemble them.
You might want to do some googling of TCP, UDP and DNS to understand this more.
cajalat
Mar 7, 2006, 07:08 PM
sorry, I will write the question in another way, how DNS can use both TCP and UDP? or why all other services (DHCP, FTP..) associate with either TCP or UDP, while DNS associates with both?
DNS lookups use UDP port 53 while DNS zone transfers use TCP port 53.