DHCP protocol (Dynamic Host Configuration Protocol) is commonly used in networks for dynamic IP addressing configuration. Every user’s device needs at least an IP address to join the network and connect to services. When the computer first connects to a local network with cable or WiFi SSID, first thing is to look for the IP address, netmask, default gateway and DNS servers.
2. After the DHCP Server receives the discover message it suggests the IP addressing offering to the client host by unicast. This OFFER message contains:
3. Now after the client receives the offer it requests the information officially sending a REQUEST message to the server this time by unicast.
4. Server sends ACKNOWLEDGE message confirming the DHCP lease to client. Now the client is allowed to use new IP settings.
In theory, only an IP address and mask are needed for the device to work. This is true in a scenario the device is within the same subnet as other devices and communicates with others knowing their IP addresses. This way there is no need for going beyond our own subnet and that’s why a gateway is not needed. Using only IP addresses for communication also eliminates the need of name translations so DNS is still optional. However, in real-world scenarios, most of the communication goes beyond the subnet and relies on Fully Qualified Domain Names (FQDN).
In addition to necessary DHCP parameters, there are DHCP options like popular Option 150 used in IP Telephony to inform IP Phones about the IP address of IP PBX for proper phone registration – for example Cisco Call Manager or Asterisk PBX. Almost all DHCP server vendors are able to pass DHCP options.
You can ask yourself if there is a need for having a DHCP server in the same L2 segment (VLAN), because the DHCP OFFER message relies on the broadcast destination address which is good for the same subnet only. Right trace! But for the sake of DHCP scalability there is an option to have a DHCP server outside the subnet. In such solution, DHCP discover packets typically getting to the default gateway interface are transformed into unicast packets (DHCP discover embedded message) with giaddr field that tells the server about logical attachment identification. The packet is sent directly to the IP of the server located somewhere in the routable IP cloud. Giaddr helps the DHCP server to find the correct address pool for granting the address.
Check how to configure DHCP server on network devices.
Really good article. Especially, the point you have mentioned about Giaddr.
Awesome blog! Is your theme custom made or did you download it
from somewhere? A dewsign like yours with a few simple
tweks would really make my blog stand out. Please let me know where you got your design. Cheers
Thanks, Ross. Our design’s custom made.
Thanks a lot brother !! live long