0% found this document useful (0 votes)
34 views38 pages

Lecture 3.itu Csu08101 2024 25.Dhcp Server

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
34 views38 pages

Lecture 3.itu Csu08101 2024 25.Dhcp Server

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 38

Dynamic Host Configuration Protocol

(DHCP)

Lecture :ITU- CSU08101


➢ Dynamic Host Configuration Protocol (DHCP) is an application
layer protocol which is used to provide IP configuration information to
IP network clients. DHCP is based on a client-server model.
➢ DHCP provides the following information:
▪ IP addresses
▪ subnet masks
▪ default gateways
▪ DNS servers
➢ A DHCP client is configured to request network parameters
from a DHCP server on the network.
➢ A DHCP server is configured with a pool of available IP
addresses and assigns one of them to the DHCP client.
➢ IP address is assigned from a pool of addresses.
➢ In DHCP, the client and the server exchange mainly 4 DHCP
messages in order to make a connection (Discover, Offer,
Request, & Acknowledge) , also called DORA process.
These messages are exchanged as shown in the next slides
DHCP Conversation
DHCP Messages
DHCP Discover Message

➢ A DHCP client sends a broadcast packet (DHCPDiscover) to discover DHCP


servers on the network.
DHCP Offer Message

➢ The DHCP server receives the DHCPDiscover packet and responds with a DHCPOffer
packet, offering IP addressing information to the DHCP client.
DHCP Request Message

➢ The DHCP client responds by broadcasting a DHCPRequest packet, requesting


network parameters from the DHCP server.
DHCP ACK Message

➢ The DHCP server approves the lease with a DHCPACK (Acknowledgement) packet. The
packet includes the lease duration and other configuration information)
Other Messages in DHCP
DHCP Negative Acknowledgement Message

➢ Whenever a DHCP server receives a request for IP address that is

invalid according to the scopes that is configured with, it send DHCP

Nak message to client. Eg-when the server has no IP address unused

or the pool is empty, then this message is sent by the server to client.
DHCP decline

➢ If DHCP client determines the offered configuration


parameters are different or invalid, it sends DHCP decline
message to the server .
DHCP Release
➢ A DHCP client sends DHCP release packet to server to release
IP address and cancel any remaining lease time.

DHCP inform
➢ If a client address has obtained IP address manually then the client
uses a DHCP inform to obtain other local configuration
parameters, such as domain name. In reply to the DHCP inform
message, DHCP server generates DHCP ack message with local
configuration suitable for the client without allocating a new IP
address. This DHCP ack message is unicast to the client.
DHCP Components
DHCP Components
▪ DHCP Server: DHCP Server is a server that holds IP Addresses and other

information related to configuration.

▪ DHCP Client: It is a device that receives configuration information from

the server. It can be a mobile, laptop, computer, or any other electronic

device that requires a connection.

▪ DHCP Relay: DHCP relays basically work as a communication channel

between DHCP Client and Server.


DHCP Components

▪ IP Address Pool: It is the pool or container of IP Addresses possessed by


the DHCP Server. It has a range of addresses that can be allocated to
devices.
▪ Subnets: Subnets are smaller portions of the IP network partitioned to
keep networks under control.
▪ Lease: It is simply the time that states how long the information received
from the server is valid, in case of expiration of the lease, the tenant must
have to re-assign the lease.
DHCP Components
▪ Default Gateway: DHCP servers can also provide information about
the default gateway, which is the device that packets are sent to when
the destination is outside the local network.
▪ Options: DHCP servers can provide additional configuration options to
clients, such as the subnet mask, domain name, and time server
information.
▪ Renewal: DHCP clients can request to renew their lease before it
expires to ensure that they continue to have a valid IP address and
configuration information.
DHCP Components
▪ Failover: DHCP servers can be configured for failover, where two servers
work together to provide redundancy and ensure that clients can always
obtain an IP address and configuration information, even if one server goes
down.
▪ Audit Logging: DHCP servers can keep audit logs of all DHCP transactions,
providing administrators with visibility into which devices are using which
IP addresses and when leases are being assigned or renewed.
DHCP Relay Agent

▪ A DHCP relay agent is any host that forwards DHCP


packets between clients and servers.
▪ Relay agents are used to forward requests and replies between
clients and servers when they are not on the same physical
subnet
Automatic Private IP Addressing (APIPA)
➢ APIPA is a feature in Windows operating systems that enables
computers to automatically self-configure an IP address and subnet mask
when their DHCP server isn’t reachable.
➢ The IP address range for APIPA is 169.254.0.1-169.254.255.254, and the
subnet mask is 255.255.0.0.
➢ When a DHCP client boots up, it looks for a DHCP server in order to
obtain network parameters. If the client can’t communicate with the DHCP
server, it uses APIPA to configure itself with an IP address from the APIPA
range. This way, the host will still be able to communicate with other hosts
on the local network segment that are also configured for APIPA.
➢ If a host is using an IP address from the APIPA range, there is usually
a problem on the network. Check the network connectivity of the host
and the status of the DHCP server.

➢ The APIPA service also checks regularly for the presence of a DHCP
server (every three minutes). If it detects a DHCP server on the
network, the DHCP server replaces the APIPA networking addresses
with dynamically assigned addresses.
Router as a DHCP server
A router can be configured as the DHCP Server

Steps to configure Router as a DHCP server.

▪ Exclude IP addresses from being assigned by DHCP by using the ip dhcp excluded-

address FIRST_IP LAST_IP

▪ Create a new DHCP pool with the ip dhcp pool NAME command.

▪ Define a subnet that will be used to assign IP addresses to hosts with the network

SUBNET SUBNET_MASK command.

▪ Define the default gateway with the default-router IP command.


Example on RouterQ
Router(config)#ip dhcp excluded-address 192.168.10.2 192.168.10.10

Router(config)#ip dhcp excluded-address 192.168.10.254

Router(config)#ip dhcp pool BIT3

Router(dhcp-config)#network 192.168.10.0 255.255.255.0

Router(dhcp-config)#default-router 192.168.10.1

Router(dhcp-config)#
When PC7 is configured with DHCP
IP configuration verification with ipconfig on PC7
DHCP Server
➢ In a complex network, the DHCP servers are usually
contained in an server farm. Therefore clients typically
are not on the same subnet as the DHCP server as we
have seen in the previous configuration.
➢ To ensure broadcasted DHCPDISCOVER messages are
sent to the remote DHCP server, we use the ip helper-
address address command (DHCP agent)
➢ The command is entered on the interface that will
receive DHCP broadcasts
Example of a Network with DHCP Server
Router Configuration
Router(config)#int f 0/0
Router(config-if)#ip add 192.168.10.1 255.255.255.0
Router(config-if)#ip helper-address 192.168.30.2

Router(config-if)#int f 2/0
Router(config-if)#ip add 192.168.20.1 255.255.255.0
Router(config-if)#ip helper-address 192.168.30.2

Router(config-if)#int f 1/0
Router(config-if)#ip add 192.168.30.1 255.255.255.0
DHCP Server Configuration
DHCP Server Configuration
DHCP Server Configuration
PC (Clients) Configurations
Import resources on DHCP Server

❑ Dynamic Host Configuration Protocol (DHCP) – GeeksforGeeks

❑ What is DHCP (Dynamic Host Configuration Protocol)? (techtarget.com)

❑ The Role of DHCP (Dynamic Host Control Protocol) in Networking (spiceworks.com)

❑ What is DHCP? How does the DHCP server work? - ClouDNS Blog
End!!!

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy