10.1 Introduction

Download Report

Transcript 10.1 Introduction

10.1 Introduction
Two closely related higher layer protocols (application layer) are
introduced in this chapter for dynamic client IP address configuration
without the use of RARP. A possible scenario is a lab with 32 internet
ports shared by 200 students in different shifts, and the students have
their own machines to plug into the ports.
• Main drawbacks of RARP:
– Low level protocol that requires direct access to the network
hardware, difficult for an application programmer to build a server.
– RARP server replies only the four octets IP address, without any
other information.
– RARP uses the connection’s hardware address to identify the
machine. It cannot be used for dynamic IP allocation
CSE5803 Advanced Internet Protocols and Applications (10)
1
•
BOOTP was developed to overcome the drawbacks and DHCP was
subsequently proposed to succeed BOOTP.
10.2 BOOTP: Using IP to Determine IP
•
•
•
BOOTP uses UDP to carry its messages, and allows cross router
delivery.
BOOTP’s IP client request and server reply are both communicated
with limited broadcast (IP=255.255.255.255), which means a local
broadcast. (Why the reply is also broadcasted, under what
circumstance it does not have to be broadcasted?)
BOOTP reliability:
– Retransmission timeout for client request. The retransmission
timer starts from a short, random value, and grows larger each
time a reply is not heard, until 60 seconds.
CSE5803 Advanced Internet Protocols and Applications (10)
2
– BOOTP requires UDP checksums since IP does not have
checksum on data, and have IP do not fragment bit set.
– BOOTP allows multiple replies but only accepts the first.
10.3 BOOTP Message Format
• Fixed length fields and same format for client requests and server
replies.
CSE5803 Advanced Internet Protocols and Applications (10)
3
• Field OP indicates whether a request (1) or a reply (2).
• HTYPE and HLEN specify the network hardware type and length of
hardware address. (Ethernet has 1, 6 respectively).
• A client sets the HOPS field 0, if a router passes the BOOTP to another
router, it will increase this field.
• TRANSACTION ID contains an integer that diskless machines use to
match responses with requests.
• SECONDS field reports the number of seconds since the client started
to boot.
• CLIENT IP ADDRESS, if the client knows its IP address, this field is
filled. It may request boot file information.
• YOUR IP ADDRESS, this field is filled by the replying server to
inform the client’s IP address.
• SERVER IP/ROUTER IP/SERVER HOST NAME: If these fields are
non zero, only the specified server can answer the request, otherwise,
any server can reply.
CSE5803 Advanced Internet Protocols and Applications (10)
4
• CLIENT H/W ADDRESS: Client’s MAC address. The server cannot
communicate with the client using this initially because the client does
not know its IP address. It may discard IP datagrams with a unicast IP.
• BOOT FILE NAME: the client may put an OS name such as “unix”
and the server will match it with a file name and put it in reply (same
field). The client will then use TFTP (another protocol) to obtain the
boot file.
• VENDOR-SPECIFIC field, can be used by the server to supply
information such as subnet mask (ICMP will not be used in this the
case) and time of day, etc.
10.4 BOOTP Drawbacks
• BOOTP server needs store a table of recognized host connections with
their hardware address, IP address and other parameters. This is
created and can only be changed by the administrator. BOOTP only
improves on the first two drawbacks of RARP.
• BOOTP is suitable for relatively stable environment, but do not solve
the scenario given in section 10.1.
CSE5803 Advanced Internet Protocols and Applications (10)
5
10.5 Dynamic Host Configuration - DHCP
• BOOTP does not actually carry out dynamic IP allocation, it needs to
know the host beforehand and carries out a one-to-one mapping.
• DHCP provides the following three types of address assignments:
– Manual configuration similar to BOOTP
– Permanent address allocation when a computer first attaches to a
network
– Dynamic allocation in which a server can load an address to a
computer for a limited period of time.
• DHCP server manages a set of IP addresses provided by the
administrator. It also follows the rules set up by the administrator.
• In dynamic address assignment, an address is leased by the server to a
host for a finite period of time. The client must choose to renew or stop
using the IP at the end of this period.
CSE5803 Advanced Internet Protocols and Applications (10)
6
• The period of lease depends on the needs of the particular network and
host. The administrator can decide the period of lease. In extreme, this
can be infinity, thus the same as permanent address allocation.
• If the renewal is not successful and the host still requires IP, it will go
into the initial IP acquisition stage. 50% lease time-renewal request,
87.5% rebinding, 100% go back to initial stage.
• Early lease termination is allowed.
• DHCP broadcast address requests like BOOTP. If there are more than
one reply from different servers, the client will select from one and
verifies the acceptance with that server.
• DHCP reply can be broadcasted like BOOTP, or unicasted through
layer 2 hardware address. This depends on a bit in the FLAGS field.
CSE5803 Advanced Internet Protocols and Applications (10)
7
10.6 DHCP Message Format
CSE5803 Advanced Internet Protocols and Applications (10)
8
• It can be seen that most DHCP fields are identical to BOOTP fields,
they are compatible. This means that DHCP servers can answer
BOOPT requests, too.
• FLAGS field: only the first bit is used, when it is set, the DHCP reply
is broadcasted.
• DHCP OPTIONS: DHCP uses this field to communicate IP address
and lease duration and other relevant information.
• DHCP is a six-state protocol and uses the following 7 types of
messages with OPTIONS:
– DHCPDISCOVER
– DHCPOFFER
– DHCPREQUEST
– DHCPDECLINE
– DHCPACK
– DHCPNACK
– DHCPRELEASE
CSE5803 Advanced Internet Protocols and Applications (10)
9