Dynamic Host Configuration Protocol is the application layer protocol which automates network-parameter assignment to network devices from one or more DHCP servers. Even in small networks, DHCP is useful because it makes it easy to add new machines to the network.
When a DHCP-configured client (a computer or any other network-aware device) connects to a network, the DHCP client sends a broadcast query requesting necessary information from a DHCP server. The DHCP server manages a pool of IP addresses and information about client configuration parameters such as default gateway ,domain name the name servers, other servers such as time servers, and so forth. On receiving a valid request, the server assigns the computer an IP address, a lease (length of time the allocation is valid), and other IP configuration parameters, such as the subnet mask and the default gateway. The query is typically initiated immediately after booting , and must complete before the client can initiate IP-based communication with other hosts.
It used the UDP protocol ,UDP port 67 for sending data to the server, and UDP port 68 for data to the client.
DHCP operations fall into four basic phases: IP discovery, IP lease offer, IP request, and IP lease acknowledgement.
DHCP clients and servers on the same subnet communicate via UDP broadcasts. If the client and server are on different subnets, IP discovery and IP request messages are sent via UDP broadcasts, but IP lease offer and IP lease acknowledgement messages are unicast.To lease the time client send the DHCPRequest within the half of the lease time.
DHCP server may have three methods of allocating IP-addresses:
Dynamic: A network administrator assigns a range of IP addresses to DHCP, and each client computer on the LAN is configured to request an IP address from the DHCP server during network initialization. The request-and-grant process uses a lease concept with a controllable time period, allowing the DHCP server to reclaim (and then reallocate) IP addresses that are not renewed.
Automatic: The DHCP server permanently assigns a free IP address to a requesting client from the range defined by the administrator. This is like dynamic allocation, but the DHCP server keeps a table of past IP address assignments, so that it can preferentially assign to a client the same IP address that the client previously had.
Static: The DHCP server allocates an IP address based on a table with MAC address/IP address pairs, which are manually filled.
1) What are the DHCP mesasges?
Answer: DHCP message are given below, all message are broadcast message
DHCP Discover
DHCP Offer
DHCP Request
DHCP Ack
DHCP release to release the IP.
2) When DHCPnack is send by Server to client?
Answer:
No comments:
Post a Comment