The Dynamic Host Configuration Protocol (DHCP) is a network protocol that enables a server to automate assignment of IP addresses to hosts. A DHCP server can be configured to provide other network information like IP addresses of TFTP servers, DNS server, boot file name and vendor specific options. Commonly there are two types of address assignments, dynamic and manual. The lease of dynamic addresses is renewed periodically; manual leases are permanently assigned to hosts. With this feature, you can configure multiple pools of IP addresses for IP address assignment and tracking.
A DHCP server is configured with IP pools. The server is then instructed to use IP addresses falling into the specified range of IP while offering leases. Multiple IP pools are configured to not have duplicate or overlapping IP subnets. You can also configure a DHCP server with multiple IP ranges within an IP subnet; this confines the allocatable IP addresses within the configured IP pool.
An IP pool will be claimed valid only if it is either:
-
Dynamic pool – Has a network address, subnet mask and IP range(s)
-
Static pool – Should have a static IP-to-MAC binding.
The DHCP server will discard the invalid and incomplete pools and will only operate on the valid IP pools. The DHCP server will require at least one valid pool to start.
On a DHCP server, an IP pool is configured with various options. These options signify additional information about the network. Options are supported with explicit commands such as boot-file
. Option codes that correspond to explicit commands can not be configured with a generic option command; the generic option command requires an option code and TLV.
|
|
NOTE: RFC 2132 defines various network information that a client may request when trying to get the lease. |
|
|
The DHCP server also functions as BootP server. A manual binding configured in a static IP Pool may either service a BootP client request or a DHCP client request.
The server message DHCPinform
may be received when the server is already configured for static IPv4 addresses so that the server can to get configuration parameters dynamically.
|
|
NOTE: From RFC 2131 states that if a client has obtained a network address through some other means (e.g., manual configuration), it may use a |
|
|
To process the DHCPINFORM
packets received from a client within the given IP pool, a DHCP server has to be configured as authoritative
for that IP pool. The server is the sole authority for this IP pool so when a client requests an IP address lease where the server is authoritative, and the server has no record of that IP address, the server will respond with DHCPNAK
message which indicates that the client should no longer use that IP address. Any DHCPINFORM
packet received for a non-authoritative pool will be ignored by the DHCP server.
The authoritative
command has no effect when configured on a static pool or an incomplete pool without a network statement. In such cases, the server intentionally not send an error message.
A CLI toggle is provided under the pool context that will allow the authoritative
configuration.
|
|
NOTE: The |
|
|
A dummy pool, without the range statement, can be configured and made authoritative. A dummy pool allows static-bind entries which do not have matching dynamic pools with network statements to be configured. By creating a dummy pool on a DHCP server, the support for DHCPinform
packets will not be actively serving the client on this pool. No active leases or resource consumption will be sent to the DHCP server when this option is used.
Dummy pools help the DHCP server learn the network topology.
Example
Making the server authoritative for an IP pool changes how the server processes DHCP REQUEST
packets.
Table XX exhibits the behavior on the receiving DHCP REQUEST
and DHCP inform
packets from DHCP clients residing on either authoritative and non-authoritative pools.
Authoritative and non-authoritative pools
Authoritative Pool | Non-authoritative pool | |||||
---|---|---|---|---|---|---|
When a DHCP client sending.. | For Own IP | For IP belonging to different client | Unknown IP falling outside the range | For Own IP | For IP belonging to different client | Unknown IP falling outside the range |
DHCP INFORM | send ACK | send ACK | send ACK | DROP | DROP | DROP |
DHCP REQUEST | send ACK | send NACK | send NACK | send ACK | DROP | DROP |
Use the following command in the global configuration mode to configure the DHCP address pool name and enter the DHCP pool context.
Maximum of 128 pools are supported.
Syntax
Configure the DHCPv4 server IP address pool with either a static IP or a network IP range.
Configure the DNS (Domain Name System) domain name for translation of hostnames to IP addresses.
Static binding information for the DHCPv4 server address pool.
Validations
Validation
Error/Warning/Prompt
Configuring pool when maximum Number of pools already configured.
Maximum number of pools (128) has already been reached
Configuring Pool with a name that exceeds the maximum length requirement.
String %s too long. Allowed length is 32 characters.
Trying to delete non existing pool
The specified address pool does not exist.
Only alphanumeric characters, numerals and underscore is allowed in the pool name. Violating this would throw the following error message.
Invalid name. Only alphanumeric characters and hyphen are allowed.
Trying to delete existing pool or adding new pool when DHCP server enabled.
DHCP server should be disabled before changing the configuration.
Syntax
The DHCP server is the sole authority for the network configured under this pool. When the DHCP server is configured as authoritative, the server will respond with DHCP ACK or NACK as appropriate for all the received
DHCP REQUEST
andDHCP INFORM
packets belonging to the subnet.Non-authoritative
DHCP INFORM
packets received from the clients on a non-authoritative pool will be ignored.
Syntax
Configure the DHCP pool context to the DNS IP servers that are available to a DHCP client. List of IP addresses of the DNS servers.
Syntax
Configure the lease time for an IP address in the DHCP pool. Lease time is infinite for static pools.
Syntax
Configure the DHCP pool for the NetBIOS WINS servers that are available to a Microsoft DHCP client. List all IP addresses of the NetBIOS(WINS) name servers. The Windows Internet Naming Service (WINS) is a name resolution service that Microsoft DHCP clients use to correlate host names to IP addresses within a general grouping of networks.
Syntax
Syntax
Configure static binding information for the DHCPv4 server address pool. Manual bindings are IP addresses that have been manually mapped to the MAC addresses of hosts that are found in the DHCP database. Manual bindings are just special address pools. There is no limit on the number of manual bindings but you can only configure one manual binding per host pool.
Syntax
Syntax
Event Log Messages
Events | Debug messages |
---|---|
DHCP server is enabled globally. | DHCP server is enabled globally. |
DHCP server is enabled globally. Warnings - One or more incomplete pool configurations are found during the server startup. A dynamic pool is considered invalid, if network IP or subnet mask is not configured. A static pool is considered incomplete, if network IP, subnet mask or MAC address is not configured. |
|
DHCP server failed to start. The reason for failure is printed as the argument. | DHCP server failed to start: %s "with a manual binding. |
DHCP server is disabled globally. | DHCP server is disabled globally. |
The DHCP server configurations are deleted. | The DHCP server configurations are deleted |
Decline from client when server assigns an illegal Ipv6 address. | %s: Decline offer from %x (server) of %x because the address is illegal. |
DHCP server is enabled on a specific VLAN. | DHCP server is enabled on VLAN %d |
DHCP server is disabled on a specific VLAN. | DHCP server is disabled on VLAN %d |
Ping check is enabled and configured with specified retry count and timeout values | Ping-check configured with retry count = %d, timeout = %d |
Ping check is disabled | Ping-check is disabled |
Conflict-logging is enabled | Conflict-logging is enabled |
Conflict-logging is disabled. | Conflict-logging is disabled. |
A specific IP address is removed from the conflict logging database. | IP address %s is removed from the conflict-logging database. |
All IP addresses are removed from the conflict-logging database. | "All IP addresses are removed from the conflict-logging database |
Dynamic binding for a specific IP address is freed. | Dynamic binding for IP address %s is freed |
All the dynamic IP bindings are freed. | All the dynamic IP bindings are freed |
Remote binding database is configured for a specific URL. | Remote binding database is configured at %s |
Remote biding database is disabled. | Remote binding database is disabled |
Binding database is read from the specified URL at the specified time | Binding database read from %s at %s |
Failed to read the remote binding from the specified URL. | Failed to read the remote binding database at %s |
Binding database is written to the specified URL at the specified time. | Binding database written to %s at %s |
Failed to write the binding database to the specified URL. The reason for failure is printed as argument. | Failed to write the binding database to %s. Error: %s |
Invalid bindings are found in the database at the specified URL. | Invalid binding database at %s |
The specified VLAN does not have a matching IP pool configured.This occurs when the DHCP-server is enabled on the specified VLAN, but no IP pool is configured with a network IP matching the VLAN network IP. | VLAN %d does not have a matching IP pool |
Binding database is replicated to standby management module. | Binding database is replicated to standby management module |
DHCP server is listening for DHCP packetsThis message is displayed when DHCP server is enabled globally and DHCP server is enabled on at-least one VLAN. | DHCP server is listening for DHCP packets |
DHCP server is disabled on all the VLANs. Server is no longer listening for DHCP packets. | DHCP server is disabled on all the VLANs. Server is no longer listening for DHCP packets |
The specified IP is not offered to the DHCP client, as it is already in use. | IP address %s is not offered, as it is already in use |
No IP addresses available on the specified pool. | No IP addresses to offer from pool %s |
High threshold reached for the specified pool. Count of Active bindings and Free bindings are printed as arguments. | High threshold reached for pool %s. Active bindings: %d, Free bindings: %d |
Low threshold reached for the specified pool. Count of Active bindings and Free bindings are printed as arguments. | Low threshold reached for pool %s. Active bindings: %d, Free bindings: %d |
No active VLAN with an IP address is available to read binding database from the configured URL. | No active Vlan with an IP address available to read binding database |