Configuring DHCP


DHCP supports three mechanisms for IP address allocation:

the basic steps that occur when a DHCP client requests an IP address from a DHCP Server. The client, Host A, sends a DHCPDISCOVER broadcast message to locate a Cisco IOS DHCP Server. A DHCP Server offers configuration parameters (such as an IP address, a MAC address, a domain name, and a lease for the IP address) to the client in a DHCPOFFER unicast message.

Note A DHCP client may receive offers from multiple DHCP Servers and can accept any one of the offers; however, the client usually accepts the first offer it receives. Additionally, the offer from the DHCP Server is not a guarantee that the IP address will be allocated to the client; however, the server usually reserves the address until the client has had a chance to formally request the address.

 


 
Note The formal request for the offered IP address (the DHCPREQUEST message) that is sent by the client is broadcast so that all other DHCP Servers that received the DHCPDISCOVER broadcast message from the client can reclaim the IP addresses that they offered to the client.

If the configuration parameters sent to the client in the DHCPOFFER unicast message by the DHCP Server are invalid (a misconfiguration error exists), the client returns a DHCPDECLINE broadcast message to the DHCP Server.

The DHCP Server will send to the client a DHCPNAK denial broadcast message, which means the offered configuration parameters have not been assigned, if an error has occurred during the negotiation of the parameters or the client has been slow in responding to the DHCPOFFER message (the DHCP Server assigned the parameters to another client) of the DHCP Server.

 
•If the client is directly connected (the gi-addr field is zero), the DHCP Server matches the DHCPDISCOVER with DHCP pool(s) that contain the subnet(s) configured on the receiving interface. If the interface has secondary IP addresses, the subnets associated with the secondary IP addresses are examined for possible allocation only after the subnet associated with the primary IP address (on the interface) is exhausted.
The Cisco IOS DHCP Server feature offers the following benefits:
Because the DHCP Server maintains configurations for several subnets, an administrator only needs to update a single, central server when configuration parameters change.
Before you configure the Cisco IOS DHCP Server feature, complete the following tasks:
•Decide on a DNS domain name.
DHCP Client Overview
The DHCP Server database is organized as a tree. The root of the tree is the address pool for natural networks, branches are subnetwork address pools, and leaves are manual bindings to clients. Subnetworks inherit network parameters and clients inherit subnetwork parameters. Therefore, common parameters, for example the domain name, should be configured at the highest (network or subnetwork) level of the tree.

Note Inherited parameters can be overridden. For example, if a parameter is defined in both the natural network and a subnetwork, the definition of the subnetwork is used.

Address leases are not inherited. If a lease is not specified for an IP address, by default, the DHCP Server assigns a one-day lease for the address.

 
To configure the Cisco IOS DHCP Server feature, perform the tasks described in the following sections. First configure a database agent or disable conflict logging, then specify IP addresses that the DHCP Server should not assign (excluded addresses) and should assign (a pool of available IP addresses) to requesting clients. The tasks in the first three sections are required. The tasks in the remaining sections are optional.
•Enabling the Cisco IOS DHCP Server and Relay Agent Features (Optional)
•Excluding IP Addresses (Required)
•Configuring a DHCP Address Pool (Required)
•Configuring a DHCP Server Boot File (Optional)
•Configuring the Number of Ping Packets (Optional)
•Configuring the Timeout Value for Ping Packets (Optional)
•Enabling the Cisco IOS DHCP Client on Ethernet Interfaces (Optional)

 

 

 

 

 

 


 
Note You can not configure manual bindings within the same pool that is configured with the network command. To configure manual bindings, see the "Configuring Manual Bindings" section.

 

 

 

 

 

 

 
  
.
.
.

 

 

 

 
  
  

 

 

 

 

 
Note Use this command in privileged EXEC mode.

 

 
!
!
!


!
! name to ip address
!
!
!

No comments:

Post a Comment