Aix dns configuration

  
        

After two days of hard work, AIX's DNS configuration was finally successful. I wrote down my configuration process and shared it with you. I am a beginner to learn. If there is something wrong, please don't worry about the pen and ink. .

The full name of DNS is: Domain Name System As for his history, purpose, working principle, etc., there are many articles that have been said, I will not waste everyone's time. Let me talk about my experimental environment: AIX: os version: AIX 5L for POWER V5.1IP address: 192.168.0.5 Assume domain name: king.com host name: pp.king.com

As a domain name server, To have a positive and negative solution is called a complete server. There are a lot of them now, especially the WIN DNS server has many anti-solution functions.

Now enter the topic

Set up a complete DNS server mainly need to set 6 files:

named.conf #main setting file named.ca #本The positive solution of the machine side The reverse solution of the local end of the file domain name The reverse solution of the file domain name

A AIX V5.1 installation is completed, the DNS software bind has been installed and has been started. You can use this command to view:

# lssrc -s namedSubsystem Group PID Statusnamed tcpip 15666 active

The default is to install two versions, bind4 and bind8, of course, the latest version already has bind9, But we can use the built-in bind8.

In the initial time, the system will use bind4 by default, then we will now use the following command to start using bind8:

# rm /usr/sbin/named /usr/sbin/named-xferln -s /Usr/sbin/named8 /usr/sbin/namedln -s /usr/sbin/named8-xfer /usr/sbin/named-xfer

Check:

# named -vnamed 8.2.2 -P5+Fix_for_CERT_till_01_30_01 Sun Apr 8 08:05:23 CDT [email protected]:/.../austin.ibm.com/fs/proj/p1/aix/aix510/com4/CMVC/obj/Power/tcpip/usr/sbin/named8

Now let's write the configuration file.

First, the first major setting file, the other files are defined by it, in order to take effect.

/etc/named.conf (this file name is: named.boot when bind4) You can use the touch /etc/named.conf command to generate a file, and then add the content

options { Directory "/etc"; #Set the working directory, bind will find the required files 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 anti-solution file of the local machine, the file name can be defined by itself. };

zone "localhost" {type master;file "localhost.zone"; #正正的正解文件};

zone "king.com" {type master; File "king.com.zone"; #域 name正解文件};

zone "0.168.192.in-addr.arpa" {type master;file "0.168.192.in- Addr.arpa.zone"; #domain name's inverse solution};

Second, /etc/named.ca If our DNS server is connected to the internet, then named.ca is inside us The superior server, when a domain name is not found on the local machine, will go to the server in named.ca to check. Sometimes these servers are changed, so we can download this file

ftp://ftp.rs.internic.net/domain/named.root, then rename it to named.ca, copy it to /Etc inside it.

3, /etc/0.0.127.in-addr.arpa.zone

$TTL 86400 @ IN SOA localhost. root.localhost. (2; serial28800 ; refresh7200 ; retry604800 ; expire86400 ; ttl)

@ IN NS localhost. 1 IN PTR localhost. 1 IN PTR pp.


4, /etc/localhost.zone

$TTL 86400 @ IN SOA @ root.localhost (1; serial28800 ; refresh7200 ; retry604800 ; expire86400 ; ttl)IN NS localhost.@ IN A 127.0.0.1


5, /etc/King.com.zone

$TTL 86400 @ IN SOA pp.king.com. root.localhost (3; serial28800 ; refresh7200 ; retry604800 ; expire86400 ; ttl)

IN NS pp.king .com.www IN A 192.168.0.5pp IN A 192.168.0.5mail IN CNAME www


6, /etc/0.168.192.in-addr.arpa.zone

$TTL 86400 @ IN SOA pp.king.com. root.pp.king.com. (4; serial28800 ; refresh7200 ; retry604800 ; expire86400 ; ttl)

@ IN NS pp.king.com .5 IN PTR pp.king.com.

After all 6 files are completed, let's create a file /etc/resolv.conf. The meaning of this file is, for example, Does not exist, this machine represents the domain name service provided by the /etc /hosts, and if there is blank, the machine is a domain name server, if it exists and is not empty, it indicates that this machine is provided by the domain name server DNS client.

Use this command to create this file: touch /etc/resolv.conf

is finally done, now let's start it. It can be started with the smit stnamed fast path. It can also be started with startsrc -s named. If it is already started, you can close it with stopsrc -s named. Use lssrc -s named to check its status. If the status is active, we can test it.

Testing

The easiest way is to use nslookup as in this example:

# nslookupDefault Server: pp.king.comAddress: 0.0.0.0

>; www.king.com #正解Server: pp.king.comAddress: 0.0.0.0

Non-authoritative answer:Name: www.king.comAddress: 192.168.0.5

> ;; pp.king.com #正解Server: pp.king.comAddress: 0.0.0.0

Non-authoritative answer:Name: pp.king.comAddress: 192.168.0.5



>; mail.king.com #正解Server: pp.king.comAddress: 0.0.0.0

Non-authoritative answer:Name: www.king.comAddress: 192.168.0.5Aliases: mail .king.com

>; 192.168.0.5 #反解Server: pp.king.comAddress: 0.0.0.0

Name: pp.king.comAddress: 192.168.0.5

Then add the server IP192.168.0.5 to the client's DNS address

retest

C:\\>;ping www.king.com

Pinging www.king.com [192.168.0.5] with 32 bytes of data:

Reply fro m 192.168.0.5: bytes=32 time<1ms TTL=255Reply from 192.168.0.5: bytes=32 time<1ms TTL=255Reply from 192.168.0.5: bytes=32 time<1ms TTL=255Reply from 192.168.0.5: bytes=32 Time<1ms TTL=255

Ping statistics for 192.168.0.5:Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),Approximate round trip in in milli-seconds:Minimum = 0ms , Maximum = 0ms, Average = 0ms

C:\\>;

Successful.

Copyright © Windows knowledge All Rights Reserved