Build DNS Server


Build DNS Server: DNS(Domain Name System)

 a-DNS It is an internet service used to translate from domain name to IP address so it easy remember
then IP address but however Internet used IP address so everytime we used domain name it always
translate to IP address .
 b-DNS it has important duties to store record host database for every network computer can easily
connect.
ex. www.google.com  ip address = 64.233.167.147
.com for business
.net for network system
.edu for education ministry
.org for Organization
.gov for Government
.kh  for note that khmer
www.iic.edu.kh.
----------------

1. Set fix IP
Ip add :192.168.21.254
Sub Net :255.255.255.0
Default :192.168.21.1
DNS :192.168.21.254
 
2. Config DNS:

a- Create Forward zone: map name to ip

=> When build Domain Controller => it automatic create DNS Forward zone.
=> But we can delete it and recreate the forward zone
   -Delete all in Forward Lookup Zones - R-click (Forward Lookup Zones) - New Zone Wizard
Next 3 - Zone name (iic.edu.kh) - next 2 - finish

=> After create forward zone => Must create the A record: it's used to point host name to ip address
   -R-click (iic.edu.kh) => New Host (A) - Name (Host Name of server) Server1 - IP add (192.168.21.254)
-Add Host - ok - Done


b- Create Reverse zone: map ip to name

     -R-click (Reverse Lookup Zone - News Zone - next 3- Network ID: 192.168.21)-Next 2 - finish

=> After create reverse zone => Must create PTR record: it's used to point ip address to hostname
    -R-click (192.168.21.x Subnet) - News Pointer (PTR) - Host Ip number 254 - Browse (server1.iic.edu.kh)



3. Test DNS:
- C:/>nslookup

4. Tes Reverse Lookup zone
- > 192.168.20.7 =>Enter

5. Show DNS Zone:
- > set all

6.set debug - iic.edu.kh


    -set q=any
     yahoo.com
     hotmail.com

Before test DNS in windows server 2008 => Must disable IPV6

=> this test is work for DNS, you can you DNS command: set q=any to query any domain name for
 DNS record like: A, MX, CNAME record.... and NS record


=> this query is resolved by our local DNS Server that we just created.

- internet address = 64.4.20.174  => A Record(point name to IP)
- nameserver = ns2.msft.net => NS Record (point to DNS Server)

- mail exchanger = mx1.hotmail.com => MX Record (point to Mail Server)

- primary name server = ns1.msft.net
responsible mail addr = msnhst.microsoft.com
serial  = 2010082401
refresh = 1800 (30 mins)
retry   = 900 (15 mins)
expire  = 2419200 (28 days)
default TTL = 3600 (1 hour)

=> All above are the SOA record (Start of Authority): used to refresh or retry the DNS Records