DNS Server Configuration

Source: Internet
Author: User
DNS server configuration-Linux Enterprise Application-Linux server application information. For details, refer to the following section. Configure the DNS server in Linux



1. Basic concepts of domain name resolution
1. Meaning of domain name resolution
Converts a domain name to an IP address.
2. domain name resolution Method
HOSTS file: applicable to small networks (text files)
NIS Server: resolution record for stock placement, applicable to medium network.
DNS server: stores directories in stock and performs distributed resolution.
2. Working System of DNS
1, composition;
(1) domain name space;
It is a logical space of a hierarchical tree structure supported by DNS.
For example, WWW. LINUX. NET
. ____ Root Domain
Net com edu org ____ top-level domain
Linux 163 --- subdomain
Www mail --- host
(2) DNS Server
1. function: stores region files and domain name resolution.
2 Category: primary DNS server: stores region files for domain name resolution.
Secondary DNS server: backs up the region files in the primary DNS without parsing them.
Express cache DNS server: temporarily stores resolved domain names.
(3) Client Configuration:
Purpose: provide query requests.
2. DNS resolution process
(1) Forward parsing:
Portal
The client sends a request.
Request Remote DNS Server
Query whether the name is in the region under its jurisdiction.
Yes. Otherwise, the next DNS server has a host.
Which of the following methods cannot be correctly parsed?
Recursion
(2) anyway
Use the in-addr.arpa reverse pointer to direct an IP address to the domain name.
Iii. DNS Configuration:
1 install bind software (9.0)
# Rpm? Ivh bind
Related Files:
/Etc/named. conf
/Etc/rc. d/init. d/named
/Var/named. ca
/Var/named/localhosts. zone
/Etc/resolo. conf
/Etc/host. conf
/Var/named. conf
/Var/named. local
2. Modify named. conf.
Content:
Option {
Option;
............
}
Zone {
Option ......
}
Include "……"
Note:
(1) option declaration:
Purpose: Define DNS attributes.
Format: option {
Directory "/var/named ";
# Define the storage location of regional files.
(2) zone Declaration:
Purpose: define a region
Format: zone "region name" IN {
Type _ master
Type-slave
# Define the region type
File "file name ";
# Define the region file name.
Include Option
# Contains the configuration file.
(1) Establish a forward Region
Linux.net and reverse regions point to 192.168.0.0./24
# Vi/etc/named. conf
The modified file content is as follows:
Option {
Directory "/var/named ";
};
Forward domain: zone "." IN {
Type: hint;
File: "/named. ca ";
Zone "localhost. zone ";
{
Type master;
File "localhost. zone ";
Reverse region: zone "0.0.0.127.in-addr. arpa" IN {
Type master;
File "named. local ";
Zone "linux.net" in {
Type master;
File "linux. zone ";
Zone "0.168.192.in-addr. arpa" in {
Type master;
File "linux. rev ";
};
Include "/etc/rndc. key ";
(2)
Create a region file;
Function: stores region information records.
Format: composed of several records
[Name] [ttl] [in] [type] [value]
(3) reverse region file mainly consists of soa ns ptr records.
DNS configuration instance:
1 requirement: Create a forward region file (linux.cn)
The details are as follows:
(1) authorize linux.cn to the host www.linux.cn. And Administrator mail is admini@linux.cn
(2) The Domain Name Server in the linux.cn region is 192.168.0.1.
(3) ip address of the linux.cn domain: 192.168.0.1,
(4) set the www ip address of the host to 192.168.0.1.
(5) Create the host www alias as mail.
2 requirements: Create a reverse regional file linux. rev
The details are as follows:
(1) authorize www.linux.cn administrator mail as root@linux.cn
(2) host points to www.linux.cn
@ In soa localhost root
Www.linux.cn.
. Root.linux.cn.
Id in ns 192.168.0.1
In prt www.linux.cn.
4. Start dns records
#/Etc/rc. d/init. d/named start
4. DNS Client Configuration:
1. Windows System Configuration:
2. Unix/linux operating system configuration
# Vi/etc/host. conf
Order hosts. bind
# Vi/etc/resolv. conf
Nameserver
V. Test the DNS server:
1. nslookup
# Nslookup
> Linux.cn
6. Case study:
The bind software is used to create a dns server for the active mobile dns.linux.net host;
The specific requirements are as follows:
(1) The server is responsible for parsing the forward region linux.net, And the ip address is 192.168.3.1
(2) the mail server in the linux.net region is 192.168.30.2.
(3) There is a record in the linux.net region that is www.linux.net ip: 192.168.3.1 mail.linux.net ip: 192.168.3.1.
(4) set the dns server ip address of the dns.linux.net host to 192.168.3.1.
Configuration process:
# Vi/etc/named. conf
Add the following content to the file:
Zone "linux.net" IN {
Type master;
FILE "LINUX. ZONE ";
};
# Cd/var/named
# Cp localhost. zone linnx. zone]
# Vi linux. zone
$ TTL 886400
$ Origin linux. NET-(1)
@ Id soa @ ROOT
Id in ns 192.168.3.1
Id in a 192.168.3.1
WWW. in a 192.168.3.1
Mail in a 192.168.3.1
LINUX. net in mx 8 192.168.3.2
# Vi/etc/resolv. conf
Add the following options:
Nameserver 192.168.3.1

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.