Professional Documents
Culture Documents
DHCP
Baessa K.
Mettu University
College of Engineering and Technology
Department of Information Technology
1 Introduction
Components of DHCP
2 DHCPv4
DHCPv4 Operation
DHCPv4 Message Format
DHCPv4 Discover and Offer Messages
Configuring a Basic DHCPv4 Server
Benefits of DHCP
Outline
1 Introduction
Components of DHCP
2 DHCPv4
DHCPv4 Operation
DHCPv4 Message Format
DHCPv4 Discover and Offer Messages
Configuring a Basic DHCPv4 Server
Benefits of DHCP
Introduction
Introduction …
Introduction …
Introduction …
Outline
1 Introduction
Components of DHCP
2 DHCPv4
Components of DHCP
1 DHCP server
• A networked device running the DCHP service that holds IP addresses
and related configuration information.
• This is most typically a server or a router but could be anything that
acts as a host, such as an SD-WAN appliance.
2 DHCP client
• The endpoint that receives configuration information from a DHCP
server.
• This can be a computer, mobile device, IoT endpoint or anything else
that requires connectivity to the network.
3 IP address pool
• The range of addresses that are available to DHCP clients.
• Addresses are typically handed out sequentially from lowest to highest.
Components of DHCP
1 DHCP server
• A networked device running the DCHP service that holds IP addresses
and related configuration information.
• This is most typically a server or a router but could be anything that
acts as a host, such as an SD-WAN appliance.
2 DHCP client
• The endpoint that receives configuration information from a DHCP
server.
• This can be a computer, mobile device, IoT endpoint or anything else
that requires connectivity to the network.
3 IP address pool
• The range of addresses that are available to DHCP clients.
• Addresses are typically handed out sequentially from lowest to highest.
Components of DHCP
1 DHCP server
• A networked device running the DCHP service that holds IP addresses
and related configuration information.
• This is most typically a server or a router but could be anything that
acts as a host, such as an SD-WAN appliance.
2 DHCP client
• The endpoint that receives configuration information from a DHCP
server.
• This can be a computer, mobile device, IoT endpoint or anything else
that requires connectivity to the network.
3 IP address pool
• The range of addresses that are available to DHCP clients.
• Addresses are typically handed out sequentially from lowest to highest.
Components of DHCP …
4 Subnet
• IP networks can be partitioned into segments known as subnets.
• Subnets help keep networks manageable.
5 Lease
• The length of time for which a DHCP client holds the IP address
information.
• When a lease expires, the client must renew it.
Components of DHCP …
4 Subnet
• IP networks can be partitioned into segments known as subnets.
• Subnets help keep networks manageable.
5 Lease
• The length of time for which a DHCP client holds the IP address
information.
• When a lease expires, the client must renew it.
Outline
1 Introduction
Components of DHCP
2 DHCPv4
DHCPv4 Operation
DHCPv4 Message Format
DHCPv4 Discover and Offer Messages
Configuring a Basic DHCPv4 Server
Benefits of DHCP
Basic Idea
Outline
1 Introduction
2 DHCPv4
DHCPv4 Operation
DHCPv4 Message Format
DHCPv4 Discover and Offer Messages
Configuring a Basic DHCPv4 Server
Benefits of DHCP
Introducing DHCPv4
Introducing DHCPv4 …
Introducing DHCPv4 …
Introducing DHCPv4 …
Introducing DHCPv4 …
DHCPv4 Operation
DHCPv4 Operation …
DHCPv4 Operation …
• When the client boots (or otherwise wants to join a network), it
begins a four step process to obtain a lease.
1 DHCP Discover (DHCPDISCOVER)
• A client starts the process with a broadcast DHCPDISCOVER message
that has its own MAC address to discover available DHCPv4 servers.
• The DHCPDISCOVER message finds DHCPv4 servers on the network.
• Because the client has no valid IPv4 information at bootup, it uses
Layer 2 and Layer 3 broadcast addresses to communicate with the
server.
2 DHCP Offer (DHCPOFFER)
• When the DHCPv4 server receives a DHCPDISCOVER message, it
reserves an available IPv4 address to lease to the client.
• The server also creates an ARP entry consisting of the MAC address of
the requesting client and the leased IPv4 address of the client.
• The DHCPv4 server sends the binding DHCPOFFER message to the
requesting client.
• The DHCPOFFER message is sent as a unicast, using the Layer 2
MAC address of the server as the source address and the Layer 2 MAC
address of the client as the destination.
Baessa K. (Mettu University) 04 DHCP July 13, 2021 18 / 40
DHCPv4 DHCPv4 Operation
DHCPv4 Operation …
• When the client boots (or otherwise wants to join a network), it
begins a four step process to obtain a lease.
1 DHCP Discover (DHCPDISCOVER)
• A client starts the process with a broadcast DHCPDISCOVER message
that has its own MAC address to discover available DHCPv4 servers.
• The DHCPDISCOVER message finds DHCPv4 servers on the network.
• Because the client has no valid IPv4 information at bootup, it uses
Layer 2 and Layer 3 broadcast addresses to communicate with the
server.
2 DHCP Offer (DHCPOFFER)
• When the DHCPv4 server receives a DHCPDISCOVER message, it
reserves an available IPv4 address to lease to the client.
• The server also creates an ARP entry consisting of the MAC address of
the requesting client and the leased IPv4 address of the client.
• The DHCPv4 server sends the binding DHCPOFFER message to the
requesting client.
• The DHCPOFFER message is sent as a unicast, using the Layer 2
MAC address of the server as the source address and the Layer 2 MAC
address of the client as the destination.
Baessa K. (Mettu University) 04 DHCP July 13, 2021 18 / 40
DHCPv4 DHCPv4 Operation
DHCPv4 Operation …
DHCPv4 Operation …
• Lease Renewal
1 DHCP Request (DHCPREQUEST)
• Before the lease expires, the client sends a DHCPREQUEST message
directly to the DHCPv4 server that originally offered the IPv4 address.
• If a DHCPACK is not received within a specified amount of time, the
client broadcasts another DHCPREQUEST so that one of the other
DHCPv4 servers can extend the lease
2 DHCP Acknowledgment (DHCPACK)
• On receiving the DHCPREQUEST message, the server verifies the lease
information by returning a DHCPACK
Outline
1 Introduction
2 DHCPv4
DHCPv4 Operation
DHCPv4 Message Format
DHCPv4 Discover and Offer Messages
Configuring a Basic DHCPv4 Server
Benefits of DHCP
Outline
1 Introduction
2 DHCPv4
DHCPv4 Operation
DHCPv4 Message Format
DHCPv4 Discover and Offer Messages
Configuring a Basic DHCPv4 Server
Benefits of DHCP
• The DHCP server picks an IP address from the available pool for that
segment, as well as the other segment and global parameters.
• The DHCP server puts them into the appropriate fields of the DHCP
packet.
• The DHCP server then uses the hardware address of A (in CHADDR)
to construct an appropriate frame to send back to the client
• The client and server send acknowledgment messages, and the
process is complete
Outline
1 Introduction
2 DHCPv4
DHCPv4 Operation
DHCPv4 Message Format
DHCPv4 Discover and Offer Messages
Configuring a Basic DHCPv4 Server
Benefits of DHCP
DHCPv4 Example
• R1 is configured as a DHCPv4 server for the 192.168.10.0/24 and
192.168.11.0/24 LANs using the example topology
1 R1( config )# ip dhcp excluded-address 192.168.10.1
192.168.10.9
2 R1( config )#
3 R1( config )# ip dhcp pool LAN-POOL-1
4 R1( dhcp-config )# network 192.168.10.0 255.255.255.0
5 R1( dhcp-config )# default-router 192.168.10.1
6 R1( dhcp-config )# dns-server 192.168.11.5
7 R1( dhcp-config )# domain-name meu.edu.et
8 R1( dhcp-config )# exit
9 R1( config )#
10 R1( config )# ip dhcp excluded-address 192.168.11.1
192.168.10.9
11 R1( config )# ip dhcp excluded-address 192.168.11.254
12 R1( config )#
13 R1( config )# ip dhcp pool LAN-POOL-2
14 R1( dhcp-config )# network
Baessa K. (Mettu University)
192.168.11.0 255.255.255.0
04 DHCP July 13, 2021 36 / 40
DHCPv4 Configuring a Basic DHCPv4 Server
Disabling DHCPv4
Verifying DHCPv4
• The show ip dhcp binding command displays a list of all IPv4 address
to MAC address bindings that have been provided by the DHCPv4
service.
• The show ip dhcp server statistics command verifies that messages
are being received or sent by the router.
• This command displays count information regarding the number of
DHCPv4 messages that have been sent and received.
Verifying DHCPv4
• The show ip dhcp binding command displays a list of all IPv4 address
to MAC address bindings that have been provided by the DHCPv4
service.
• The show ip dhcp server statistics command verifies that messages
are being received or sent by the router.
• This command displays count information regarding the number of
DHCPv4 messages that have been sent and received.
Outline
1 Introduction
2 DHCPv4
DHCPv4 Operation
DHCPv4 Message Format
DHCPv4 Discover and Offer Messages
Configuring a Basic DHCPv4 Server
Benefits of DHCP
Benefits of DHCP
Benefits of DHCP