Two important IP-related applications are used in most large-scale LANs. Domain Name Service (DNS) is an application that provides mapping between host names and the corresponding IP addresses. Dynamic Host Configuration Protocol (DHCP) is a facility that provides a way to dynamically configure IP devices when they connect to the network.
The DNS client lookup procedure is built into just about every operating system. This procedure allows you to connect to your favourite web site by its name rather than having to remember the IP address. When you look up an arbitrary address on the Internet, your computer sends out a query to a preconfigured DNS server IP address. This query asks the DNS server to convert (or resolve) this name into an address. Once your local computer has the information it requires, it stores it so it won't need to ask again.
The greatest advantage to using DNS this way is not that it allows a human to remember the name rather than the address, although this feature is convenient. Rather, it is important because it allows the administrator to change IP addresses with relative ease. For example, if it is necessary to take the server offline and replace it with another, the administrator can simply set DNS to map the same name to a new address.
For efficiency, the end devices that request this name-to-address conversion generally store it in a local cache. Thus, DNS provides the ability to associate a maximum age for a particular address. For example, when the DNS server responds with the IP address, it may also tell the client device that it should only remember this address for five minutes. Once this period is over, if the client connects to this device again, it needs to do another lookup.
The naming system used by DNS is hierarchical. The various segments are separated by dots. For example, there might be a web server named www.oreilly.com. In this case, the top-level domain is .com. There are several top-level domains such as .org, .net, and .gov, as well as country-specific codes such as .us, .uk, and .ca.
The next field to the left defines the organizational domain name. There can be many hosts within that organization, one of which is called "www". In fact, DNS allows the administrators of the local domain to define more layers of hierarchy.
DHCP is a protocol that makes it possible to automatically configure end devices. The most common things to include in this configuration are the device's IP address, mask, and default gateway. It is also possible to configure several other kinds of information, such as the addresses of the DNS servers, time servers, database, or application servers. Indeed, the protocol itself is highly flexible and makes it possible (in theory) to configure just about anything the end device might need.
The interesting thing about DHCP is that, in the common example of setting up an IP address, the client device doesn't have enough information to get onto the network when it starts out. It doesn't have an IP address and it doesn't know where its default gateway is. In general, it doesn't even know the IP address of the DHCP server. All this device can really do is send out an all-hosts broadcast to 255.255.255.255 looking for a DHCP server. For its source address, it has to use the generic source address 0.0.0.0, because it doesn't know anything else to use. In the default situation, the router for this network segment refuses to pass along a broadcast of this type. You either need to have a DHCP server for every segment or the router needs to cooperate.
Usually, the router is set up to automatically forward these broadcasts to a particular IP address, which will be the DHCP server. This IP address could be somewhere very far away in the network, perhaps several hops away. The router has to not only forward the client's request packet through the network to the server, but it also has to be able to receive the configuration information from the server so it can pass it along to the client. Most routers have the ability to pass this information along. On Cisco routers, doing this requires the use of the IP Helper Address feature.