22
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

  • Upload
    ryu

  • View
    49

  • Download
    1

Embed Size (px)

DESCRIPTION

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 - PowerPoint PPT Presentation

Citation preview

Page 1: Sublayers Under the Network Layer: BOOTP & DHCP

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

Page 2: Sublayers Under the Network Layer: BOOTP & DHCP

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

Page 3: Sublayers Under the Network Layer: BOOTP & DHCP

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?”

Page 4: Sublayers Under the Network Layer: BOOTP & DHCP

Sublayers Under the Network Layer: BOOTP & DHCP

BOOTP Header

Page 5: Sublayers Under the Network Layer: BOOTP & DHCP

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

Page 6: Sublayers Under the Network Layer: BOOTP & DHCP

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

Page 7: Sublayers Under the Network Layer: BOOTP & DHCP

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

Page 8: Sublayers Under the Network Layer: BOOTP & DHCP

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

Page 9: Sublayers Under the Network Layer: BOOTP & DHCP

Sublayers Under the Network Layer: BOOTP & DHCP

BOOTP Header

Client address: client fills in its IP address, if known, else 0

Page 10: Sublayers Under the Network Layer: BOOTP & DHCP

Sublayers Under the Network Layer: BOOTP & DHCP

BOOTP Header

Your address: in the reply the allocated IP address

Server address: which server replied

Page 11: Sublayers Under the Network Layer: BOOTP & DHCP

Sublayers Under the Network Layer: BOOTP & DHCP

BOOTP Header

Gateway address: a gateway for the local network

Page 12: Sublayers Under the Network Layer: BOOTP & DHCP

Sublayers Under the Network Layer: BOOTP & DHCP

BOOTP Header

Client hardware address: can guide the server in choosing an IP address

Page 13: Sublayers Under the Network Layer: BOOTP & DHCP

Sublayers Under the Network Layer: BOOTP & DHCP

BOOTP Header

Server hostname: optionally, the name of the server

Page 14: Sublayers Under the Network Layer: BOOTP & DHCP

Sublayers Under the Network Layer: BOOTP & DHCP

BOOTP Header

Boot filename: if the client wants to download a boot file

Page 15: Sublayers Under the Network Layer: BOOTP & DHCP

Sublayers Under the Network Layer: BOOTP & DHCP

BOOTP Header

Other: used by DHCP

Page 16: Sublayers Under the Network Layer: BOOTP & 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

Page 17: Sublayers Under the Network Layer: BOOTP & DHCP

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

Page 18: Sublayers Under the Network Layer: BOOTP & DHCP

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

Page 19: Sublayers Under the Network Layer: BOOTP & DHCP

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

Page 20: Sublayers Under the Network Layer: BOOTP & DHCP

Sublayers Under the Network Layer: BOOTP & DHCP

DHCP HEADER

Page 21: Sublayers Under the Network Layer: BOOTP & DHCP

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

Page 22: Sublayers Under the Network Layer: BOOTP & DHCP

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