Sublayers Under the Network Layer: BOOTP & DHCP
How does a host get allocated an IP address? allocated manually by an administrator: OK as far
as it goes but does not scale to large networks and some networks (e.g., home networks) don't have (competent) administrators
Use the Dynamic Host Configuration Protocol
Sublayers Under the Network Layer: BOOTP & DHCP
DHCP, and its predecessor BOOTP, exist to allocate IP addresses to hosts
We start with BOOTP then describe DHCP which is similar but massively extends BOOTP
Both extend RARP
Sublayers Under the Network Layer: BOOTP & DHCP
BOOTSTRAPPING PROTOCOL: BOOTP BOOTP also supplies extra information, e.g.,
where to download an operating system: for bootstrapping diskless hosts
The source IP address in a request is 0.0.0.0: this is what we are trying to find
Destination is usually 255.255.255.255: a broadcast
“Can anyone tell me my IP address?”
Sublayers Under the Network Layer: BOOTP & DHCP
BOOTP Header
Sublayers Under the Network Layer: BOOTP & DHCP
BOOTP Header
IP addresses as described, UDP header explained later
Opcode: 1 for a request, 2 for a reply
Sublayers Under the Network Layer: BOOTP & DHCP
BOOTP Header
Hardware type: 1 for an Ethernet address Length: 6 for an Ethernet address Hop count: starts at 0 and used by BOOTP
servers that pass requests on to other servers
Sublayers Under the Network Layer: BOOTP & DHCP
BOOTP Header
Transaction ID: 32 bits of random value generated by the client and returned by the server. This allows the host to identify the reply directed to itself as there might be many BOOTP replies floating on the network
Sublayers Under the Network Layer: BOOTP & DHCP
BOOTP Header
Seconds: number of seconds elapsed since the the client started to boot. If this gets large it allows a backup BOOTP server to realise the main server might have crashed
Sublayers Under the Network Layer: BOOTP & DHCP
BOOTP Header
Client address: client fills in its IP address, if known, else 0
Sublayers Under the Network Layer: BOOTP & DHCP
BOOTP Header
Your address: in the reply the allocated IP address
Server address: which server replied
Sublayers Under the Network Layer: BOOTP & DHCP
BOOTP Header
Gateway address: a gateway for the local network
Sublayers Under the Network Layer: BOOTP & DHCP
BOOTP Header
Client hardware address: can guide the server in choosing an IP address
Sublayers Under the Network Layer: BOOTP & DHCP
BOOTP Header
Server hostname: optionally, the name of the server
Sublayers Under the Network Layer: BOOTP & DHCP
BOOTP Header
Boot filename: if the client wants to download a boot file
Sublayers Under the Network Layer: BOOTP & DHCP
BOOTP Header
Other: used by DHCP
Sublayers Under the Network Layer: BOOTP & DHCP
Dynamic Host Configuration Protocol :DHCP The Dynamic Host Configuration Protocol
extends BOOTP considerably, but is backwardly compatible (a DHCP server can reply to a BOOTP request)
DHCP is designed for general configuration of a host: address, subnet mask, gateway, name servers, and more
Usually for hosts with non-permanent connections, e.g., laptops
Sublayers Under the Network Layer: BOOTP & DHCP
DHCP has a pool of available addresses that it can assign to hosts as they need
When a host leaves, its address can be reused DHCP gives a lease time on an address If the lease expires the host can renew via
DHCP A well-behaved host will signal (via DHCP)
when it no longer needs an address
Sublayers Under the Network Layer: BOOTP & DHCP
DHCP supplies IP address Subnet mask Gateway name servers lease times print servers
Gateway boot servers mail servers host name web servers
Sublayers Under the Network Layer: BOOTP & DHCP
DHCP The data is encoded in a DHCP packet as
a tag byte to indicate the type of data a length byte the data itself
Tag 0 to pad data for alignment Tag 255 to indicate end of data
Sublayers Under the Network Layer: BOOTP & DHCP
DHCP HEADER
Sublayers Under the Network Layer: BOOTP & DHCP
Before supplying an address, DHCP should ping the network for that address: this is to check that no host is accidentally using that address already
Sublayers Under the Network Layer: BOOTP & DHCP
Before supplying an address, DHCP should ping the network for that address: this is to check that no host is accidentally using that address already
After getting an address, a host can send an ARP reply containing its own address. This gratuitous ARP informs other hosts on the network of the new address association so they can update their ARP caches
Top Related