Saturday, March 12, 2011

DNS Message format:


DNS Message format:


BitsNameDescription
0-15IdentificationUsed to match responses to requests. Set by client and returned by server.
16-31FlagsTells if query or response, type of query, if authoritative answer, if truncated, if recursion desired, and if recursion is available.
32-47Number of questions
48-63Number of answer RRs
64-79Number of authority RRs
80-95Number of additional RRs
96-??Questions - variable lengthsThere can be variable numbers of questions sent.
??-??Answers - variable lengthsAnswers are variable numbers of resource records.
??-??Authority - variable lengths
??-??Additional Information - variable lengths

Question format includes query name, query type and query class. The query name is the name being looked up. The query class is normally 1 for internet address. The query types are listed in the table below. They include NS, CNAME, A, etc.

The answers, authority and additional information are in resource record (RR) format which contains the following.
  1. Domain name
  2. Type - One of the RR codes listed below.
  3. Class - Normally indicates internet data which is a 1.
  4. Time to live field - The number of seconds the RR is saved by the client.
  5. Resource data length specifies the amount of data. The data is dependent on its type such as CNAME, A, NS or others as shown in the table below. If the type is "A" the data is a 4 byte IP address.
The table below shows resource record types:

TypeRR valueDescription
A1Host's IP address
NS2Host's or domain's name server(s)
CNAME5Host's canonical name, host identified by an alias domain name
PTR12Host's domain name, host identified by its IP address
HINFO13Host information
MX15Host's or domain's mail exchanger
AXFR252Request for zone transfer
ANY255Request for all records

Usage and file formats

If a domain name is not found when a query is made, the server may search for the name elsewhere and return the information to the requesting workstation, or return the address of a name server that the workstation can query to get more information. There are special servers on the Internet that provide guidance to all name servers. These are known as root name servers. They do not contain all information about every host on the Internet, but they do provide direction as to where domains are located (the IP address of the name server for the uppermost domain a server is requesting). The root name server is the starting point to find any domain on the Internet.



Page 2

     < Previous                    Read More                           Next >


0 comments:

¿Te animas a decir algo?

My Headlines

                                                                                                                                                                            Enter Donation Amount:

 Pleas Donate here if you like our  you can Donate by your Alert Pay if don't have already you can create one here

About Me

ajab khan
Hi there!
I'm Ajab Khan,29, Pakistani Citizen living at Lahore, Pakistan. Currently Working at University of the Punjab, Pakistan.
Started blogging since July 14, 2010 I have several blogs and first article was about how to use your mobile as a webcam you can access that article here, I love to collect interesting data if you like to share with me you can contact me by email  here is the id ajabbiz@yahoo.com