Configuring DHCP Client

DHCP applications

Advantages of DHCP

DHCP terms

DHCP Client Configuration Task list

Obtain an IP address for Ethernet interface

Assigning a DHCP-Server address

Configuring DHCP protocol parameters

Obtain an IP address from the DHCP SERVER for PPP exchanging process

Monitor DHCP

DHCP Client Configuration examples

DHCP (Dynamic Host Configuration Protocol) protocol provides Network configuration parameters for the host on the Internet. For details about DHCP, see RFC 2131. Allocating IP ADDRESS on interface is a major function of DHCP on routers. DHCP protocol supports 3 IP ADDRESS disbribution mechanisms:

l        Auto allocationDHCP server allocates a permanent IP ADDRESS to a client

l        Dynamic allocationDHCP server allocates an IP ADDRESS to a client for a period of time or until the client gives up the right of using this address

l        Manual allocationDHCP server managers assign an IP address manually and transfer this address to a client through DHCP protocol

DHCP applications

There are several DHCP applications. Use DHCP protocol when the following requests exists:

To allocate IP ADDRESS, traffic and other related resources (such as corresponding gateway), configure DHCP client.

When an interface on a router connects to A device on the other end through PPP and another interface is accessing DHCP, users may obtain an IP address from DHCP SERVER by DHCPprotocol and allocate that IP address to A device through IPCP.

Advantages of DHCP

In exiting router versions, DHCP clients are only supported on Ethernet interface and DHCP protocol packets process is supported on all types of interfaces. The function provides the following advantages:

l        Reduce configuration time

l        Reduce configuration errors

l        Manage router interface IP addresses with DHCP SERVER

DHCP terms

DHCP protocol is based on Server/Client structure. Therefore, DHCP-Server and DHCP-Client exists in a DHCP environment:

DHCP-srever to allocate and take back DHCP protocol-related resources (such as IP ADDRESS, leasing time, etc) device

DHCP-Client – obtain IP ADDRESS and other information from DHCP-Server and used in local system devices

As mentioned above, DHCP dynamic allocation requires time:

Leasing time a valid period of time start from an IP ADDRESS resource is allocated by a DHCP-Server. After this period of time, the corresponding resources is going to be taken back by DHCP-Server. To reuse the resource, users have to apply for DHCP-Client again.

DHCP Client Configuration Task list

Make sure there is at least one DHCP server on the network before configuring any DHCP. The next section explains how to use DHCP to execute the following tasks:

l        Obtain an IP ADDRESS for Ethernet interface

l        Assigning a DHCP-Server address

l        Configuring DHCP protocol parameters

l        Obtain an IP address from the DHCP SERVER for PPP negotiation process

l        Monitor DHCP

 

Obtain an IP address for Ethernet interface

Obtain an IP ADDRESS by DHCP protocol router on the Ethernet interface and execute the following Commands on Ethernet interface:

Step

Command

Function

1 .

ip address dhcp

To assigning a DHCP protocol to configure the Ethernet interface IP ADDRESS

 

Assigning a DHCP-Server address

If there are DHCP-Server addresses are already known, users may assign these addresses to reduce the exchanging time for processing these address. Execute the following Commands under Global configuration mode.

Step

Command

Function

1 .

ip dhcp-server ip-address

To assign DHCP SERVER IP ADDRESS

While in Obtain one IP ADDRESS from Ethernet Interface, the Command is optional .

 

Configuring DHCP protocol parameters

Adjust the parameters for DHCP protocol exchange as needed. Execute the following Commands under Global configuration mode:

Step

Command

Function

1 .

ip dhcp client minlease seconds

To assign the minimum leasing time

 

Step

Command

Function

1 .

ip dhcp client retransmit count

To assign the time for resending protocol packets

 

Step

Command

Function

1 .

ip dhcp client select seconds

To assign SELECT interval

While in Obtain one IP ADDRESS from Ethernet Interface, the above Command is optional.

 

Obtain an IP address from the DHCP SERVER for PPP exchanging process

For detail example, see chapters about “configure PPP”.

 

Monitor DHCP

View the DHCP-Server (including manually assigned) information. Execute the following Command under supervisor mode:

Step

Command

Function

1 .

show dhcp server

To display DHCP SERVER information

View IP ADDRESS information. Execute the following Command under supervisor mode:

Step

Command

Function

1 .

show dhcp lease

To display IP ADDRESS resource and related information

In addition, if users allocate an IP ADDRESS for Ethernet interface with DHCP protocol, they may view Ethernet by show interface Command to make sure whether the IP ADDRESS is success.

DHCP Client Configuration examples

DHCP Client configuration is shown as follows.

 

Obtaining an IP ADDRESS example for Ethernet interface

The following example allocates an IP ADDRESS by DHCP protocol for ethernet1/1interface.

!

interface Ethernet1/1

 ip address dhcp