Wednesday, October 21, 2009

DNS

DNS
(DOMAIN NAME SYSTEM)

DNS is a protocol in the TCP/IP suite of protocols. It helps in translating computer names into ip addresses. DNS is a standard technology for name resolution, i.e., translating names into ip addresses.
DNS is widely used in Internet and also in private networks for Name resolution. DNS is also used in providing and locating network services in a network.
In Internet, DNS translates website names or Internet domain names into ip addresses.












DNS IN PRIVATE NETWORKS/LANs

In a private network or LAN, you can use DNS to connect computers through names instead of using ip addresses. In a network, PCs connect to each other through name by using broadcasting. Before DNS, hosts file was used for name resolution. Hosts file is a text file containing list of names and ip addresses.
DNS is the best solution for name resolution in a network because broadcasting produces network traffic and it is difficult to maintain Hosts file.




DNS NAMESPACE

DNS has a hierarchical structure. This means, in DNS, we use a main or root name and under this root name, we can have many sub-names or child names. DNS name structure can be compared with a tree, having root and then branches.
In DNS, we use a special namespace called DNS DOMAIN NAME in the format xyz.abc. For example, intel.com, nokia.com etc. The dot represents Root Name.
Use of Domain name helps in creating unique computer names and two networks can use the same names but their full DNS names or FQDNS (Fully Qualified Domain Names) will always be different. Domain Names are like area codes in the telephone network. For example, if DNS domain name is xyz.com and the name of a computer is acc, then full DNS name or FQDN of that computer will be acc.xyz.com.








DNS NAMESPACE IN INTERNET

In Internet, DNS NAME starts with a dot or period called 'ROOT DOMAIN’. Under root domain, we have top-level domain names like com, org, gov, mil etc.



What is a ZONE in DNS?

Zone is a database containing list of names and ip addresses. In other words, Zone refers to a DNS domain name over which DNS server has the full authority.
Zone is of two types:
Forward-Lookup Zone: DNS server having this zone can translate names into ip addresses. Records created in this zone are called Host or ‘A’ records.

Reverse-Lookup Zone: DNS server having this zone can translate ip addresses into names. This zone is used for troubleshooting DNS service. Records created in this zone are called pointer or ‘PTR’ records.


TYPES OF DNS SERVERS

1. Primary DNS server: It is also called Master DNS server. This DNS server had the full authority over the zone created in it and any change can be made in the zone. The zone in this server is called primary zone.

2. Secondary DNS server: The zone present in this server is the copy of the zone present in the Primary DNS server. No change can be made in the secondary zone. Secondary DNS servers are created for offering fault-tolerance and load-balancing for the DNS service.

3. Active Directory-Integrated DNS server: This DNS server is created as the result of Active Directory Installation and it is used to provide active directory service to the clients.

4. Caching-only DNS server: This server does not contain any zone. It just stores the DNS queries made by the clients to the other main DNS servers. When main DNS servers are not available, clients refer to the caching-only DNS server for name resolution.



HOW TO INSTALL DNS?

1. DNS can be installed in win 2000/2003/NT server computer.
2. Go to a 2003 server computer, connect it to network and in the TCP/IP properties, give an ip and in the 'Preferred DNS server' box, type the same ip address.
3. Click O.K. > Close.
4. Go to Control Panel > Add or Remove Programs > Add/Remove Windows Components > Highlight 'Networking services'.
5. Click on Details > select 'DNS' > O.K. > next.
6. Insert the 2003 server CD if prompted.
7. Click next > finish.



HOW TO CONFIGURE PRIMARY DNS SERVER?

1. First DNS server in your network will be primary (master) DNS server and it can be used for effective name resolution.
2. Go to your server and open >programs > administrative tools > DNS.
3. Right-click on the name of your computer > Configure a DNS server.
4. Click next
5. Select 'forward and reverse lookup...' and click next.
6. Select ‘Yes, create a forward……..’ and click next.
7. Select 'Yes........’ > Next.
8. Select ‘Primary Zone’ > next.
9. In the Zone Name, type xyz.com.
10. Click next > next.
11 .Select ‘allow both nonsecure and secure….’. > Next.
12. Select ‘Yes, create a reverse………’. > Next.
13. Select ‘Primary Zone’ > next.
14. In the Network ID, type network ID of your network. For example, you are address range starting with 10 with subnet mask 255.0.0.0, and then your Network ID will be 10.
15. Click next > next.
16. Select ‘allow both nonsecure and secure….’ > Next.
17. Select ‘No, it shouldn’t….’
18. Click Cancel and click finish.
19. Click O.K.
20. Click on ‘Forward-lookup Zones’.
21. Right-click on xyz.com > New Host (A).
22. In the Name, type name of your computer and also type the ip address below.
23. Select ‘Create associated…..’
24. Click on Add Host > Done.
25. Right-click on xyz.com > properties > Name Servers.
26. Click on Edit.
27. In the Fully Qualified Domain Name (FQDN), type full DNS name of your computer. For example, if name of your computer is PC1, then FQDN will be pc1.xyz.com.
28. Click on Resolve > O.K.
29. Click Apply & O.K.
30. Click on ‘Reverse Lookup-Zones’.
31. Right-click on subnet > properties > Name servers > Edit > Do the same settings, as done previously.
32. Create records of client PCs by right-clicking on xyz.com and selecting 'New Host' > type name of client and ip address.
33. Go to clients and in the TCP/IP properties, type the address of your DNS server in the 'Preferred DNS server' box.










NSLOOKUP

In the RUN, type cmd > O.K.

Type:

Nslookup

Press Enter. If you don't receive any error, your DNS server is O.K.

Nslookup command can be used to troubleshoot DNS server. It works only if there is reverse look up zone in the DNS.

You can type:

Nslookup 10.0.0.5

This will display name of the computer having ip as 10.0.0.5.








HOW TO CONFIGURE SECONDARY DNS SERVER?

1. Go to a 2003 server computer and configure it as Primary DNS server with zone name as sony.com
2. Now go to another 2003 server computer and install DNS.
3. To configure it as Secondary DNS server, open DNS > right-click on computer name > configure a DNS server.
4. Click next and select 'forward and reverse ..........................’
5. Click next and select ‘Yes, create a forward………’
6. Click next and select 'Secondary Zone' > next.
7. In the Zone Name, type sony.com > next.
8. Type the ip of Primary DNS server > Add > next.
9. Select ‘Yes, create a reverse………..’
10. Click next and select ‘Secondary Zone’ > next.
11. In the Network ID, type the Network ID of your network > next.
12. Type the ip of Primary DNS server > Add > next.
13. Select ‘No, it shouldn’t….’ > next.
14. Click Cancel > finish > O.K.
15. Now go to Primary DNS server, right-click on sony.com > properties > Zone Transfers.
16. Select ‘Only to the following servers’.
17. Type the ip of Secondary DNS server > Add.
18. Click on Notify > the following servers.
19. Type the ip of Secondary DNS server > Add > O.K.
20. Click Apply & O.K.
21. Click on ‘Reverse Lookup Zones’.
22. Right-click on subnet > properties > Zone Transfers.
23. Do the same settings, as done previously.
24. Now go to Primary DNS server and refresh the secondary zone.
25. The copy of all the records of Primary will be transferred to the Secondary and this is called Zone Transfer.
26. On the client PCs, give the addresses of both Primary and Secondary DNS servers. In the TCP/IP properties, in the preferred DNS server box, you can give ip of the Primary and in the alternate DNS server box, you can give ip of the Secondary.




ZONE TRANSFER

The process in which copy of records present in the primary is transferred to the secondary is called Zone Transfer. It is of two types:
1. All Zone Transfer (AXFR)
2. Incremental Zone Transfer (IXFR)
When the secondary first time connects to the primary, the copy of all the records present in the primary is transferred to the secondary and this is called AXFR. IXFR takes place when AXFR is over. Whenever there is any change in the zone database of the primary, then that only change is transferred to the secondary. This is called IXFR.
AXFR generates lots of traffic while IXFR generates very less traffic.

FORWARDING

Forwarding is the process in which a DNS server forwards a DNS query made by a client to another DNS server. The DNS server to which DNS query is forwarded is called 'Forwarder'.


In the diagram, if a client in n/w 1 wants to connect to a PC in n/w 2 through computer-name, then DNS server1 will forward the DNS request of the client to the DNS server2 as DNS server1 will not be able to process the request and therefore forwarding is only choice.
To give ip address of a forwarder, open DNS > right-click on computer-name > properties > Forwarders > type the ip of the other DNS server.

CONDITIONAL FORWARDING

If in a DNS server, you have addresses of many forwarders, then in such a situation forwarding will become slow because DNS server will forward the DNS query to each forwarder till it get the proper reply. To speed up the process of forwarding, the ip address and also domain name which is handled by the forwarder is given in the DNS server. This process of giving both ip and domain name of the forwarder is called Conditional Forwarding.



Open DNS > right-click on computer-name > properties > Forwarders > Click on New > type DNS domain name and the ip of other DNS server.



STUB ZONE

STUB ZONE is a new feature in 2003 server.
Stub Zone is a zone which contains three important records, that is, start of authority (SOA) record, name server(NS) record and the glue host record of another DNS server or forwarder.

Stub Zone helps in
1. Fast Forwarding
2. Any change in the three records of the forwarder is transferred to the Stub Zone.
Stub Zones are mainly used in large networks to improve forwarding.
Glue host record is the very first record in the DNS server.




PRACTICAL

1. Configure a primary DNS server with DNS domain name as ax.com.
2. Go to another 2003 server PC and configure it as primary DNS server with domain name as wx.com.
3. Go to wx.com DNS server and open DNS.
4. Right-click on computer-name > New Zone.
5. Click next > Stub Zone > next.
6. Select 'forward lookup zone > next > type ax.com as Zone name > next.
7. Type ip of ax.com DNS server > next > finish.
8. Go to ax.com DNS server and open DNS.
9. Right-click on ax.com > properties > Zone transfers.
10. Select 'only to the........' > Type the ip of wx.com DNS server.
11. Click on Notify > select ' the following........' > Type the ip of wx.com > O.K.
12. Click Apply & O.K.

No comments:

Post a Comment