DHCP Process and Configuration
9:39 AM | Author: Siddhartha Ghosh

PROCESS:

1. A user turns on the computer with the DHCP client enabled on it.

2. The client PC sends broadcast request (known as DHCP DISCOVER) and then look for the DHCP server to answer.

3. The DHCP server receives the DISCOVER packet and based on the availability and defined settings, the server choose any available IP address and then give to the client. Then DHCP server sends back to the client with DHCP OFFER with that available address information.

· 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.

4. Again client sends (broadcast) a request to DHCP server known as DHCP REQUEST, in which it lets the server know that it is using the address offered by the DHCP.

5. The DHCP server then again send a acknowledgement to the client known as DHCP ACK, in which it confirm the client that the specific IP address has been assigned to it for a given period of time.

· 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.

________________________________________________________________________________

This process of assigning the IP addresses by the DHCP server also known as DORA (Discover, Offer, Request, and Acknowledgement).

When a computer uses a static IP address there can be the chances of error and conflict when two computers use the same IP address. By using the DHCP server there are no chances of such kind of conflicts and errors.

Along with the IP addresses, the DHCP server also enables the client computers to extract all the settings and configurations from the DHCP server on an IP network. These settings include the Firewall, Router, DNS, NAT, WINS, Gateway and Subnet masks settings.

The overall purpose of the DHCP server is to reduce the workload and error margins, which can occur in assigning the IP addresses manually.

The IP address assigned by the DHCP server is for the limited or leased period of time and if a client needs an to extend that leased period for the IP address then client must send a extension request to the DHCP server before this period expires. If the client do not send an extension request, then this IP address becomes free on expiration and is assigned to another client.

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.

CONFIGURATION:

•Configuring a DHCP Database Agent or Disabling DHCP Conflict Logging (Required)

A DHCP database agent is any host, for example, an FTP, TFTP, or RCP server that stores the DHCP bindings database. You can configure multiple DHCP database agents and you can configure the interval between database updates and transfers for each agent.

Router(config)# ip dhcp database url [timeout seconds | write-delay seconds]

If you choose not to configure a DHCP database agent, disable the recording of DHCP address conflicts on the DHCP server.

Router(config)# no ip dhcp conflict logging

•Excluding IP Addresses (Required)

Router(config)# ip dhcp excluded-address low-address [high-address]

•Configuring a DHCP Address Pool (Required)

Router(config)# ip dhcp pool name

Ø Configuring the DHCP Address Pool Subnet and Mask

Router(config-dhcp)# network network-number [mask | /prefix-length]

Ø Configuring the Domain Name for the Client

The domain name of a DHCP client places the client in the general grouping of networks that make up the domain.

Router(config-dhcp)# domain-name domain

Ø Configuring the Domain Name System IP Servers for the Client

Router(config-dhcp)# dns-server address [address2 ... address8]

Ø Configuring the Default Router for the Client

Router(config-dhcp)# default-router address [address2 ... address8]

Ø Configuring the Address Lease Time

Router(config-dhcp)# lease {days [hours][minutes] | infinite}

•Configuring Manual Bindings (Optional)

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 stored in NVRAM on the DHCP server.

Router(config)# ip dhcp pool name

Router(config-dhcp)# host address [mask | /prefix-length]

Router(config-dhcp)# hardware-address hardware-address type

Router(config-dhcp)# client-name name

The client name should not include the domain name

•Configuring a DHCP Server Boot File (Optional)

Router(config-dhcp)# bootfile filename

•Configuring the Number of Ping Packets (Optional)

By default, the DHCP server pings a pool address twice before assigning the address to a requesting client.

Router(config)# ip dhcp ping packets number

•Configuring the Timeout Value for Ping Packets (Optional)

By default, the DHCP server waits 500 milliseconds before timing out a ping packet.

Router(config)# ip dhcp ping timeout milliseconds

•Enabling the Cisco IOS DHCP Server Feature (Optional)

Router(config)# service dhcp

· Monitoring and Maintaining the DHCP Server

Router# clear ip dhcp binding address | *

Router# clear ip dhcp conflict address | *

Router# clear ip dhcp server statistics

Router# debug ip dhcp server {events | packets | linkage}

Router> show ip dhcp binding [address]

Router> show ip dhcp conflict [address]

Router# show ip dhcp database [url]

Router> show ip dhcp server statistics

 
ip dhcp database ftp://user:password@172.16.4.253/router-dhcp write-delay 120
ip dhcp excluded-address 172.16.1.100 172.16.1.103 
ip dhcp excluded-address 172.16.2.100 172.16.2.103
!
ip dhcp pool 0
        network 172.16.0.0 /16
        domain-name cisco.com
        dns-server 172.16.1.102 172.16.2.102
        netbios-name-server 172.16.1.103 172.16.2.103 
        netbios-node-type h-node
!
ip dhcp pool 1
        network 172.16.1.0 /24
        default-router 172.16.1.100 172.16.1.101 
        lease 30 
!
ip dhcp pool 2
        network 172.16.2.0 /24
        default-router 172.16.2.100 172.16.2.101 
        lease 30

ip dhcp pool Mars 
        host 172.16.2.254 mask 255.255.255.0 
        hardware-address 02c7.f800.0422 ieee802
        client-name Mars

        default-router 172.16.2.100 172.16.2.101 
        domain-name cisco.com
        dns-server 172.16.1.102 172.16.2.102
        netbios-name-server 172.16.1.103 172.16.2.103
        netbios-node-type h-node

DHCP Relay Agent

Place the ip helper-address command on the interface you expect to be receiving the broadcast.

By default, the ip helper-address command will forward these 8 UDP ports:


UDP
PORT Common Name
69 TFTP
67 BOOTP Client
68 BOOTP Server
37 Time Protocol
49 TACACS
53 DNS
137 NetBios
138 NetBios Datagram


Use ‘no ip forward-protocol if you don’t want to forward any of the above port through ip helper-address.

To allow all the nodes in the server farm to receive the broadcasts at Layer 2, configure the server facing ethernet interface to forward directed broadcasts with the following commands:

RTA(config)#interface e3
RTA(config-if)#ip directed-broadcast

ip dhcp relation information option

Enables the system to insert the DHCP relay agent information option in forwarded BOOT REQUEST messages to a Cisco IOS DHCP server.

rbe nasip source-interface

Specifies the IP address of an interface on the DHCP relay agent that will be sent to the DHCP server via the Agent Remote ID suboption.

This entry was posted on 9:39 AM and is filed under . You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

0 comments: