Here I have explained the steps to setup a simple dns server for some small experiments. My operation system is CentOS. But the configuration files will be same in other operating systems also. I used bind for dns deamon. There are other options too. But bind is popular and fully documented.
- Install bind (#yum install bind). In some case bind may be already installed by default (in my machine it is already installed).
- The configuration file, named.conf should be placed in /etc/. If bind-chroot is installed, the configuration file should be placed in /var/named/chroot/etc/.
- /var/named will be bind's working directory. If bind-chroot is installed /var/named/chroot will be the working directory. (place .db files in corresponding directory)
zone "example.org" {
type master;
file "example.org.db";
};
/etc/named/example.org.db (var/named/chroot/example.org.db incase bind-chroot)
@ IN SOA example.org. hostmaster.example.org. (
2008051200 ; serial
1d12h ; refresh
15M ; update
3W12h ; expiry
2h20M ) ; minimum
@ IN NS ns1.example.org.
one IN A 56.89.90.2
@ IN A 89.89.89.89
six IN AAAA fe80::2
six IN AAAA 3fff::2
six IN AAAA fec0::15
- Replace example.org with the name you want to use.
- In example.org.db file, the line "one IN A 56.89.90.2" matches the name one.example.org with the IPv4 address 56.89.90.2
- The line "@ IN A 89.89.89.89" matches the name example.org('@' refers current domain) with ipv4 address 89.89.89.89
- And the last three lines adds three AAAA IPv6 records for the name six.example.org.
# service named restartCheck the functioning of dns server by issuing nslookup command.
- Resolve one.example.org
# nslookup one.example.org
Server: 10.5.1.1
Address: 10.5.1.1#53
Name: one.example.org
Address: 56.89.90.2
- Resolve example.org
# nslookup example.org
Server: 10.5.1.1
Address: 10.5.1.1#53
Name: example.org
Address: 89.89.89.89
- Reslove six.example.org (IPv6)
# nslookup
> set q=AAAA
> six.example.org
six.example.org has AAAA address fec0::15If you want better understanding please visit http://www.centos.org/docs/5/html/Deployment_Guide-en-US/ch-bind.html
six.example.org has AAAA address 3fff::2
six.example.org has AAAA address fe80::2
i want to configure iIPv6 where ipv4 is allready running what are the changes i need to do on os lavel or config lavel
ReplyDeletethanks for help