DNS Tutorial

Last Updated 9/22/2020

On the Internet, the Domain Name System (DNS) associates various sorts of information with so-called domain names; most importantly, it serves as the "phone book" for the Internet: it translates human-readable computer hostnames, e.g. en.wikipedia.org, into the IP addresses that networking equipment needs for delivering information. It also stores other information such as the list of mail exchange servers that accept e-mail for a given domain. In providing a worldwide keyword-based redirection service, DNS is an essential component of contemporary Internet use.

How to configure TCP/IP to use DNS in Windows XP or Windows 2003

How to configure TCP/IP

1. Click Start, click Control Panel, click Network and Internet Connections, and then click Network Connections.
2. Right-click the network connection that you want to configure, and then click Properties.
3. On the General tab (for a local area connection), or the Networking tab (for all other connections), click Internet Protocol (TCP/IP), and then click Properties.
4. If you want to obtain DNS server addresses from a DHCP server, click Obtain DNS server address automatically.
5. If you want to manually configure DNS server addresses, click Use the following DNS server addresses, and then type the preferred DNS server and alternate DNS server IP addresses in the Preferred DNS server and Alternate DNS server boxes.

How to configure an additional DNS server IP address

To configure an additional DNS server IP address, follow these steps:
1. Click Advanced, and then click the DNS tab.
2. Under DNS server addresses, click Add in order of use.
3. In the TCP/IP DNS server box, type the IP address of the DNS server, and then click Add.

How to modify the resolution behavior for unqualified DNS names

To modify the resolution behavior for unqualified DNS names, follow these steps:
1. Click Advanced, and then click the DNS tab.
2. To resolve an unqualified name by appending the primary DNS suffix and the DNS suffix of each connection, click Append primary and connection specific DNS suffixes. To do this, each connection must be configured. If you also want to search the parent suffixes of the primary DNS suffix up to the second-level domain, click to select the Append parent suffixes of the primary DNS suffix check box.
3. To resolve an unqualified name by appending the suffixes from a list of configured suffixes, click Append these DNS suffixes (in order), and then click Add to add suffixes to the list.
4. To configure a connection-specific DNS suffix, type the DNS suffix in the DNS suffix for this connection box.

How to configure TCP/IP to use DNS in Linux/Unix

The named.conf file is the main configuration file for a DNS server. In it you tell the server what, if any, forwarders to use, what domains it's authoritative for, and which zone files it should use for each domain.

Forwarders let you specify other DNS servers to use when your DNS server receives a query for a domain it isn't authoritative for. Your LAN DNS server will be authoritative for your LAN's domain name, but it won't know about domains on the Internet. When it gets a query for an Internet domain it will forward the request out to a DNS server specified in the forwarders section of the named.conf file.

Open the /etc/bind/named.conf file using the ee text editor. In the options section you'll see an indented block of text like this:
        // forwarders {
        // };

Put your ISP's DNS servers here. The '//' are comment characters in this file so you'll need to remove those also. You should end up with a block of text that looks like this:
        forwarders {;;

We used private addresses in the above example but naturally these would be publically-accessible DNS servers (your ISP's). Now we have to add the content to the file so the server knows it knows it's authoritative for the iphowto.net domain. At the bottom of the file you'll see the line:
        // add entries for other zones below here

Below this line enter the following for the forward and reverse zone files:
        zone "iphowto.net" {
           type master;
              file "/etc/bind/db.iphowto.net";

        zone "10.168.192.in-addr.arpa" {
           type master;
              file "/etc/bind/db.10.168.192";

Save the file. The named daemon is running, we already have a root hints database, our zone files our set up, and our forwarders are set up in the configuration file. Now just change the /etc/resolv.conf file:
        search iphowto.net