DHCP (Dynamic host Control protocol)

advertisement

DHCP (Dynamic host Control protocol)

INTRODUCTION:

DHCP is an extension of BOOT P, which contains a database of stations assigned IP

Addresses.

Dynamically assigns an IP Address from a pool of available IP Addresses.

Eliminates the need to manually assign IP Addresses to each individual machines and keeps a track of which machine is using which IP Address

 Simplifies Network Administrator’s work

Only Servers need a permanent IP Address

Also provides other useful configuration information such as Gateway Addresses,

Address of the DNS Server, subnet mask etc

DHCP is software installed on a computer. This machine is called a DHCP Server and manages IP Address leases

For DHCP to work both a Client DHCP software and Server DHCP software are needed

HOW DHCP WORKS FROM A CLIENT PERSPEVTIVE: (Fig 8-1 p 347 E.T):

 Simply click the “ obtain an IP address automatically” option button on the WINDOWS

2000 TCP/IP properties window

Next time the computer is booted, it broadcast a DHCP Address Request to the network

A DHCP server receives the Request and sends back a message that offers to lease an IP

Address from a pool of available addresses

The Client accepts an address lease offer and sends its acceptance to the Server.

The Server offers an IP address for a specified period of time

When half the lease period expires, the Client attempts to renew the lease, which is usually granted

Lease periods are usually 24 to 72 hours

THE DHCP DISCOVERY PROCESS: See fig 8-2 p352 E.T)

DHCP Discovery process has 4 steps.

(a) DHCP Discovery Packet

(b) DHCP Request Packet

(c) DHCP Offer Packet

(d) DHCP Acknowledgment Packet

DHCP PACKET FORMAT:

FIG 8-9 P360 E.T

DHCP ENCAPSULATION:

DHCP uses UDP encapsulation as shown below. Draw fig in the space provided

Read the description of various fields of DHCP Packets in your Text book

THE STANDARD ADDRESS DISCOVERY PROCESS;

 When a DHCP client boots up, it performs the “Standard Address Discovery Process” before it can communicate on the network.

After the process completes successfully, the DHCP client tests the new IP Address ( that it just obtained from the DHCP Server) using a duplicate IP Address ARP Broadcast.

The DHCP Discovery Process actually uses 4 Packets (Fig 8-2 E.T)

(a) DHCP Discovery Packet

(b) DHCP Offer Packet

(c) DHCP Request Packet

(d) DHCP Acknowledge Packet

During the DHCP boot process, the DHCP Client receives an IP Address and a lease time

The Client determines the renewal and rebind time based on the value of the lease time

Same packet structure is used for all 4 steps with appropriate fields filed in by appropriate machines (Client or Server) as the Discovery process goes through these 4 steps.

The DHCP Discovery Packet: Fig 8.3 P353 E.T):

Same packet structure as described earlier with following settings: Source Address

0.0.0.0 and Destination Address 255.255.255.255.

The Client may specify a preferred Address ( previously assigned). Fig 8.3 shows the preferred Address 10.0.99.2. In this decode, notice that Ethernet, IP, and UDP headers have been compared. The UDP header includes a Source Port 68 and Destination Port 67

Message type value is 1 ( for Discovery Packet

Client IP (Client Hardware Address) is 00 A0 CC 30 C8 DB ( 6 Bytes )

Client may ask a series of other information which is included as Options ( See Table 8-1

P 363 E-T)

The Offer Packet:

The DHCP Server then sends an Offer Packet to offer an IP Address. The Offer Packet is a Unicast Packet.

The Fig 8.4 P355 shows the decode of an offer Packet. This fig shows the offered IP

Address is 10.1.0.1, lease time is 1800 Seconds and the subnet Mask is 255.255.0.0

The Request Packet:

Fig 8-5 P356 E.T shows a decode of a Request Packet

Once an offer is received , the Client can accept this offer by sending a DHCP Request packet or reject the offer by sending a DHCP Decline Packet.

Typically a Client will reject an offer only if it received multiple offers which can happen only if there are more than one DHCP Servers on the subnet.

The ACKNOWLEDGE PACKET:

Fig 8-6 P357 E.T

Sent from the Server to the Client to indicate the completion of the Discovery process

The Response may contain answers to any options requested by the Client for example

Clients subnet Mask, Client Default Gateway (10.0.0.1), Clients DNS Server (10.0.0.1) etc.

Manually Renewing and releasing DHCP lease:

Windows 2000 IP config Utility responds with current IP Configuration

Ip config > (Fig 8-12 P369 E.T)

You can release and renew Address lease using the following Commands

Ip config /release Releases the IP Address for the Specified adapter

Ip config / renew Renews the IP Address for the specified adapter

Download