You are on page 1of 28

Allocating IP Addressing by

Using Dynamic Host


Configuration Protocol
Overview

The Role of DHCP in the Network Infrastructure


Adding and Authorizing the DHCP Server Service
Configuring a DHCP Scope
Configuring DHCP Reservations and Options
Configuring a DHCP Relay Agent
Dynamic Assignment of IP addresses

Dynamic assignment of IP addresses is desirable for several


reasons:
 IP addresses are assigned on-demand
 Avoid manual IP configuration
 Support mobility of laptops

3
Solutions for dynamic assignment of IP addresses

Reverse Address Resolution Protocol (RARP)


 Works similar to ARP
 Broadcast a request for the IP address associated with a
given MAC address
 RARP server responds with an IP address
 Only assigns IP address (not the default router and
subnetmask)

ARP Ethernet MAC


IP address
address
(32 bit)
(48 bit)
RARP

4
BOOTP

BOOTstrap Protocol (BOOTP)


From 1985
Host can configure its IP parameters at boot time.
3 services.
IP address assignment.
Detection of the IP address for a serving machine.
The name of a file to be loaded and executed by the client machine (boot
file name)

 Not only assign IP address, but also default router, network mask, etc.
 Sent as UDP messages (UDP Port 67 (server) and 68 (host))
 Use limited broadcast address (255.255.255.255):
These addresses are never forwarded

5
DHCP

Dynamic Host Configuration Protocol (DHCP)


 From 1993
 An extension of BOOTP, very similar to DHCP
 Same port numbers as BOOTP
 Extensions:
Supports temporary allocation (“leases”) of IP addresses
DHCP client can acquire all IP configuration parameters needed to
operate
 DHCP is the preferred mechanism for dynamic
assignment of IP addresses
 DHCP can interoperate with BOOTP clients.
6
BOOTP Interaction

(b)
(a) Argon
Argon 128.143.137.144
00:a0:24:71:e4:44 BOOTP Server 00:a0:24:71:e4:44 DHCP Server
BOOTP Response:
IP address: 128.143.137.144
BOOTP Request
00:a0:24:71:e4:44 Server IP address: 128.143.137.100
Sent to 255.255.255.255 Boot file name: filename

BOOTP can be used for


Argon
128.143.137.144
(c) downloading memory image for
00:a0:24:71:e4:44 DHCP Server
diskless workstations
TFTP
“filename” Assignment of IP addresses to hosts
is static
128.143.137.100

7
DHCP Interaction (simplified)

Argon
00:a0:24:71:e4:44 DHCP Server

DHCP Request
00:a0:24:71:e4:44
Sent to 255.255.255.255

Argon
128.143.137.144
00:a0:24:71:e4:44 DHCP Server
DHCP Response:
IP address: 128.143.137.144
Default gateway: 128.143.137.1
Netmask: 255.255.0.0

8
BOOTP/DHCP Message Format

Hardware Address
OpCode Hardware Type Hop Count
Length
Unused (in BOOTP)
Number of Seconds
Flags (in DHCP)
Transaction ID

Client IP address

Your IP address

Server IP address

Gateway IP address

Client hardware address (16 bytes)

Server host name (64 bytes)

Boot file name (128 bytes)

Options

(There are >100 different options)


9
BOOTP/DHCP

OpCode: 1 (Request), 2(Reply)


Note: DHCP message type is sent in an
option
Hardware Type: 1 (for Ethernet)
Hardware address length: 6 (for Ethernet)
Hop count: set to 0 by client
Transaction ID: Integer (used to match reply to response)
Seconds: number of seconds since the client started to boot
Client IP address, Your IP address, server IP address,
Gateway IP address, client hardware address, server host
name, boot file name:
client fills in the information that it has, leaves rest blank

10
Lesson: Adding and Authorizing the DHCP Server
Service

Why Use DHCP?


What Is Automatic Private IP Addressing?
How DHCP Allocates IP Addresses
How the DHCP Lease Generation Process Works
How the DHCP Lease Renewal Process Works
How a DHCP Server Service Is Authorized
Practice: Adding and Authorizing a DHCP Server Service
Why Use DHCP?

DHCP reduces the complexity and amount of administrative work by using


automatic TCP/IP configuration

Manual TCP/IP Configuration Automatic TCP/IP Configuration


IP addresses are supplied
IP addresses are entered manually
automatically
IP address could be entered
Correct configuration information is
incorrectly
ensured
Communication and network issues
Client configuration is updated
can result
automatically
Frequent computer moves increase
A common source of network
administrative effort
problems is eliminated
What Is Automatic Private IP Addressing?

APIPA automatically self-configures addresses when there is no DHCP


server available

Advantages Disadvantages
Serves as a DHCP server failover Forces assignment of addresses
mechanism for small networks typically not used
Automatically assigns an IP address Conceals possible connectivity
in a specific range problems
Does not work outside 169.254.x.x
subnet
Is not routable
How DHCP Allocates IP Addresses

DHCP Client2:
Non-DHCP Client: IP configuration
Static IP from DHCP server
configuration

Lease Renewal

Lease Generation

DHCP Server

DHCP Client1: DHCP


IP configuration Database
from DHCP server
IP Address1: Leased to DHCP Client1
IP Address2: Leased to DHCP Client2
IP Address3: Available to be leased
How the DHCP Lease Generation Process Works

DHCP
Server2

DHCP DHCP
Server1 Client

1 DHCP client broadcasts a DHCPDISCOVER packet

2 DHCP servers broadcast a DHCPOFFER packet

3 DHCP client broadcasts a DHCPREQUEST packet

4 DHCP Server1 broadcasts a DHCPACK packet


How the DHCP Lease Renewal Process Works

DHCP
Server2

DHCP Client
DHCP
Server1

50%
50% of
100%
87.5% oflease
ofof lease
lease
lease
duration
duration hashas
expired
expired

1 client
If the DHCPfails
Client
client sendsit’s
sends
to renew aa DHCPREQUEST
its DHCPREQUEST
lease,
lease, after
after 50%
87.5% packet
ofpacket
of
thethe
lease
leaseduration
has
has expired,
expired, thenthen
the DHCP
the DHCP
leaselease
generation
renewalprocess
processstarts
will begin
over again
again
2 a87.5%
after
with DHCPofServer1
client sends
the lease a DHCPACK
broadcasting
duration ahas packet
DHCPDISCOVER
expired
How a DHCP Server Service Is Authorized

If DHCP
DHCPServer1
Server1finds its IP
checks address
with the
on the list,
domain the service
controller starts
to obtain andof
a list
Domain
supports DHCP
authorized DHCP clients
servers
Controller
DHCP Server1

Authorized
Active Services DHCP
Directory
requests

DHCP Server2
DHCP Client Unauthorized
Does not service
DHCP Server2
If DHCP checks
Server2 does notwith
findthe
its IP DHCP requests
DHCP client receives
domainoncontroller
address IP address
to obtain
the list, the servicea does
list ofnot
from
start authorized
authorized
and support DHCP
DHCP Server1
servers
DHCP clients
DHCP authorization is the process of registering the DHCP Server service in the Active
Directory domain to support DHCP clients
What Are DHCP Scopes?

A scope is a range of IP addresses that are available to be leased

DHCP Server

LAN A LAN B
Scope A Scope B

Scope Properties
Network ID Lease duration Scope name
Subnet mask Network IP address Exclusion range
range
What Is Network Monitor?

Network Monitor:
2 3 Captures a sample of
network traffic
Uses filters to select
specific packets
Decodes the packets
1
Compiles network
statistics
4
What Is a DHCP Reservation?

A reservation is a specific IP address, within a scope, that is


permanently reserved for lease to a specific DHCP client

Workstation 1 File and Print


Server

Subnet A Subnet B

DHCP Server
Workstation 2

IP Address1: Leased to Workstation 1


IP Address2: Leased to Workstation 2
IP Address3: Reserved for File and Print Server
What Are DHCP Options?

DHCP options are configuration parameters that a DHCP server


assigns to clients

DHCP Client
DHCP Client IP Configuration Data
Client’s IP address
Client’s subnet mask
DHCP options

DHCP Server
How DHCP-Server, Scope, and Reserved-Client
Options Are Applied

DHCP Server File and Print


Windows 98 Server

Scope A Scope B

Router

Windows XP Windows XP

DHCP option applied at the


reserved-client
server
scope levellevel
How DHCP Class-Level Options Are Applied

DHCP Server File and Print


Windows 98 Server

Router Router
Scope A Scope B

Windows XP Windows XP

DHCP option applied at the


class level
Lesson: Configuring a DHCP Relay Agent

What Is a DHCP Relay Agent?


How a DHCP Relay Agent Works
How a DHCP Relay Agent Uses Hop Count
How a DHCP Relay Agent Uses Boot Threshold
Practice: Configuring a DHCP Relay Agent
What Is a DHCP Relay Agent?

A DHCP relay agent is a computer or router that listens for DHCP/BOOTP


broadcasts from DHCP clients and then relays those messages

DHCP Relay Agent DHCP Server

Unicast

Broadcast Broadcast
Subnet A Subnet B
Routers
(Non–RFC 1542
Compliant)

Client Client Client Client


How a DHCP Relay Agent Works

DHCP Relay Agent DHCP Server

Client2 Router Client3


Client1 Non-RFC 1542
(Non–RFC 1542 Compliant
Compliant)

1 Client1 broadcasts a DHCPDISCOVER packet


2 Relay agent forwards the DHCPDISCOVER message to the DHCP server

3 Server sends a DHCPOFFER message to the DHCP relay agent


4 Relay agent broadcasts the DHCPOFFER packet

5 Client1 broadcasts a DHCPREQUEST packet


6 Relay agent forwards the DHCPREQUEST message to the DHCP server

7 Server sends a DHCPACK message to the DHCP relay agent


8 Relay agent broadcasts the DHCPACK packet
How a DHCP Relay Agent Uses Hop Count

The hop count threshold is the number of routers through which the packet
can be transmitted before it is discarded

DHCP Relay Agent 2


Hop Count = 2
DHCP Relay Agent 1

DHCP Server
How a DHCP Relay Agent Uses Boot Threshold

The boot threshold is the time the DHCP relay agent will wait for a DHCP
server response before forwarding the request

Boot Threshold DHCP Server 2


= 10 seconds
DHCP Relay Agent

Local DHCP
Server
DHCP Server 3

You might also like