Transcript Chapter 23

Bootstrap and Autoconfiguration
Chapter 23
Introduction
• Each computer attached to a TCP/IP internet needs
to know:
–
–
–
–
its IP address
the address of a router
which subnet mask to use
the address of a name server
• These can be found at bootstrap time
• The client and server communicate using UDP
Alternatives to RARP
• Drawbacks to RARP
– It requires direct access to network hardware, thus
difficult for an application programmer to build a server
– The reply to a request is small (32 bit IP address) and
smaller than minimum packet size on Ethernet
– The computer’s hardware address cannot be used on
networks that dynamically assign hardware addresses
• Thus, BOOTP and later DHCP
– BOOTP uses client-server, UDP and IP
– BOOTP provides other startup information as well
BOOTP Retransmission
• Responsibility for reliable communication is
placed on the client
• BOOTP requires UDP to use checksums and does
not allow fragmentation
• To handle datagram loss, BOOTP uses the
conventional timeout and retransmission technique
BOOTP Message Format
• Replies and requests have same format shown in
Figure 23.1
Bootstrap Procedure
• The client obtains an image using TFTP
• A BOOTP server does not need to run on the same
machine that stores memory images
– The server operates from a simple database that only
knows the names of memory images
– Configuration is kept separate from storage allows
administrators to configure sets of machines alike or
different
• If we have different hardware architectures, some could load
one O.S., others could load another by BOOT FILE NAME
Bootstrap Procedure
• The BOOTP server checks in the configuration database to
map the image for the specific BOOT file requested
Vendor-Specific Field
• The first four octets of this field are called a magic
cookie and define the remaining items
– Subnet mask
– Other items in Figure 23.3
– All use TLV encoding (type, length, value)
The Need for Dynamic
Configuration
• BOOTP was designed for a static environment in
which each host has a permanent network
connection
– The file did not change often because it was relatively
stable
• Then came wireless networking and portable
computing
– BOOTP does not adapt well to change
– A manager creates a file and stores the information in a
BOOTP server configuration file
Dynamic Host Configuration
• DHCP extends BOOTP in two ways
– Allows a computer to acquire all configuration needed
in a single message
• IP address, subnet mask
– Allows a computer to obtain an IP address quickly and
dynamically
• A DHCP server must have a set of IP addresses
• When a new computer connects to the network, the new
computer contacts the server and requests an address
• The server chooses one and assigns it
Dynamic Host Configuration
• DHCP allows 3 types of address assignment
– Manual configuration by manager
– Automatic configuration at attachment time
– Dynamic configuration where an address is loaned
for a limited amount of time
• The server uses the identity of the client to decide
which way to configure
Dynamic IP Address Assignment
• A DHCP server can be configured to permit an
arbitrary computer to obtain an IP address and
begin communicating
– Thus, DHCP makes it possible to autoconfigure
– After a computer has been attached to a network, the
computer uses DHCP to get the IP address, then
configures its TCP/IP to use the address
– Autoconfiguration is subject to administrative
constraints
Dynamic IP Address Assignment
• Dynamic addresses are assigned temporarily
– We say that a DHCP server leases an address to a client
for a lease period
– At the end of the lease period, the client renews the
lease or stops using the address
– How long should the lease last?
• One hour, one day, one week?
• It depends on the needs of the network and host
Obtaining Multiple Addresses
• A multi-homed computer may need to obtain
configuration information for each interface
• A relay-agent in BOOTP and DHCP relays a value
(client identifier) to the server which can
distinguish one interface from another
Address Acquisition States
• When using DHCP to obtain an address, a client is in one
of six states as shown in Figure 23.4
–
–
–
–
–
–
INITIALIZE
SELECT
REQUEST
BOUND
REBIND
RENEW
• When a client gets its IP address it starts 3 timers
– After the first expires, the client may attempt to renew the lease
– If the second expires before renewal, it attempts to rebind
– If the third expires before renewal, the client gives up the IP @
DHCP Message Format
• DHCP uses a modified BOOTP message format
• See Figure 23.5
– A DHCP server can answer BOOTP requests
– The 16-bit flags field replaces BOOTP’s unused field
• Used for broadcasting (only the high order bit)
– OPTIONS are shown in Figure 23.7
DHCP and Domain Names
• DHCP does not interact with the domain name
system
– The binding between a host name and the IP address
assigned by DHCP must be managed independently
• No name assigned
• A name is automatically assigned with the IP address
• A host can be assigned a permanent name
– The host is known by the name independent of its location
– A DNS server must change the name-to-address
binding when a host receives an IP address
• Currently there is no protocol to do this
Summary
• BOOTP provides an alternative to RARP
– Using UDP it is possible to extend bootstrapping across
a router
– It allows a machine to determine a router address, a file
server address and the name of a program it should run
– Small and simple, in ROM
• DHCP extends BOOTP by permitting a server to
allocate IP addresses automatically or dynamically
For Next Time
• Read Chapters 24 and 25