590
C
HAPTER
56: DHCP O
VERVIEW
■
Dynamic assignment. The DHCP server assigns IP addresses to DHCP clients for
predetermined period of time. In this case, a DHCP client must apply for an IP
address at the expiration of the period. This policy applies to most clients.
Obtaining IP Addresses
Dynamically
A DHCP client undergoes the following four phases to dynamically obtain an IP
address from a DHCP server:
1
Discover: In this phase, the DHCP client tries to find a DHCP server by broadcasting
a DHCP-DISCOVER packet.
2
Offer: In this phase, the DHCP server offers an IP address. Each DHCP server that
receives the DHCP-DISCOVER packet chooses an unassigned IP address from the
address pool based on the IP address assignment policy and then sends a
DHCP-OFFER packet (which carries the IP address and other configuration
information) to the DHCP client. The transmission mode depends on the flag field
in the DHCP-DISCOVER packet. For details, see “DHCP Packet Format” on page
590.
3
Select: In this phase, the DHCP client selects an IP address. If more than one DHCP
server sends DHCP-OFFER packets to the DHCP client, the DHCP client only
accepts the DHCP-OFFER packet that first arrives, and then broadcasts a
DHCP-REQUEST packet containing the assigned IP address carried in the
DHCP-OFFER packet.
4
Acknowledge: Upon receiving the DHCP-REQUEST packet, the DHCP server
returns a DHCP-ACK packet to the DHCP client to confirm the assignment of the
IP address to the client, or returns a DHCP-NAK packet to refuse the assignment of
the IP address to the client. When the client receives the DHCP-ACK packet, it
broadcasts an ARP packet with the assigned IP address as the destination address
to detect the assigned IP address, and uses the IP address only if it does not receive
any response within a specified period.
n
The IP addresses offered by other DHCP servers (if any) are not used by the DHCP
client and are still available to other clients.
Updating IP Address
Lease
After a DHCP server dynamically assigns an IP address to a DHCP client, the IP
address keeps valid only within a specified lease time and will be reclaimed by the
DHCP server when the lease expires. If the DHCP client wants to use the IP address
for a longer time, it must update the IP lease.
By default, a DHCP client updates its IP address lease automatically by unicasting a
DHCP-REQUEST packet to the DHCP server when half of the lease time elapses.
The DHCP server responds with a DHCP-ACK packet to notify the DHCP client of a
new IP lease if the server can assign the same IP address to the client. Otherwise,
the DHCP server responds with a DHCP-NAK packet to notify the DHCP client that
the IP address will be reclaimed when the lease time expires.
If the DHCP client fails to update its IP address lease when half of the lease time
elapses, it will update its IP address lease by broadcasting a DHCP-REQUEST packet
to the DHCP server again when seven-eighths of the lease time elapses. The DHCP
server performs the same operations as those described in the previous section.
DHCP Packet Format
DHCP has eight types of packets. They have the same format, but the values of
some fields in the packets are different. The DHCP packet format is based on that
Summary of Contents for Switch 7757
Page 32: ...32 CHAPTER 1 CLI OVERVIEW...
Page 70: ...70 CHAPTER 5 LOGGING IN USING MODEM...
Page 76: ...76 CHAPTER 7 LOGGING IN THROUGH NMS...
Page 86: ...86 CHAPTER 9 CONFIGURATION FILE MANAGEMENT...
Page 120: ...120 CHAPTER 13 ISOLATE USER VLAN CONFIGURATION...
Page 126: ...126 CHAPTER 14 SUPER VLAN...
Page 136: ...136 CHAPTER 16 IP PERFORMANCE CONFIGURATION...
Page 152: ...152 CHAPTER 17 IPX CONFIGURATION...
Page 164: ...164 CHAPTER 19 QINQ CONFIGURATION...
Page 172: ...172 CHAPTER 21 SHARED VLAN CONFIGURATION...
Page 182: ...182 CHAPTER 22 PORT BASIC CONFIGURATION...
Page 198: ...198 CHAPTER 24 PORT ISOLATION CONFIGURATION...
Page 208: ...208 CHAPTER 25 PORT SECURITY CONFIGURATION...
Page 224: ...224 CHAPTER 27 DLDP CONFIGURATION...
Page 232: ...232 CHAPTER 28 MAC ADDRESS TABLE MANAGEMENT...
Page 240: ...240 CHAPTER 29 CENTRALIZED MAC ADDRESS AUTHENTICATION CONFIGURATION...
Page 280: ...280 CHAPTER 30 MSTP CONFIGURATION...
Page 348: ...348 CHAPTER 35 IS IS CONFIGURATION...
Page 408: ...408 CHAPTER 39 802 1X CONFIGURATION...
Page 412: ...412 CHAPTER 40 HABP CONFIGURATION...
Page 422: ...422 CHAPTER 41 MULTICAST OVERVIEW...
Page 426: ...426 CHAPTER 42 GMRP CONFIGURATION...
Page 480: ...480 CHAPTER 47 PIM CONFIGURATION...
Page 506: ...506 CHAPTER 48 MSDP CONFIGURATION...
Page 552: ...552 CHAPTER 51 TRAFFIC ACCOUNTING CONFIGURATION...
Page 570: ...570 CHAPTER 53 HA CONFIGURATION...
Page 582: ...582 CHAPTER 54 ARP CONFIGURATION SwitchA arp protective down recover interval 200...
Page 622: ...622 CHAPTER 58 DHCP RELAY AGENT CONFIGURATION...
Page 684: ...684 CHAPTER 61 QOS CONFIGURATION...
Page 718: ...718 CHAPTER 63 CLUSTER...
Page 738: ...738 CHAPTER 67 UDP HELPER CONFIGURATION...
Page 752: ...752 CHAPTER 69 RMON CONFIGURATION...
Page 772: ...772 CHAPTER 70 NTP CONFIGURATION...
Page 796: ...796 CHAPTER 72 FILE SYSTEM MANAGEMENT...
Page 802: ...802 CHAPTER 73 BIMS CONFIGURATION...
Page 814: ...814 CHAPTER 74 FTP AND TFTP CONFIGURATION...
Page 830: ...830 CHAPTER 75 INFORMATION CENTER...
Page 836: ...836 CHAPTER 76 DNS CONFIGURATION...
Page 852: ...852 CHAPTER 77 BOOTROM AND HOST SOFTWARE LOADING...
Page 858: ...858 CHAPTER 78 BASIC SYSTEM CONFIGURATION DEBUGGING...