|
Domain Name System - A domain name system will resolve Hostname to Ipaddres and Ip address to Hostname.
packages for DNS: bind* ,cach*
Port No 53
Serverside configuration:
configuation file:
Domain Configuration:
# cd /var/named/chroot/etc
# cp rfc12named.zone named.conf
# chgrp named named.conf
# chmod 644 named.conf
# vinamed.conf
options {
directory "/var/named";
}
zone "example.com" IN {
type master;
file "example.fwd";
allow-update { none; };
};
zone "0.25.172.in-addr.arpa" IN {
type master;
file "example.rev";
allow-update { none; };
};
Zone Configuration:
# pwd
/var/named/chroot/var/named
# cplocalhost.zoneexample.fwd
Some explanation of the various codes is probably in order:
@
Domain. This is a short name for the domain in the named.conf file.
IN
Internet.Indicates Internet class of records.
SOA
Source of Authority. This entry contains information on which machine is the primary name server for information about for the particular domain
NS
Name Server.
A
Address.This is used to mapping Host name to IP Address
CNAME
Canonical Name. This is used to create Alias record
MX
Mail Exchange This is used to create mail address records.
vi example.fwd
$TTL 86400
@ IN SOA @example.com. root.example.com. (
42 ; serial (d. adams)
3H ; refresh
15M ; retry
1W ; expiry
1D ) ; minimum
IN NS www.example.com.
IN A 172.25.25.81
www IN A 172.25.25.81
viexample.rev
$TTL 86400
@ IN SOA @example.com. root.example.com. (
42 ; serial (d. adams)
3H ; refresh
15M ; retry
1W ; expiry
1D ) ; minimum
IN NS www.example.com.
IN A 172.25.25.81
81.0 IN PTR www.example.com.
Services:
# service named restart
#service network restart
Local Resolver File:
vi /etc/resolv.conf
nameserver 172.25.25.81
setip address as statically in server side configuration
Client Side configuration:
Set ip address as statically,
Service network restart
/etc/resolv.conf
nameserver 172.25.25.81
Testing Doman is properly configured or not
This command is used to get the answer @ quick way.
#digsystemadministrator.in +short
This command is used to get A recordsfor the domain systemadministrator.in
#digsystemadministrator.inA +noall +answer
This command is used to get MX recordsfor the domain systemadministrator.in
#digsystemadministrator.inMX +noall +answer
This command is used to get NS recordsfor the domain systemadministrator.in
#dig systemadministrator.inNS +noall +answer
This command is used to get ALL recordsfor the domain systemadministrator.in
#dig systemadministrator.inALL +noall +answer
This command is used to query using specific Name Server
#dig @ns1.servage.net systemadministrator.in
This command is used to trace for the domain System Administrator
#dig systemadministrator.in +trace
# hostexample.com [ wiill resolve hostname to ip address ]
# hostipaddress [ will resolve ip address to hostname ]
# nslookup hostname [ wiill resolve hostname to ip address ]
# nslookupipaddress [ will resolve ip address to hostname ]
|