Академический Документы
Профессиональный Документы
Культура Документы
Protocol -DHCP
What is DHCP ?
Client IP address
Your IP address
Server IP address
Gateway IP address
Options
1 DHCPDISCOVER
2 DHCPOFFER
3 DHCPREQUEST
4 DHCPDECLINE
5 DHCPACK
6 DHCPNAK
7 DHCPRELEASE
8 DHCPINFORM
DHCP Messages
• DHCPDISCOVER — from client
• client has no address, asking for a new one - Client broadcast to locate available servers
• DHCPOFFER — from server
• Offer of address and other parameters- Server to client in response to DHCPDISCOVER with
offer of configuration parameters.
• DHCPREQUEST — from client
• Client asks if can use the offered address- Client message to servers either (a) requesting
offered parameters from one server and implicitly declining offers from all others, (b)
confirming correctness of previously allocated address after, e.g., system reboot, or (c)
extending the lease on a particular network address.
• DHCPACK — from server - Server to client with configuration parameters, including committed
network address. i.e. Server says “yes, go ahead, the address is yours; the lease starts now.”
DHCP Messages
• DHCPNAK — from server
• “Server to client indicating client's notion of network address is incorrect (e.g., client has
moved to new subnet) or client's lease as expired
• no, you may not have that address; go to the INIT state”
• DHCPDECLINE — from client
• Client to server indicating network address is already in use. i.e. Client has detected another
machine is using the offered address
• DHCPRELEASE — from client
• Client to server relinquishing network address and canceling remaining lease
• Server expires the lease immediately
• DHCPINFORM — from client
• Client to server, asking only for local configuration parameters; client already has externally
configured network address
• Client already has a fixed IP address, but wants other network settings from the server
How does DHCP work?
• When a client needs to start up TCP/IP operations, it broadcasts a request for address
information.
• The DHCP server receives the request, assigns a new address for a specific time period (called a
lease period) and sends it to the client together with the other required configuration
information.
• This information is acknowledged by the client, and used to set up its configuration.
• The DHCP server will not reallocate the address during the lease period and will attempt to return
the same address every time the client requests an address.
• The client may extend its lease with subsequent requests, and may send a message to the server
before the lease expires telling it that it no longer needs the address so it can be released and
assigned to another client on the network.
The Client-Server Protocol
• Sends DHCPREQUEST
DHCPDISCOVER DHCPDISCOVER
DHCPOFFER DHCPOFFER
DHCPREQUEST
DHCPREQUEST
DHCPACK
DHCPRELEASE
Allocating new address
Server (not selected) Client Server (selected)
Sent on Ethernet
DHCP DISC. DHCP DISC.
broadcast address
Client selects
Collects replies configuration;
Also broadcast DHCP REQ. DHCP REQ.
in DCHP REQ
it accepts one
server’s offer
Initialization Complete (server identifier
option)
Graceful Shutdown
and implicitly
DHCPRELEASE reject rest
Discard lease
Step-by-step
DHCPREQUEST DHCPREQUEST
DHCPACK DHCPACK
Initialization complete
Subsequent DHCPACKS
ignored
Reuse of address
Server Client Server
DHCP REQ. DHCP REQ.