2.8 Easy IP/DHCP
2.8.3 Configuration of the Cisco IOS DHCP server
Configuration of the Cisco IOS DHCP Server is simple and requires only a few steps:
  1. Define the DHCP database agent, an external FTP, TFTP, or RCP host storing the DHCP bindings database. Several DHCP database agents may be defined.
  2. Define and assign names to the DHCP address pool(s) from which IP addresses are allocated to clients. This includes defining the range of addresses in the pools, subnet masks, and address exclusions.
  3. On a per-address pool basis, specify DHCP options for clients where necessary, including:
    • default boot image name
    • default router(s)
    • default DNS server(s)
    • DNS domain name
    • IP address lease period (days, hours, minutes)
    • NetBIOS name server
    • NetBIOS node type (b, p, m, or h)
  4. Configure any required DHCP Forwarding functionality Intelligent DHCP Relay and Secondary Address Pools.

With the introduction of Easy IP Phase 2, Cisco IOS software also supports Intelligent DHCP Relay functionality. Generally speaking, a DHCP Relay Agent is any host that forwards DHCP packets between clients and servers. A DHCP relay agent enables the client and server to reside on separate subnets. If the Cisco IOS DHCP Server cannot satisfy a DHCP request from its own database, it can forward the DHCP request to one or more secondary DHCP servers defined by the network administrator via standard Cisco IOS "ip helper-address" functionality (ip helper-address will be covered in later in this course).

If the DHCP relay agent sees several DHCP retransmissions, it assumes that the DHCP server is not responding because of an exhausted address pool. The Intelligent DHCP Relay changes the "giaddr" field (the "gateway ID" field, or IP relay agent IP address, as described in RFC 2131) when it sees client DHCP request retransmissions, forcing the downstream DHCP Server to attempt to allocate an IP address from a different pool.4 This makes it possible for the client to boot with an IP address from a secondary address pool if the primary pool is depleted. Regular, "non-intelligent" DHCP Relays use the same giaddr field when forwarding client DHCP retransmissions, making it impossible for the client to boot if the primary address pool is depleted. The Cisco IOS DHCP Server itself enables allocation of addresses from secondary address pools. Here we assume that the router is configured with secondary IP addresses. If the client is directly connected, the Cisco IOS DHCP Server attempts to allocate an address from the primary pools. If no free addresses are available in the primary pools, the server automatically allocates an address from a secondary pool. As a result, clients can boot even if all primary addresses are allocated. If all address pools are depleted, the Cisco IOS DHCP Server silently drops the request.

Unique Address Allocation

In order to prevent assigning to clients addresses that may already be in use, the Cisco IOS DHCP Server issues ICMP echo requests to pool addresses before assigning them to clients. Although configurable, the default number of pings used to check for potential IP address conflicts is 2. DHCP address pools are stored in non-volatile RAM (NVRAM). There is no limit on the number of configurable address pools.