DHCP (Dynamic Host Configuration Protocol)
Mohammed Hisham P.M
By
Mohammed Hisham P.M
What is DHCP?
Dynamic Host Configuration Protocol (DHCP) is a client/server protocol that
automatically provides an Internet Protocol (IP) host with its IP address and other
related configuration information such as the subnet mask and default gateway.
Clients should require no manual configuration by the user to connect to the
network.
Each client should be able to discover appropriate configuration information
dynamically.
This is normally accomplished through the use of a Dynamic Host Configuration
Protocol [UDP]
Mohammed Hisham P.M
DHCP
 Requires little or no administrative overhead, after initial configurations of the
DHCP server.
 Dynamically maps IP addresses to MAC addresses.
 Addresses can be leased for a predefined amount of time before the lease
expires and must be renewed by the client.
Three methods of allocating IP-addresses
Mohammed Hisham P.M
●
DDynamic allocation: A network administrator assigns a range of IP addresses to
DHCP, and each client computer on the LAN is configured to request an IP address
from the DHCP server during network initialization. The request-and-grant process
uses a lease concept.
●
AAutomatic allocation: The DHCP server permanently assigns a free IP address to a
requesting client from the range defined by the administrator
●
SStatic allocation: The DHCP server allocates an IP address based on a table with
MAC address/IP address pairs, which are manually filled in (perhaps by a network
administrator). Only clients with a MAC address listed in this table will be allocated an
IP address.
DHCP Message Format
Mohammed Hisham P.M
( There are >100 Options )
DHCP Message Type
• Message type is sent as an
option.
Value Message Type
1 DHCPDISCOVER
2 DHCPOFFER
3 DHCPREQUEST
4 DHCPDECLINE
5 DHCPACK
6 DHCPNAK
7 DHCPRELEASE
8 DHCPINFORM
Client IP: ??
Gateway: ??
DNS: ??
Client IP: 192.168.1.10/24
Gateway: 192.168.1.1
DNS: 192.168.1.6
Normal DHCP Operation
Mohammed Hisham P.M
DHCPDISCOVER
Broadcast for a DHCP Server
Pool: 192.168.1.0/24
Gateway: 192.168.1.1
DNS Server: 192.168.1.6
DHCPOFFER
MAC unicast with configuration
information
DHCPREQUEST
Broadcast requesting
configuration information sent
in DHCPOFFER
DHCPACK
Acknowledge configuration
information and begins lease
DHCP – a client-server protocol
• DHCP operates in a Client/Server environment and uses the
following messages
Mohammed Hisham P.M
DHCPDISCOVER : Client request for server
DHCPOFFER: DHCP server replies to client with configuration information
DHCPREQUEST: Client requests the use of configuration information from one of the
DHCP servers that sent an offer
Mohammed Hisham P.M
DHCPRELEASE:Client requests a release of its DHCP configuration
DHCPACK: from DHCP server acknowledges that Client can now begin to use
configuration information
}It relieves the network administrator of a great deal of manual configuration
work.
}The ability for a device to be moved from network to network and to a
automatically obtain valid configuration parameters for the current network can
be of great benefit to mobile users.
}Because IP addresses are only allocated when clients are actually active, it is
possible, by the use of reasonably short lease times and the fact that
mobile clients do not need to be allocated more than one address, to
reduce the total number of addresses in use in an organization.
Mohammed Hisham P.M
DHCP Pros
DHCP Cons
}Uses UDP, an unreliable and insecure protocol.
}DNS cannot be used for DHCP configured hosts.
}It relieves the network administrator of a great deal of manual configuration
work.
}The ability for a device to be moved from network to network and to a
automatically obtain valid configuration parameters for the current network can
be of great benefit to mobile users.
}Because IP addresses are only allocated when clients are actually active, it is
possible, by the use of reasonably short lease times and the fact that
mobile clients do not need to be allocated more than one address, to
reduce the total number of addresses in use in an organization.
Mohammed Hisham P.M
DHCP Pros
DHCP Cons
}Uses UDP, an unreliable and insecure protocol.
}DNS cannot be used for DHCP configured hosts.

DHCP Protocol

  • 1.
    DHCP (Dynamic HostConfiguration Protocol) Mohammed Hisham P.M By Mohammed Hisham P.M
  • 2.
    What is DHCP? DynamicHost Configuration Protocol (DHCP) is a client/server protocol that automatically provides an Internet Protocol (IP) host with its IP address and other related configuration information such as the subnet mask and default gateway. Clients should require no manual configuration by the user to connect to the network. Each client should be able to discover appropriate configuration information dynamically. This is normally accomplished through the use of a Dynamic Host Configuration Protocol [UDP] Mohammed Hisham P.M DHCP  Requires little or no administrative overhead, after initial configurations of the DHCP server.  Dynamically maps IP addresses to MAC addresses.  Addresses can be leased for a predefined amount of time before the lease expires and must be renewed by the client.
  • 3.
    Three methods ofallocating IP-addresses Mohammed Hisham P.M ● DDynamic allocation: A network administrator assigns a range of IP addresses to DHCP, and each client computer on the LAN is configured to request an IP address from the DHCP server during network initialization. The request-and-grant process uses a lease concept. ● AAutomatic allocation: The DHCP server permanently assigns a free IP address to a requesting client from the range defined by the administrator ● SStatic allocation: The DHCP server allocates an IP address based on a table with MAC address/IP address pairs, which are manually filled in (perhaps by a network administrator). Only clients with a MAC address listed in this table will be allocated an IP address.
  • 4.
    DHCP Message Format MohammedHisham P.M ( There are >100 Options )
  • 5.
    DHCP Message Type •Message type is sent as an option. Value Message Type 1 DHCPDISCOVER 2 DHCPOFFER 3 DHCPREQUEST 4 DHCPDECLINE 5 DHCPACK 6 DHCPNAK 7 DHCPRELEASE 8 DHCPINFORM
  • 6.
    Client IP: ?? Gateway:?? DNS: ?? Client IP: 192.168.1.10/24 Gateway: 192.168.1.1 DNS: 192.168.1.6 Normal DHCP Operation Mohammed Hisham P.M DHCPDISCOVER Broadcast for a DHCP Server Pool: 192.168.1.0/24 Gateway: 192.168.1.1 DNS Server: 192.168.1.6 DHCPOFFER MAC unicast with configuration information DHCPREQUEST Broadcast requesting configuration information sent in DHCPOFFER DHCPACK Acknowledge configuration information and begins lease
  • 7.
    DHCP – aclient-server protocol • DHCP operates in a Client/Server environment and uses the following messages Mohammed Hisham P.M DHCPDISCOVER : Client request for server DHCPOFFER: DHCP server replies to client with configuration information
  • 8.
    DHCPREQUEST: Client requeststhe use of configuration information from one of the DHCP servers that sent an offer Mohammed Hisham P.M DHCPRELEASE:Client requests a release of its DHCP configuration DHCPACK: from DHCP server acknowledges that Client can now begin to use configuration information
  • 9.
    }It relieves thenetwork administrator of a great deal of manual configuration work. }The ability for a device to be moved from network to network and to a automatically obtain valid configuration parameters for the current network can be of great benefit to mobile users. }Because IP addresses are only allocated when clients are actually active, it is possible, by the use of reasonably short lease times and the fact that mobile clients do not need to be allocated more than one address, to reduce the total number of addresses in use in an organization. Mohammed Hisham P.M DHCP Pros DHCP Cons }Uses UDP, an unreliable and insecure protocol. }DNS cannot be used for DHCP configured hosts.
  • 10.
    }It relieves thenetwork administrator of a great deal of manual configuration work. }The ability for a device to be moved from network to network and to a automatically obtain valid configuration parameters for the current network can be of great benefit to mobile users. }Because IP addresses are only allocated when clients are actually active, it is possible, by the use of reasonably short lease times and the fact that mobile clients do not need to be allocated more than one address, to reduce the total number of addresses in use in an organization. Mohammed Hisham P.M DHCP Pros DHCP Cons }Uses UDP, an unreliable and insecure protocol. }DNS cannot be used for DHCP configured hosts.

Editor's Notes

  • #3 BOOTP or the Bootstrap Protocol is limited in its capabilities (see next slide). Both BOOTP and DHCP use the same UDP port numbers. Port 67 are used by clients to send BOOTP messages and port 68 is used to by servers to send BOOTP replies. You can easily look up any RFC by going to the Internet Engineering Task Force’s website: http://www.ietf.org/rfc