After two days of efforts to finally the DNS configuration of Aix successfully, my configuration process to write down, and you share, I was a beginner to practice, if there is wrong place, but also please predecessors do not begrudge pen and ink, to correct.
The full name of DNS is: Domain name System
As for his history, use, working principle and so many articles have said, I will not waste everyone's time.
Let me start by talking about my experimental environment:
Aix:os version: AIX 5L for power V5.1
IP address:192.168.0.5
Assume Domain name: king.com
Host Name: pp.king.com
As a domain name server, the ability to have positive and reverse solutions is called a complete server. Now there are many, especially win's DNS server many do not have the ability to reverse the solution.
Let's get to the point.
Set up a complete DNS server mainly requires 6 files:
named.conf #主要的设定文件
named.ca #
Positive solution files on the local side
Anti-Solution files on the local side
Positive solution file for domain name
Anti-solution file for domain name
After an AIX V5.1 installation completes, the DNS software bind has been installed and has been started.
You can use this command to view:
# lssrc-s named
subsystem Group PID Status
named tcpip 15666 Active
The default will be installed two versions, Bind4 and Bind8, of course, now the latest version has bind9, but we use their own bind8 can be.
The system defaults to using Bind4 at the beginning, so we now execute the following command to start using Bind8:
# Rm/usr/sbin/named/usr/sbin/named-xfer
Ln-s/usr/sbin/named8/usr/sbin/named
Ln-s/usr/sbin/named8-xfer/usr/sbin/named-xfer
Check:
# named-v
named 8.2.2-p5+fix_for_cert_till_01_30_01 Sun Apr 8 08:05:23 CDT 2001
build@builder07.austin.ibm.com:/.../austin.ibm.com/fs/proj/p1/aix/aix510
/com4/cmvc/obj/power/tcpip/usr/ Sbin/named8
Now we're going to write the configuration file.
First, the most important set of files, the other documents are defined by it in order to take effect.
/etc/named.conf (Bind4 's time this file is named: named.boot)
You can use the touch/etc/named.conf command to generate files and then add content
Options {
Directory "/ETC"; #设定工作目录, bind finds the desired file in the directory set here.
};
Zone "." {
Type hint;
File "named.ca"; #根服务器
};
Zone "0.0.127.in-addr.arpa" {
Type master;
File "0.0.127.in-addr.arpa.zone"; #本机端的反解文件, the file name can be defined by itself.
};
Zone "localhost" {
Type master;
File "Localhost.zone"; #本机端的正解文件
};
Zone "King.com" {
Type master;
File "King.com.zone"; The positive solution file #domain name
};
Zone "0.168.192.in-addr.arpa" {
Type master;
File "0.168.192.in-addr.arpa.zone"; Anti-solution file for #domain name
};
Second,/etc/named.ca
If our DNS server is connected to the Internet, then named.ca inside is our superior server, when a domain name in this machine can not find, will go to the named.ca in the server to look up. Sometimes these servers are variable, so we can download this file
Ftp://ftp.rs.internic.net/domain/named.root, then renamed to Named.ca, copied into the/etc inside is good.
Third,/etc/0.0.127.in-addr.arpa.zone
$TTL 86400 @ in SOA localhost. Root.localhost. (
2; serial
28800; refresh
7200; retry
604800; expire
86400; TTL
)
@ in N S localhost.
1 in PTR localhost.
1 in PTR pp.
Iv./etc/localhost.zone
$TTL 86400 @ in SOA @ root.localhost (
1; serial
28800; refresh
7200; retry
604800; Expire
86400 TTL
) in
NS localhost.
@ in A 127.0.0.1
v./etc/king.com.zone
$TTL 86400 @ in SOA pp.king.com root.localhost (
3; serial
288 00; Refresh
7200 retry
604800 expire
86400; ttl) in
NS pp.king.com.
www . A 192.168.0.5
pp in a 192.168.0.5
mail in CNAME www
six,/etc/0.168.192. In-addr.arpa.zone
$TTL 86400 @ in SOA pp.king.com. Root.pp.king.com. (
4; serial
28800; refresh
7200; retry
604800; expire
86400; TTL
)
@ in NS pp.king . com.
5 in PTR pp.king.com.
All right, 6 files are complete, let's create a file/etc/resolv.conf, the meaning of this file is that if it does not exist, indicating that the domain name service provided by the/etc/hosts, if exist and empty, indicating that this machine is a domain name server, if there is not empty, Indicates that this computer is a client that provides domain name resolution by a domain name server.
Use this command to create this file:
Touch/etc/resolv.conf
Finally done, now let's start it up.
Can be started with the Smit stnamed fast path.
You can also use startsrc-s named to start.
If it is already started, you can use stopsrc-s named to close it.
Use the lssrc-s named to view its state, and if the state is active, we can test it.
Test
The easiest way to do that is nslookup.
For example, in this example:
# nslookup
Default Server:pp.king.com
address:0.0.0.0
>; Www.king.com #正解
Server:pp.king.com
address:0.0.0.0
Non-authoritative Answer:
Name:www.king.com
address:192.168.0.5
>; Pp.king.com #正解
Server:pp.king.com
address:0.0.0.0
Non-authoritative Answer:
Name:pp.king.com
address:192.168.0.5
>; Mail.king.com #正解
Server:pp.king.com
address:0.0.0.0
Non-authoritative Answer:
Name:www.king.com
address:192.168.0.5
Aliases:mail.king.com
>; 192.168.0.5 #反解
Server:pp.king.com
address:0.0.0.0
Name:pp.king.com
address:192.168.0.5
And then add the server IP192.168.0.5 to the client's DNS address.
Test again
c:\>;p ing www.king.com
Pinging www.king.com [192.168.0.5] with-bytes of data:
Reply from 192.168.0.5:bytes =32 time<1ms ttl=255 Reply from 192.168.0.5:bytes=32 time<1ms ttl=255 Reply from
192.168.0.5:bytes=32 time<1ms T tl=255
Reply from 192.168.0.5:bytes=32 time<1ms ttl=255
Ping statistics for 192.168.0.5:
packets:sent = 4, R eceived = 4, Lost = 0 (0% loss),
approximate round trips times in milli-seconds:
Minimum = 0ms, Maximum = 0ms, aver Age = 0ms
c:\>;
Success.