Basic concepts of Linux DNS (1)

Source: Internet
Author: User
Tags dnssec

650) this.width=650; "src=" Http://img.baidu.com/hi/jx2/j_0028.gif "alt=" j_0028.gif "/> Welcome message, there are any good suggestions can be said. 650) this.width=650; "src=" Http://img.baidu.com/hi/jx2/j_0028.gif "alt=" j_0028.gif "/>

650) this.width=650; "src=" Http://img.baidu.com/hi/jx2/j_0028.gif "alt=" j_0028.gif "/> I do not have this article in place, I hope you give advice. 650) this.width=650; "src=" Http://img.baidu.com/hi/jx2/j_0028.gif "alt=" J_0028.gif "/>

650) this.width=650, "src=" Http://img.baidu.com/hi/jx2/j_0028.gif "alt=" j_0028.gif "/> We progress together. Thank you, Big family . 650) this.width=650; "src=" Http://img.baidu.com/hi/jx2/j_0028.gif "alt=" J_0028.gif "/>



NDS Server

DNS is the domain Name System, It is able to convert the www.lampmaster.cn domain name into an IP address such as 219.136.249.93, and without DNS, when browsing www.lampmaster.cn, it must be accessed using numbers that are so difficult to remember. The DNS server is the one that provides the DNS service.

A DNS server can be divided into three cache servers (cache-only server), a primary server (Primary name server), and a secondary server (Second name server).


DNS role:


Forward parsing: Converting a domain name to a corresponding IP address

Reverse resolution: Convert IP address to corresponding domain name

Domain Name resolution process

Recursive multiple iterations at a time

DNS Usage port:

TCP

UDP

NDS configuration file:


/var/named/chroot/etc/named.conf # Master config file

/var/named/chroot/var/named # zone file directory

/var/named/zonefile # data files

/usr/share/doc/bind*/sample/ # template files

/var/log/messages # log file

/var/named/chroot/etc/named.caching-nameserver.conf # Templates

NAMED.CONF Configuration Resolution:


-type: types

-Hint: root zone

-Master: Main zone

-Slave: from region

-Forward: Forwarding Area


The role of DNS resolution:


Forward parsing:

-Find its corresponding IP address based on host name (domain name)

-This is the most basic, most commonly used feature


Reverse parsing:

-find its corresponding host name (domain name) based on IP address

-use in areas such as anti-spam/security protection




DNS Distributed architecture:

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/2F/AB/wKiom1OgZT-BzrUjAAGGaeZxWFM992.jpg "title=" T01ed6a802939766642.png "alt=" Wkiom1ogzt-bzrujaaggaezxwfm992.jpg "/>


DNS Query method:




The contents of the DNS master configuration file are explained below:


[Email protected] ~]# vim/var/named/chroot/etc/named.conf


Options

{

Directory "/var/named"; # working directory, storing data files

Dump-file "data/cache_dump.db"; # Backup files

Statistics-file "data/named_stats.txt"; # statistics File

Memstatistics-file "data/named_mem_stats.txt"; # statistics File

listen-on Port 127.0.0.1;}; # Monitor network interface and port, IPV4

LISTEN-ON-V6 Port:1;}; # Monitor network interface and Port IPV6

allow-query { localhost;}; # Limit who can query

Allow-query-cache { localhost;}; # Restrict who can query the cache

recursion Yes; # whether recursive queries are allowed

Dnssec-enable Yes; # DNS Encryption

Dnssec-validation Yes; # DNS Encryption

Dnssec-lookaside Auto; # DNS Encryption

};

Zone "." In { # defines the root domain

Type hint; # type hint

File "/var/named/named.ca"; # root Domain information in named.ca

};

Zone "localhost" in {# local positive solution definition

Type master; # type is master

File "localhost.zone"; # Positive Solution file name

};

Zone "0.0.127.in-addr.arpa" in {# local anti-solution definition

Type master; # type is master

File "named.local"; # Anti-Solution file name

};

DNS zone configuration file:

- $TTL (Time Live Lifetime)

- SOA (start of authority, authorization information starts)

-Semicolon "." The starting part represents the comment


1) Forward parsing format:

[Email protected] ~]# cd/var/named/chroot/var/named/

[Email protected] ~]# vim Localdomain.zone


$TTL 86400 # Life cycle of valid records

@ In SOA localhost root (

; Serial (d. Adams) # Update serial number

3H ; Refresh # Update Time

15M ; Retry # retry Interval

1W ; Expiry # Expiry time

1D ); Minimum # life cycle of Invalid records

In NS localhost

localhost In A 127.0.0.1

Comments:

NS : Represents the name server record

A : Address record, used in forward parsing area


2) Reverse parsing format:

[Email protected] ~]# cd/var/named/chroot/var/named/

[Email protected] ~]# vim named.local

$TTL 86400 # Life cycle of valid records

@   In SOA localhost root (

; Serial (d. Adams) # Update serial number

3H ; Refresh # Update Time

15M ; Retry # retry Interval

1W ; Expiry # Expiry time

1D ); Minimum # life cycle of Invalid records

In NS localhost.

1 in PTR localhost.

Comments:

PTR : represents a pointer (point) record, used in the reverse resolution zone, where the first column specifies the host address portion of the IP address.

Pan Domain name resolution:


$ GENERATE 1-200 Station$ in A 192.168.4. $

$ GENERATE 1-200 $ in PTR station$. baidu.com


$ GENERATE# functions

1-200# variables to loop

Station$# host Name

192.168.4.$# corresponding IP address


This article is from the "Dragon" blog, make sure to keep this source http://1208073155.blog.51cto.com/9039381/1427351

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.