DNS (Domain Name System)


DNS (Domain Name System)

DNS is a name resolution protocol that converts hostnames to IP addresses, and vice versa. Its structure is that of a hierarchical database, much like the directory structure of a file system. DNS is the reason you don't have to remember the IP address of every Web site. The DNS database consists of the root domain (".") residing at the top of the hierarchy, and top-level domains directly underneath it (such as .com and .edu). Subdomains follow ( example.com ), which in turn can have other subdomains ( specifics.example.com ). Hostnames are based on this system, where each level is separated by a dot.

DNS servers provide the service for name resolution. When a host needs to resolve a domain name, the DNS server receives a request from the host. If the DNS server has the domain name listed in its table, the server simply replies to the host with the IP address of the domain name. If the domain name is a name outside of your network, the DNS server simply needs to know the address of the root name server on the Internet to which it will forward the request. The root server then filters the request through the appropriate domain beneath it, and so on, until the correct name server is reached and the information about the host is available.

Configuring a Router with DNS Servers

A router can use the services of DNS, as well. Configuring the router with DNS servers is easier than having to set up a table of hostnames. By default, the ip domain lookup command is enabled. When the router can't resolve a hostname, it generates a broadcast to look for a DNS server. This can cost you valuable time when you're in a hurry. To terminate this process rather than wait for the broadcast timeout, you can press Ctrl+Shift+6. When setting up the router to use specific DNS servers for name resolution, use the ip name-server ip-address command. In the following example, using a Cisco 3725, we are assigning three DNS servers; you can see that adding a space and an additional DNS server's IP address allows you to add multiple DNS servers:

 RTR(config)#  ip name-server ?  A.B.C.D     Domain server IP address (maximum of 6)   X:X:X:X::X  Domain server IP address (maximum of 6) RTR(config)#  ip name-server 206.13.31.12 ?  A.B.C.D     Domain server IP address (maximum of 6)   X:X:X:X::X  Domain server IP address (maximum of 6)   <cr> RTR(config)#  ip name-server 206.13.31.12 206.13.28.12 ?  A.B.C.D     Domain server IP address (maximum of 6)   X:X:X:X::X  Domain server IP address (maximum of 6)   <cr> RTR(config)#  ip name-server 206.13.31.12 206.13.28.12 10.1.2.25  RTR(config)# 

The above output shows the successful configuration of three DNS servers on the router. The search order for domain name resolutions is the same order that they are entered.

If you decide to use a hostname table, you have to disable the ip domain lookup command by using the no ip domain lookup command. You must then use the ip host hostname ip - address command to build your hostname table. You can have up to eight IP addresses for a hostname. Depending on the size of your network, making all of these entries may take a fair amount of time. To view the hostnames in the table and their corresponding IP addresses, use the show hosts command as shown:

 RTR#  show hosts  Default domain is not set Name/address lookup uses domain service Name servers are 206.13.31.12, 206.13.28.12, 10.1.2.25 Codes: u - unknown, e - expired, * - OK, ? - revalidate        t - temporary, p - permanent    Host                   Age  Type     Address(es) *p ns2.cwie.net            **  IP       64.38.192.11 *p ns1.cwie.net            **  IP       64.38.192.10 *t digitalcrawlspaces.com   0  IP       64.38.192.188 *t yahoo.com                0  IP       64.58.79.230  66.218.71.198 RTR# 

This output shows the known NS resolved hosts in the routers host table.

DNS Caching and Default Gateways

DNS caching saves time and bandwidth and is, therefore, a process of great value. After a DNS server has resolved a name, it stores this mapping in its cache , making it available the next time the server receives a query for one of the already stored mappings. This means that if a query for a host address has already been resolved, the mapping is already stored and, thus, a query does not need to be made across the network a second time.

The expiration of an entry is set by the time-to-live (TTL) value, which is entered in the domain Start of Authority (SOA) record. This ensures room for new mappings and updates. Information about a particular name might change if the old mapping stayed in the cache too long. As a result, the DNS server would provide the wrong information when queries are made.

Part of a router's job is to send packets to remote networks. The default gateway is utilized when a host needs to send a packet to a host on a network other than its own, for which the router does not have a specific route in its routing table. This manually entered route is also known as the gateway of last resort . If a router has no known route to a destination and no gateway of last resort is configured, the router has no other choice but to drop the packet and notify the sending device that it doesn't know where to send the packet.

Once a packet has been directed to the gateway of last resort, the next router can direct the packet to other gateways, and so on, until it reaches its final destination. The default gateway parameter is an IP address specifying the router interface, on which the gateway is configured.

For hosts to communicate with each other on a TCP/IP network, they have to be configured with several IP addresses, one IP address and subnet mask representing the host itself, a default gateway, DNS servers, and occasionally a Windows Internet Naming Server (WINS). On small networks, having static addresses assigned manually at each workstation or server is no big deal, and coping with those changes on the network that will affect every single machine, such as the default gateway, is relatively easy.



CCNP CIT Exam Cram 2 (642-831)
CCNP CIT Exam Cram 2 (Exam Cram 642-831)
ISBN: 0789730219
EAN: 2147483647
Year: 2003
Pages: 213
Authors: Sean Odom

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net