DHCP: The Dynamic Host Configuration Protocol

19 downloads 197 Views 38KB Size Report
DHCP: The Dynamic Host Configuration Protocol. When you plug a device or computer into a network, it usually obtains an IP address for itself on the local.
DHCP: The Dynamic Host Configuration Protocol When you plug a device or computer into a network, it usually obtains an IP address for itself on the local network, sets up an appropriate default route, and connects itself to a local DNS server. The Dynamic Host Configuration Protocol (DHCP) is the hidden magic that makes this happen. The protocol lets a DHCP client “lease” a variety of network and administrative parameters from a central server that is authorized to distribute them. The leasing paradigm is particularly convenient for PCs that are turned off when not in use and for networks that must support transient guests such as laptops. Leasable parameters include: IP addresses and netmasks Gateways (default route) DNS name servers Syslog hosts WINS servers, X font servers, proxy servers, NTP servers TFTP servers (for loading a boot image) There are dozens more. Clients must report back to the DHCP server periodically to renew their leases. If a lease is not renewed, it eventually expires. The DHCP server is then free to assign the address or whatever was being leased to a different client. The lease period is configurable, but it is usually quite long, i.e. hours or days. Even if you want each host to have its own permanent IP address, DHCP can save you time and suffering. Once the server is up and running, clients can use it to obtain their network configuration at boot time. No fuss, no mess, and most importantly, a minimum of local configuration on the client machines.

How DHCP Works DHCP is a backward-compatible extension of BOOTP, a protocol originally devised to help diskless UNIX workstations boot. DHCP generalizes the parameters that can be supplied and adds the concept of a lease period for assigned values. A DHCP client begins its interaction with a DHCP server by broadcasting a “Help! Who am I?” message. If a DHCP server is present on the local network, it negotiates with the client to provide an IP address and other networking parameters. If there is no DHCP server on the local net, servers on different subnets can receive the initial broadcast message through a separate piece of DHCP software that acts as a relay agent.

When the client’s lease time is half over, the client attempts to renew its lease. The server is obliged to keep track of the addresses it has handed out, and this information must persist across reboots. Clients are supposed to keep their lease state across reboots too, although many do not. The goal is to maximize stability in network configuration. In theory, all software should be prepared for network configurations to change at a moment’s notice, but a lot of software still makes unwarranted assumptions about the continuity of the network.

Suggest Documents