Networking, Security & Cloud Knowledge

Showing posts with label LAN. Show all posts
Showing posts with label LAN. Show all posts

Monday, December 26, 2011

022- DHCP

DHCP( Dynamic Host Configuration Protocol ) 
  • DHCP  is a network configuration protocol for hosts on Internet Protocol (IP) networks, It used to configure IP ADDRESS, Default Gateway, Prefix, DNS and other information into client.
  • DHCP was first defined as a standards protocol (RFC 1531 in October 1993, modified version  in 1997 RFC 2131 ), as an enhancement to the BOOTP (Bootstrap Protocol, RFC 951).
  • BOOTP required manual intervention to add configuration information for each client, and did not provide a mechanism for reclaiming IP addresses.
  •  The BOOTP protocol itself was first defined in as a replacement for the Reverse Address Resolution Protocol (RARP). The primary reason  for replacing RARP with BOOTP was that RARP was a data link layer protocol. Which introduced difficulties in  implementation on many server platforms, and required that a server be present on each individual network link.
  • BOOTP introduced the innovation of a relay agent, which allowed the forwarding of BOOTP packets off the local network using standard IP routing, thus one central BOOTP server could serve hosts on many IP subnets.
  • DHCPv6  (RFC 3315) added a DHCPv6 mechanism for prefix delegation. DHCPv6 ( RFC 3633) was further extended to provide configuration information to clients configured using stateless address autoconfiguration in RFC 3736.
  • DHCP & BOOTP uses the two ports assigned by IANA
    • Destination UDP port 67 for sending data to the server, and 
    • UDP port 68 for data to the client.
  • DHCP operations is fours step process: 
    • IP discovery, 
    • IP lease offer, 
    • IP request, and
    • IP lease acknowledgement.
NOTE: Initially DHCP clients and servers on the same subnet communicate via UDP broadcasts.Whereas Clients requesting renewal of an existing lease may communicate directly via UDP unicast, since the client already has an valid IP address at that point.


After the client obtains an IP address, the client may use the Address Resolution Protocol (ARP) to prevent IP conflicts caused by overlapping address pools of DHCP servers. Here special type of ping packet is used called as Gratuitous ping.


Other information exchanged using DHCP  

 

DHCP information 

The client may also request repeat data for a particular application. For example, browsers use DHCP Inform to obtain web proxy settings via WPAD. Such queries do not cause the DHCP server to refresh the IP expiry time in its database.

 

DHCP releasing The client can sends a request to the DHCP server to release the DHCP information and the client deactivates its IP address.

 

Client configuration parameters in DHCP
A DHCP server can provide optional configuration parameters to the client. RFC 2132 describes the available DHCP options defined by Internet Assigned Numbers Authority (IANA) - DHCP and BOOTP PARAMETERS.

A DHCP client can select, manipulate and overwrite parameters provided by a DHCP server.

 

Options An option exists to identify the vendor and functionality of a DHCP client. DHCP client can communicate to the server that it is using a certain type of hardware or firmware is to set a value in its DHCP requests called the Vendor Class Identifier (VCI) (Option 60). Which allows a DHCP server to differentiate between the two kinds of client machines and process the requests from the two types of modems appropriately. The value set using this option give the DHCP server a hint about any required extra information that this client needs in a DHCP response.