M A G N U M 6 K S W I T C H E S , M N S - 6 K U S E R G U I D E78As described earlier, the Dynamic Host Configuration Protocol (DHCP) automates theassignment of IP addresses, subnet masks, default gateway, DNS servers and other IP parameters.When a DHCP configured machine boots up or regains connectivity after a power outage ornetwork outage, the DHCP client sends a query requesting necessary information from a DHCPserver. The DHCP server listens for such requests and responds back to the client providinginformation such as the default gateway, the domain name, the DNS servers, other servers such astime servers, extent of the lease and more. The query is typically initiated immediately afterbooting up and must be completed before the client can initiate IP-based communication withother hosts. The DHCP server replies to the client with an IP address, subnet mask, defaultgateway, and other requested information such as DNS server, etc.Modes of OperationDHCP provides three modes for allocating IP addresses. The best-known mode is dynamic, inwhich the client is provided a "lease" on an IP address for a period of time. Depending on thestability of the network, this could range from hours (a wireless network at an airport or guestaccess in an office) to months (for desktops in a lab or in an office). At any time before the leaseexpires, the DHCP client can request renewal of the lease on the current IP address. A properly-functioning client will use the renewal mechanism to maintain the same IP address throughout itsconnection to a single network. Maintaining the same IP address is important to correctfunctioning of higher-layer protocols and applications. However, if the lease actually expires, theclient must initiate a new negotiation of an IP address from the server's pool of addresses. As partof the negotiation, it can request its expired IP address, but there are no guarantees that it will getthe same IP address. Many ISP’s today provide internet connectivity to the home over DSL orcable modems using the DHCP protocol to better utilize the IP space. The DSL router or thecable modem follows the same principles to allocate and reuse the IP address described above.The second mode for allocation of IP addresses is automatic (also known as DHCP Reservation),in which the address is “permanently” assigned to a client. In this mode an IP address is“reserved” based on the MAC address of the device. When the lease expires, the same IP addressis allocated back to the client as long as the MAC address matches. This guarantees the same IPaddress even after a power outage or a reboot5. The network administrators need to change theMAC address should they want to reallocate the IP address to a different device. This reservationmethod is widely used to allocate IP addresses to a specific zone or a subnet.The third mode for allocation is manual, in which the address is selected at the client (manually bythe user or by some other means) and the DHCP protocol messages are used to inform the serverthat the address has been allocated. The manual mode is rarely used as it requires human5 This is true as long as the DHCP server is accessible and responds to the query