Vous êtes sur la page 1sur 3

DNS CONFIGURATION ON AIX

1. Change your hostname to a fully qualified host name. root@lpar1: hostname lpar1.my.example.com 2. Create a directory /var/named to hold your zone files. root@lpar1: mkdir /var/named __ 3. Create the /etc/named.conf file. The file should list your forward and reverse domains. It should also contain a reverse domain for loopback. All domain files should be stored in the /var/named directory. root@lpar1: vi /etc/named.conf The file should look like this: options { directory /var/named; }; zone my.example.com { type master; file named.my.example.com; }; zone 1.168.192.in-addr.arpa { type master; file named.192.168.1; }; zone 0.0.127.in-addr.arpa { type master; file named.local; }; zone "." { type hint; f file "named.ca"; }; __

4. Create the name zone file so that it properly reflects your domain. root@lpar1: vi /var/named/named.my.example.com

The file should eventually look like this: @ 9999999 IN SOA lpar1.my.example.com. root.lpar1.my.example.com. ( 2009010901 ; Serial 3600 ; Refresh 300 ; Retry 360000 ; Expire 86400 ) ; Minimum 9999999 IN NS lpar1 loopback 9999999 IN A 127.0.0.1 localhost 9999999 IN CNAME loopback lpar1 9999999 IN A 192.168.1.1 lpar2 9999999 IN A 192.168.1.2 lpar3 9999999 IN A 192.168.1.3

5. Create the IP zone file(s) so that they properly reflect your domain. root@lpar1: vi /var/named/named.192.168.1.1 The file should eventually look like this: @ 9999999 IN SOA lpar1.my.example.com. root.lpar1.my.example.com. ( 2009010901 ; Serial 3600 ; Refresh 300 ; Retry 360000 ; Expire 86400 ) ; Minimum 9999999 IN NS lpar1.my.example.com. 1 9999999 IN PTR lpar1.my.example.com. 2 9999999 IN PTR lpar2.my.example.com. 3 9999999 IN PTR lpar3.my.example.com.

6. Create the local IP zone file. root@lpar1: vi /var/named/named.local The file should eventually look like this: @ 9999999 IN SOA lpar1.my.example.com. root.lpar1.my.example.com. ( 2009010901 ; Serial 3600 ; Refresh 300 ; Retry 360000 ; Expire 86400 ) ; Minimum 9999999 IN NS lpar1.my.example.com. 1 9999999 IN PTR loopback.

7. Create the cache file so that it contains the name server of an upstream domain, or one of the root name servers. root@lpar1: vi /var/named/named.ca The file should look like this: . 9999999 IN NS ns.example.com. ns.example.com. 9999999 IN A 192.168.0.1 8. Start the named daemon and verify that it started correctly. root@lpar1: startsrc -s named root@lpar1: lssrc -s named
9. Execute a few queries with dig to make sure that the name server is fully operational.

root@lpar1: dig @localhost lpar1.my.example.com a root@lpar1: dig @localhost 1.1.168.192.in-addr.arpa ptr root@lpar1: dig @localhost 1.0.0.127.in-addr.arpa ptr In all cases you should get a proper response in the ANSWER SECTION. Ignore the output in the AUTHORITY SECTION: this is mostly for use by name servers between each other. __ 10. .If all dig queries are correct, then make this system a client of itself by modifying the /etc/resolv.conf file to point to itself. root@lpar1: vi /etc/resolv.conf The file should look like this: domain my.example.com nameserver 192.168.1.1 nameserver 192.168.1.2

Vous aimerez peut-être aussi