IP to host and host to IP resolve..
.com – commercial .org – organization .mel – meltem .co.in – India (only) .gov - government .travel – Travel Domain Packages
required for BIND #rpm –qa |grep bind bind 2nd C.D bind-chroot 2nd C.D bind-devels 3rd C.D bind-utils 3rd C.D Caching-name server 4th C.D System-config-bind # cd /var/named/chroot/etc # Create named.conf (using 2 files) # vi named.conf # vi named.caching.servername.conf till allow.query ( 11 Lines copy to named.conf) # vi named.rfc.1912.zones from Zone “.” IN to Zone 0.0.0.0.0.0 Copy that lines & append in named.conf.
# cd /var/named/chroot/var/named. Local.zone ----> forward Named.local ----> Reserve # cp Localhost.zone domain.fzone # cp named.local domain.rzone DNS Theory
In networking including the internet user locate other computers by name. This frees users from the task of remember numeric Address of net resources.
The most effective way to configure the network to allow such name base connection is to setup Domain name service or a name server Which resolve hostname on the network in to
numerical address and vise versa. DNS
associate host name with their respective IP address so that when user want to
connect to other machine on the network they can refer to them by name without
having to remember IP address. DNS is
normally implement using centralize servers that are authoritative for some
Domains and refer to other DNS server to other domains. When a
client host request information from a Name server it usually connect to port
53 the name server then attempts to resolve the FQDN ( fully qualified domain
name) best on its resolve library which may contain authoritative information
about the host. Requested or cache data from an earlier query IF the Name
server doesn’t already have the answer in its resolve library its query other
name server to determine which name server are authority for the FQDN with
information its query autho. Name server to determine the IP address of the
requested host. IF reveres
Lookup Zone perform the same process is used. A scope that query is made with
an unknown IP address return then name. NAME SERVER ZONE. The FQDN of host can be bracken into different segment this segment Are Organized into hierarchy (like tree) with a main trunk , primary Branches and e.g. stn3.swappy.neil.com When
looking FQDN resolve to find the IP addresses to reflect particular system read
the name right to left which is level of hierarchy divided by period (.) in
this example first top level domain for
this FQDN.
The name
neil is some domain under com while swappy sub domain under neil the name stn3
identifying a specific machine hostname. Where are zone file, zone file stored in primary name server also called master name server with are truly authority and where change are to file and secondary name server also called
slave name server which received their zone file from primary name server.
Zone Forward lookup zone Reverse lookup zone
slave server
*) master name server type master store organize and authoritative zone record for name space and answer query about the name space from other name server.
*) slave server answer query from their name server concerning name species for which it is consider as authority however slave name server get their name space.
Package require
bind caching-name server files : #
/var/named/chroot/etc/name.conf #
/var/named/chroot/var/named/ # vi
localhost.zone # vi
named.local # vi
/etc/resolve.conf # vi
/etc/hosts # rpm –qa
|grep bind # yum install
bind* #rpm –qa
|grep caching #yum install
caching* #cd
/var/named/chroot/etc #vi
named.rfc1912.zones # cp
named.rfc1912.zones named.conf # vi
named.conf # vi named.caching-nameserver.conf
Options { Listen –on port 53{127.0.0.1}; #vi named.conf copy zone line 11 line and paste below zone file above IPv6 line.
Zone “ };
Zone “lion.com.” In { Type master; file”line.fzone”; allow-update{none;}; }; Zone “9.147.167.in-addr.arpa”In{ (reveres ip decided on class I.E a b c) type master; file “lion.rzone”; allow-update {none;}; }; option{ listen on port 53 {167.147.9.3} allow-query {167.147.9.3;}; #chown
named named.conf #cd
/var/named/chroot/var/named # cp
localhost.zone line.fzone # cp
named.local line.rzone #chown named lion.fzone #chown
named lion.rzone #vi lion.fzone
# IN ------> internet name # SOA -----> start of authority # A -------> Address # NS ------> Name server # PTR -----> Pointer record # $TTL ----> Time to leave $TTL 86400 In SOA stn3.lion.com.root.lion.com. ( IN NS stn3.lion.com. IN A 167.147.9.3 IN AAAA ::1 Stn3 IN A 167.147.9.3 www IN A 167.147.9.3 ) # vi lion.rzone $TTL 86400 @ In SOA stn3.lion.com.root.lion.com. ( # “3” why three? System ip 167.147.1.3 for Class B use last octet) IN NS stn3.lion.com. 3 IN PTR stn3.lion.com. 3 IN PTR www. )
#vi /etc/resove.conf search lion.com nameserver 167.147.9.3 #vi /etc/hosts 167.147.9.3 stn3.lion.com stn3 # service named restart # nslookup stn3.lion.com # nslookup 167.147.9.3 # nslookup www.lion.com DIG ( domain information groper) # dig stn3.lion.com # dig –x 167.147.9.3 Slave Server Same step to install slave server as master server. # vi named.conf Zone “lion.com.” In { Type slave; Masters{167.147.9.3;}; File “slaves/lion.fzone”; };
Zone “9.147.167.in-addr.arpa” IN { (reveres ip decided on class I.E a b c) type slave; file “lion.rzone”; Masters{167.147.9.3;}; File “slaves/lion.rzone”; }; # chown named named.conf #vi /etc/resove.conf search lion.com nameserver 167.147.9.3 # service named restart # cd /var/named/chroot/var/named #cd slaves Both file added automatically from master server after service restart. |
Linux- How to >