Pages

Thursday, 23 May 2013

DHCP Server Configuration





As explained in RFC 2131, Dynamic Host Configuration Protocol, DHCP provides configuration parameters to Internet hosts. DHCP consists of two components: a protocol for delivering host-specific configuration parameters from a DHCP Server to a host and a mechanism for allocating network addresses to hosts. DHCP is built on a client/server model, where designated DHCP Server hosts allocate network addresses and deliver configuration parameters to dynamically configured hosts. By default, Cisco routers running Cisco IOS software include DHCP server and relay agent software.

DHCP supports three mechanisms for IP address allocation:

Automatic allocation—DHCP assigns a permanent IP address to a client.

Dynamic allocation—DHCP assigns an IP address to a client for a limited period of time (or until the client explicitly relinquishes the address).

Manual allocation—The network administrator assigns an IP address to a client and DHCP is used simply to convey the assigned address to the client. 

We are going to configure R1 to provide an IP address, default gateway, DNS server IP etc.

Let us verify that at the moment the DHCP client have no host-specific configuration parameters:

 

Lets now configure the router as a DHCP server.

 R1(config)#ip dhcp excluded-address 192.168.1.1 192.168.1.10
R1(config)#ip dhcp pool MYLAN
R1(dhcp-config)#default-router 192.168.1.1
R1(dhcp-config)#dns-server 192.168.1.2

Since the router and the DHCP have been allocated static IP in this pool then those IPs have to be excluded. We have decided the excluded more just for the sake of future expansion. It is not a requirement to exclude the static IPs as the router has a mechanism of detecting this.

Lets now configure the PC as a dhcp client.
 
Let us verify that the PC is indeed getting its IP and other parameters from the DHCP server.


Lets ping the gateway from the PC.

 
 


0 comments:

Post a Comment