DNS protocol analysis experiment

1. Experimental principle

1. Introduction to the protocol
DNS (Domain Name System) is the English abbreviation of "Domain Name System", using port 53 of the UDP protocol.

  • DNS function:

Resolve the server domain name address in string form to an IP address.

2. Domain classification
(1) Root domain: Marked as (.) dot, 13 groups of root domain name servers in the world are named in sequence from English letters A to M.
(2) Top Level Domain: Top Level Domain (TLD) is divided into three categories:
1> Generic Top Level Domain
2> National Top Level Domain
3> Reverse Domain (Infrastructure Top Level Domain)
(3) Authorized Domain Name Server: Responsible Domain name resolution work for a zone.
(4) Local domain name server: When a host sends a DNS query request, the query request is first sent to the local domain name server.
3. Types of DNS server query
(1) Recursive query: The client only sends a request once, and the DNS server will query and return the result.
(2) Iterative query: multiple requests are required to query different DNS servers.
4. DNS name resolution method
(1) Forward resolution: convert FQDN into IP.
(2) Reverse analysis: Convert IP to FQDN.
5. DNS domain name service components
(1) The domain name space and related resource records (RR)
constitute the distributed database system of DNS (an inverted tree).
(2) DNS name server The server that
maintains the distributed database system of DNS.
The system is queried to answer query requests from DNS clients.
(3) DNS resolver
A process in the DNS client to help the client access the DNS system and issue a name query to obtain the resolution result.

2. Experimental configuration

1. Experimental topology diagram
Insert picture description here
In this experiment, two clients, a DNS server and an HTTP server are used. This switch is used as a two-layer switch here without configuration.
2. Experimental steps
1. Configure the client's IP address and domain name server;
2. Configure the HTTP server's IP address;
3. Configure the file root directory of the HTTP server;
4. Test the connectivity between the client and the server;
Insert picture description here
5. Configure The IP address of
the DNS server ; 6. Add a host domain name and the corresponding IP address on the DNS server;
Insert picture description here
here, I added a domain name of www.baidu.com, and its corresponding IP address is 192.168.1.100.
7. Start the DNS server and HTTP server;
8. Visit www.baidu.com on Client2;
Insert picture description here
9. While doing the previous step, perform group capture at G0/0/1;
Insert picture description here

3. Experimental results

1. Packet captured by packet
Insert picture description here
2. Packet analysis

The specific process can be described as follows: the
host 192.168.1.15 queries the DNS server 192.168.1.20; the
DNS server performs the query; the
DNS server finally tells the query result to 192.168.1.20.

  • Request message

Insert picture description here
Questions represents the number of query question area sections, Answers represents the number of answer areas, Authoritative namesversers represents the number of authorized areas, and Additional recoreds represents the number of additional areas.
Type A: Obtain IPv4 address by domain name
Class IN: Query type, for Internet information, always IN

  • Response message The
    Insert picture description here
    response message is similar to the request message, with an additional piece of response information.

Guess you like

Origin blog.csdn.net/weixin_44366125/article/details/105873594