Networking / Beginners

DHCP and DNS

One of the main reasons that many network administrators add Linux servers to their networks is to run Internet services such as DHCP and DNS. These services were originally developed for the Unix environment, so they tend to run better under Linux than they do under Windows.

Well, that's the theory, at least. The most recent versions of Windows are probably just as good at running these services as Linux. Still, if you prefer to set up these services on a Linux server, this tutorial is for you.

Running a DHCP Server

DHCP is the TCP/IP protocol that automatically assigns IP addresses to hosts as they come on the network. (DHCP stands for Dynamic Host Control Protocol, but that won't be on the test.) For a very small network (say, fewer than ten hosts), you don't really need DHCP: You can just configure each computer to have a static IP address. For larger networks, however, DHCP is almost a must. Without DHCP, you have to manually plan your entire IP address scheme and manually configure every computer with its IP information. Then, if a critical address such as your Internet gateway router or your DNS server address changes, you have to manually update each computer on the network. As you can imagine, DHCP can save you a lot of time.

Even for small networks, however, DHCP can be a timesaver. For example, suppose that you have a notebook computer that you take back and forth between your home and office. If you don't set up a DHCP server at home, you have to change the computer's static IP address each time you move the computer. With DHCP, the computer can change IP addresses automatically.

In the following sections, how to install and configure a DHCP server on the Fedora 12 Linux distribution.

Installing DHCP

You can quickly find out whether DHCP is installed on your system by entering the following command from a shell prompt:

rpm -q dhcp

If DHCP has been installed, the package version is displayed. If not, the message package dhcp is not installed is displayed.

If DHCP isn't installed on your Linux server, you can install it by following these steps:

  1. Choose System → Administration → Add/Remove Software.
    This summons the Add/Remove Software program.
  2. Select the Servers option in the list box on the left side of the Add/Remove Software window.
    A list of server packages appears in the window's main list box.
  3. Select the Dynamic Host Configuration Protocol Software package.
  4. Click Apply.
    The Add/Remove Software program grinds and whirs for a moment and then installs the package you selected.
  5. Close the Add/Remove Software program.
    You're done! DHCP is now installed.
[Previous] [Contents] [Next]