Thread: An Important fact

  1. #1
    Registered User
    Join Date
    Oct 2007

    An Important fact

    Hi Folks,

    All of us knows that we use UDP protocol in DNS Server.

    BUT, there is a situation when we use TCP in DNS Server. That situation is something about truncating.

    Can anyone put more lights on this concept and come out with an explaination that WHEN and WHY we use TCP in DNS.

    -- Cavestine

  2. #2
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    A single UDP packet cannot be larger than 512 bytes. If the response doesn't fit into that, the request has to be done via TCP.
    All the buzzt!

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

  3. #3
    Sasquatch mog's Avatar
    Join Date
    Dec 2006
    Caves of Narshe
    TCP must be used in zone-transfers between master and slave -servers.
    If the TC-bit is set in the response to the resolver, it could either query again for the missing information or switch to TCP and do the same query again.

    A good resolver do not switch to TCP if you ask me.
    According to my (not huge, but i have developed some dns-clients) experience this rarely happens because if one host/domain/tld exists more than one time in a package it contains a "pointer" to the first place it occured instead of the whole name again.
    Most of the time the domain and tld are the same for all servers related to the response so 512 bytes is often more than enough.

    UDP use only two packets for a query and TCP use around 13 packets, so ask again for only the missing information is highly recommended.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. What Is Important In Making Games?
    By Krak in forum C++ Programming
    Replies: 6
    Last Post: 05-07-2004, 08:12 PM
  2. a simple fact about chess
    By DavidP in forum A Brief History of
    Replies: 11
    Last Post: 07-01-2002, 08:09 PM
  3. Planned Development Community Idea (important)
    By cozman in forum A Brief History of
    Replies: 2
    Last Post: 06-12-2002, 12:13 PM
  4. Most important element of a game?
    By Eber Kain in forum Game Programming
    Replies: 24
    Last Post: 01-11-2002, 03:04 PM