RedHat6.2 server configuration solution (1): DNS

Source: Internet
Author: User
Tags nameserver
Article Title: RedHat6.2 server configuration solution (1): DNS. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
Author: Tang haijing
  
Chapter 1: DNS
1.1 Introduction
The most basic service in a TCP/IP network is domain name resolution. That is, you can access your website through IP or URL. In addition, domain name resolution should also provide users with the naming service, that is, the user executes ftp 192.168.10.1 and executes ftp thj is the same.
  
1.2 Required System Resources
1.2.1 configuration file:
  
File Name Source
  
/Etc/named. conf caching-nameserver-6.2-2.noarch.rpm
  
/Etc/named. boot caching-nameserver-6.2-2.noarch.rpm
  
/Etc/hosts system comes
  
/Etc/host. conf system comes
  
/Etc/resolv. conf system comes
  
/Etc/nsswitch. conf glibc-2.1.3-15
  
/Var/named. local caching-nameserver-6.2-2.noarch.rpm
  
/Var/named. ca caching-nameserver-6.2-2.noarch.rpm
  
/Var/named/name2ip. conf administrator create
  
/Var/named/ip2name. conf administrator create
  
1.2.2 related tools:
  
File Name Source
  
/Etc/rc. d/init. d/named bind-8.2.2_P5-9
  
/Usr/bin/nslookup bind-8.2.2_P5-9
  
Bind-8.2.2_P5-9/usr/sbin/ndc
  
1.3 configuration Scheme
The configuration of the DNS server involves five main files, and four other files are also related to DNS:
  
1./etc/named. conf configuration file
  
Role: defines the basic parameters and source points of the domain database information. The file can be stored on a local or remote server.
  
Instance:
  
Options {
  
Directory "/var/named ";
  
# Defines the path for named to read and write files
  
};
  
Zone "."{
  
Type hint;
  
# Indicates that the file used to initialize the Domain Name Server at startup is a clue file,
  
Each server has a clue area.
  
File "named. ca ";
  
# Specify the file name to be read
  
};
  
Zone "0.0.127.in-addr. arpa "{
  
Type master;
  
# Indicates that the server is a primary Domain Name Server
  
File "named. local ";
  
};
  
Zone "mycompany.com" in {
  
Type master;
  
File "name2ip. conf ";
  
};
  
Zone "10.168.192.in-addr. arpa "{
  
Type master;
  
File "ip2name. conf ";
  
};
  
2./var/named/name2ip. conf forward parsing File
  
Role: defines domain information, implements the image between the host name and address, recognizes the mail server, and provides various domain information.
  
Instance:
  
@ In soa thj.mycompany.com. root.thj.mycompany.com.
  
# All partition files start with SOA, @ specifies the current information source, thj.mycompany.com
  
This value can be used to connect the domain name with named. conf. There is usually only one @ symbol.
  
(2000062900; serial # serial number
  
28800; refresh # refresh cycle, in seconds
  
14400; retry # cycle
  
3600000; expire # Stop Time
  
86400); minuum # time-to-live time
  
In ns thj.mycompany.com.
  
# Define a Domain Name Server
  
In mx 10 thj.mycompany.com.
  
# Define the email server. "10" indicates the priority. The smaller the value, the higher the priority.
  
Localhost in a 127.0.0.1
  
# Map domains to IP addresses
  
Thj in a 192.168.10.1
  
Www CNAME thj
  
# The two names before and after CNAME are equivalent names
  
Mail CNAME thj
  
3./var/named/ip2name. conf reverse parsing File
  
Purpose: Implement domain name ing of IP addresses
  
Instance:
  
@ In soa thj.mycompany.com. root.thj.mycompany.com.
  
(2000062900; serial
  
28800; refresh
  
14400; retry
  
3600000; expire
  
86400); minuum
  
In ns thj.mycompany.com.
  
In mx 10 thj.mycompany.com.
  
1 in ptr thj.mycompany.com.
  
# Define the inverse relationship, that is, between 192.168.10.1 and thj.mycompany.com
  
Can also be used to define a reverse domain.
  
4./var/named. local host parsing File
  
Purpose: Resolve the return address localhost, that is, 127.0.0.1. The return address is a special convention, that is, the method for processing the local address is the same as that for processing the remote address, this simplifies the processing process and does not necessarily send data to the physical network.
  
Instance:
  
@ In soa localhost. root. localhost .(
  
1997022700; Serial
  
28800; Refresh
  
14400; Retry
  
3600000; Expire
  
86400); Minimum
  
In ns localhost.
  
1 in ptr localhost.
  
5./var/named. ca clue File
  
Purpose: Initialize the buffer information. This file does not need to be changed by the administrator, but comes with the system.
  
Instance:
  
. 3600000 in ns A.ROOT-SERVERS.NET.
  
A.ROOT-SERVERS.NET. 3600000 A 198.41.0.4
  
. 3600000 NS B .ROOT-SERVERS.NET.
  
B .ROOT-SERVERS.NET 3600000 A 128.9.0.107
  
. 3600000 NS C.ROOT-SERVERS.NET.
  
C.ROOT-SERVERS.NET. 3600000 A 192.33.4.12
  
. 3600000 NS D.ROOT-SERVERS.NET.
  
D.ROOT-SERVERS.NET. 3600000 A 128.8.10.90
  
. 3600000 NS E.ROOT-SERVERS.NET.
  
E.ROOT-SERVERS.NET. 3600000 A 192.203.230.10
  
. 3600000 NS F.ROOT-SERVERS.NET.
  
F.ROOT-SERVERS.NET 3600000 A 192.5.5.241
  
. 3600000 NS G.ROOT-SERVERS.NET.
  
G.ROOT-SERVERS.NET. 3600000 A 192.112.36.4
  
. 3600000 NS H.ROOT-SERVERS.NET.
  
H.ROOT-SERVERS.NET. 3600000 A 128.63.2.53
  
. 3600000 NS I .ROOT-SERVERS.NET.
  
I .ROOT-SERVERS.NET. 3600000 A 192.36.148.17
  
. 3600000 NS J.ROOT-SERVERS.NET.
  
J.ROOT-SERVERS.NET. 3600000 A 198.41.0.10
  
. 3600000 NS K.ROOT-SERVERS.NET.
  
K.ROOT-SERVERS.NET. 3600000 A 193.0.14.129
  
. 3600000 NS L.ROOT-SERVERS.NET.
  
L.ROOT-SERVERS.NET 3600000 A 198.32.64.12
  
. 3600000 NS M.ROOT-SERVERS.NET.
  
M.ROOT-SERVERS.NET. 3600000 A 202.12.27.33
  
6./etc/hosts
  
Purpose: map to other major computers on the Internet. It is usually used as a DNS backup, that is, the Hosts table is used when the DNS system encounters a problem.
  
Instance:
  
127.0.0.1 localhost. localdomain localhost
  
192.168.10.1 thj.mycompany.com thj
  
# Since each server has several domain names that correspond to IP addresses permanently, they should be stored in the Hosts table.
  
7./etc/resolv. conf
  
Purpose: Specify the IP address and search sequence of the Domain Name Server.
  
Instance:
  
Domain
  
# Define a local domain name.
  
Search
Related Article

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.