BOOTP and DHCP

Download Report

Transcript BOOTP and DHCP

BOOTP and DHCP
Lesson 23 - (1 of 42)
Outline:
BOOTP and DHCP
• Configuration Information
• Bootstrap Protocol
(BOOTP):
– Efficiency Enhancements
– Message Format
– Bootstrap Procedure
– Specific Areas of the
Message
• Dynamic Host
Configuration Protocol
• DHCP Message Format:
• Difference Between
BOOTP and DHCP
• DHCP Functionality
• Configuration and
Compatibility Issues
• Address Leasing in DHCP
• Problems and Concerns of
DHCP
• Acceptance of a New
Standard
Lesson 23 - (2 of 42)
Configuration Information:
• Most computers using TCP/IP need updated
configuration information when they start up
(boot).
• Examples of that type of information include:
– Default gateway
– Default file server and domain name server
– IP address and subnet mask.
– Etc.
Lesson 23 - (3 of 42)
Configuration Information:
• Two protocols are commonly used to supply the
client with this information:
– BOOTP (Bootstrap Protocol)
– DHCP (Dynamic Host Configuration Protocol)
Lesson 23 - (4 of 42)
Bootstrap Protocol (BOOTP):
• BOOTP (Bootstrap Protocol):
– Is a protocol that allows a diskless workstation
to determine it’s IP address (and other
information) without using RARP.
• BOOTP is a client / server program where a
BOOTP agent requests bootstrap information from
designated BOOTP servers.
• It uses UDP and IP, so it can be implemented in an
application, thus client / server.
Lesson 23 - (5 of 42)
Bootstrap Protocol (BOOTP):
• RARP has three drawbacks:
– Lower-level, requiring direct access to
hardware (difficult access for the average
application programmer).
– RARP only supplies IP address and not other
possible information.
– Cannot be used on networks that dynamically
assign hardware addresses.
• BOOTP handles these inefficiencies.
Lesson 23 - (6 of 42)
BOOTP Efficiency Enhancements:
• BOOTP is more efficient because a single
message contains many startup items including:
– IP addresses.
– Address of default gateway to use.
– Address of bootstrap image server.
– Vendor-specific hardware information and
subnet masks.
Lesson 23 - (7 of 42)
BOOTP Efficiency Enhancements:
Handling Service Problems
• It places all responsibility for reliable
communication of the BOOTP message on the
client program.
• Since the BOOTP configuration information must
be transferred quickly, clients are often
connectionless.
• BOOTP handles connectionless service problems
by:
– Requiring UDP to use checksums.
Lesson 23 - (8 of 42)
BOOTP Efficiency Enhancements:
Handling Service Problems
– Requests and replies are sent with the ‘DON’T
FRAGMENT’ bit set (for clients that have too
little memory for reassembly).
– Constructed to accept multiple replies and only
processes the first one (handles duplicates).
– Using time-out and retransmission techniques.
Lesson 23 - (9 of 42)
BOOTP:
Message Format
• The BOOTP Message Format contains fixed
length fields, where bootstrap requests and replies
use the same format.
• BOOTP and DHCP protocols also share the exact
same format with the exception of the OPTION
FIELD (same as VENDOR-SPECIFIC AREA in
BOOTP).
Lesson 23 - (10 of 42)
0
8
16
24
OP
HTYPE
HLEN
HOPS
TRANSACTION ID
SECONDS
UNUSED
CLIENT IP ADDRESS
YOUR IP ADDRESS
SERVER IP ADDRESS
ROUTER IP ADDRESS
CLIENT HARDWARE ADDRESS
( 16 OCTETS )
..
.
SERVER HOST NAME
( 64 OCTETS )
..
.
BOOT FILE NAME
.. ( 128 OCTETS )
.
VENDOR-SPECIFIC .AREA ( 64 OCTETS )
..
Lesson 23 - (11 of 42)
31
BOOTP:
Message Format
• OP (8-bits):
– Operation requested (Request or Reply).
• HTYPE (8-bits):
– Hardware type (Ethernet = 1).
• HLEN (8-bits):
– Length of the hardware address in octets
(Ethernet = 6).
Lesson 23 - (12 of 42)
BOOTP:
Message Format
• HOPS (8-bits):
– Allows bootstrapping across multiple gateways.
• TRANSACTION ID (32-bits):
– A number the client uses to match requests with
replies.
• SECONDS (16-bits):
– Number of seconds since the client started to
boot.
Lesson 23 - (13 of 42)
BOOTP:
Message Format
• Client IP Address (32-bits):
– Client that knows it’s IP address, places it here.
• Your IP Address (32-bits):
– If client IP address is zero in request, it is
placed here in the response.
• Server IP Address and
Router IP Address (32-bits each):
– Filled in if the client already knows these
addresses.
Lesson 23 - (14 of 42)
BOOTP:
Message Format
• All other fields are filled by the client with as
much information about the server as it knows.
• A client pads the fields with zero if it does not
know.
Lesson 23 - (15 of 42)
Bootstrap Procedure:
• Two-step Bootstrap Procedure:
– BOOTP provides the client with information
needed to obtain a bootstrap configuration
image.
– The client uses the Trivial File Transfer
Protocol (TFTP) to obtain the image from the
specified server.
Lesson 23 - (16 of 42)
Bootstrap Procedure:
• Separation of configuration and storage allows:
– Memory images to be stored on machines that
are not BOOTP servers
– And for administrators to configure sets of
machines to act independently or exactly the
same.
Lesson 23 - (17 of 42)
BOOTP:
Specific Areas of the Message
• Client Hardware Address (16-octets):
– If the client’s hardware address can be
manually configured, it will be included in this
area.
• Server Host Name (64-octets):
– Filled in by the client if it knows the servers
name.
– If not, the server will respond to a request and
fill in this field.
Lesson 23 - (18 of 42)
BOOTP:
Specific Areas of the Message
• Boot File Name (128-Octets):
– Allows the use of generic names to request
specific boot images.
– A database maps this simple name to a specific
machine architecture name.
Lesson 23 - (19 of 42)
BOOTP:
Specific Areas of the Message
• Vendor-Specific Area (64-Octets):
– Magic cookie is contained in the first 4 octets.
– It defines the format of the remaining items
found within the vendor-specific area.
Lesson 23 - (20 of 42)
BOOTP:
Specific Areas of the Message
• Form of the Magic Cookie:
• <1-octet TYPE, optional 1-octet LENGTH,
multi-octet VALUE>
• Ex.
<99.130.83.99> (specifies the standard format)
• Extensions are added to BOOTP to allow for
different configuration fields and values.
Lesson 23 - (21 of 42)
Vendor-Specific Information Items:
Item Type
Item Value
Code Length
Padding
0
-
Subnet Mask
1
4
Time of Day
2
4
255
-
End
Contents of Value
Zero - used only for
padding
Subnet mask for local
network
Time of day in universal
time
End of item list
Lesson 23 - (22 of 42)
Dynamic Host Configuration
Protocol (DHCP):
• Dynamic Host Configuration Protocol (DHCP) Designed to:
– Supply hosts with configuration parameters.
– Lease dynamically allocated IP addresses.
– Interoperate with BOOTP (acts as an
enhancement to BOOTP).
• The original definitions for DHCP can be found in
RFC-1531, RFC-1533, and RFC-1534
Lesson 23 - (23 of 42)
Dynamic Host Configuration
Protocol (DHCP):
• DHCP supports three mechanisms for IP address
allocation:
– Automatic - assigns a permanent IP address.
– Dynamic - the IP address is assigned for a
limited time.
– Manual - a network administrator assigns the
address and DHCP conveys the address to the
host.
Lesson 23 - (24 of 42)
DHCP Message Format:
• The frame format is based on BOOTP’s to capture
the BOOTP relay agent behavior.
• This is also to promote the interoperability of
existing BOOTP clients with DHCP servers.
• The only two fields that differ are:
– Flags (16-bits) = Not Used in BOOTP
– Options (Variable) = Vendor-Specific area has
been extended beyond 64 bytes to handle more
options.
Lesson 23 - (25 of 42)
0
8
16
24
OP
HTYPE
HLEN
HOPS
TRANSACTION ID
SECONDS
FLAGS
CLIENT IP ADDRESS
YOUR IP ADDRESS
SERVER IP ADDRESS
ROUTER IP ADDRESS
CLIENT HARDWARE ADDRESS
( 16 OCTETS )
..
.
SERVER HOST NAME
( 64 OCTETS )
..
.
BOOT FILE NAME
.. ( 128 OCTETS )
.
OPTIONS ( .VARIABLE )
..
Lesson 23 - (26 of 42)
31
Difference Between
BOOTP and DHCP:
• Two primary differences between BOOTP and
DHCP:
– A client can be assigned an IP addresses for a
fixed time-lease and then that address can be
reassigned again at a later time.
– DHCP provides the mechanism for the client to
acquire ALL IP configuration parameters it
needs to be fully functional.
Lesson 23 - (27 of 42)
DHCP Functionality:
• How it works:
– A client needing an IP address sends a
DHCPDISCOVER broadcast message over the
network which contains the client’s MAC
address (hardware).
Lesson 23 - (28 of 42)
DHCP Functionality:
• Any DHCP server (may be several offers) can
respond with a DHCPOFFER unicast message to
the client’s MAC address offering an:
• IP address
• Subnet mask
• IP address of the DHCP server
• Expiration time of the lease.
Lesson 23 - (29 of 42)
DHCP Functionality:
– Client selects an offer by sending a
DHCPREQUEST unicast message to the
appropriate DHCP server and accepts the
offered configuration information.
Lesson 23 - (30 of 42)
DHCP Functionality:
– The DHCP server responds with a DHCPACK
unicast message to the client and officially
assigns the address to the client node.
– It then provides DNS and/or WINS (Windows
Internet Name Service) server addresses, the
default gateway IP address, etc.
Lesson 23 - (31 of 42)
What is WINS?
• Windows Internet Naming Service (WINS):
– Microsoft has it’s own domain name service for
use on many of it’s TCP/IP networks.
– WINS is not an official Internet name service,
but is commonly used with many LANs.
– WINS, in part, allows a client node to identify
and connect to another windows machine.
– Windows 95, NT, and Windows for
Workgroups all use WINS servers.
Lesson 23 - (32 of 42)
Image source: Internetworking with TCP/IP vol I (1995 Prentice Hall, Douglas Comer)
Lesson 23 - (33 of 42)
Configuration and
Compatibility Issues:
• DHCP currently:
– Does not handle the registration of newly
configured hosts with the DNS
– Nor is it intended for use in configuring routers.
• DHCP must provide service to existing BOOTP
clients, to ensure their interoperability and
coexistence.
Lesson 23 - (34 of 42)
Configuration and
Compatibility Issues:
• Administrators setup scopes (ranges) of IP
addresses available on each subnet for dynamic
allocation by DHCP.
• Configuration options are defined either globally
or per scope as appropriate.
Lesson 23 - (35 of 42)
Configuration and
Compatibility Issues:
• When the DHCP service assigns IP addresses and
configuration options to a client, it does so based
on the scope of the subnet on which the client
resides.
• This can differ for each network in an autonomous
system.
Lesson 23 - (36 of 42)
Address Leasing in DHCP:
• Deciding efficient lease times is a key issue for
DHCP:
– Choosing times which are too short can cause
unneeded overhead on a machine, the network,
DHCP servers, and possibly administrators.
– Choosing times which are too long can waste
valuable IP addresses (to be used with other
machines) and disrupt routers which try to send
packets to an unused address.
Lesson 23 - (37 of 42)
Address Leasing in DHCP:
• The lease renewal process used with DHCP begins
when 50% of the lease period has expired.
• This occurs long before the lease expires, which
gives the machine and the user time to request and
allocate another.
Lesson 23 - (38 of 42)
Problems and Concerns of DHCP:
• Dynamic configuration is highly desirable for
large corporate environments.
• Name registration problems still haunt DHCP’s
wide-spread acceptance, but the issue is currently
being investigated.
• This will probably change with the acceptance of
IPv6.
Lesson 23 - (39 of 42)
Acceptance of a New Standard:
• The IETF has defined several RFC documents
which detail the DHCP protocol.
• Changes are also being made to handle the current
short-comings of DHCP.
• Many vendors (AT&T, Microsoft, etc.) currently
support or plan to support DHCP.
Lesson 23 - (40 of 42)
Questions
BOOTP and DHCP
• What advantages does DHCP provide over
traditional RARP or BOOTP protocols?
• What is an optimal lease time-period when
choosing an IP address to use through DHCP?
• To what advantage does it serve DHCP to use the
same message format of BOOTP? Why?
• What are some types of vendor specific
information that may be included in a BOOTP
message?
Lesson 23 - (41 of 42)
• Does your TCP/IP stack support DHCP?
Reference Materials
BOOTP and DHCP
• RFC1534: Interoperation between DHCP and BOOTP:
(http://www.cis.ohio-state.edu/htbin/rfc/rfc1534.html)
• DHCP FAQ:
(http://web.syr.edu/~jmwobus/comfaqs/dhcp.faq.html)
• RFC1541: Dynamic Host Configuration Protocol
(http://www.cis.ohio-state.edu/htbin/rfc/rfc1541.html)
• RFC1532: Clarifications and Extensions for the Bootstrap
Protocol
(http://www.cis.ohio-state.edu/htbin/rfc/rfc1532.html)
• Internetworking w/ TCP/IP vol 1, 3rd Edition: D. Comer.
Lesson 23 - (42 of 42)