04-27-2022 07:08 AM
Could you explain the DHCP server and How it Works Host By Host ?
Solved! Go to Solution.
04-27-2022 07:34 AM
The environment shown in your diagram is not a simple one. Hosts connect to a switch, which connects to a firewall, which connects to router 1, which connects to router 2, which connects to the DHCP server. And there are things about the environment that we do not know: is the switch L2 or L3? What forwards a request from a host to the DHCP server? Does the firewall have access rules that allow requests from the hosts to DHCP server and responses to return?
One of the questions we need to resolve is whether the DHCP request from a host will reach the DHCP server. The DHCP request is sent as a local broadcast. The server is in a remote subnet. So something must forward the request from the host to the server and there must be routing logic to forward traffic between the involved subnets. If the switch is L3 then it could have a helper address configured that would forward the DHCP broadcast unicast to the server. If the switch is L2 then it would need to be the firewall that forwards the request.
Another question to resolve is whether the server has an appropriate DHCP scope for the subnet where the hosts are located.
Assuming that everything is correctly set up the process is like this:
- first host sends a DHCP request as a local broadcast.
- some device receives the local broadcast and creates and sends a unicast message with the DHCP request. One of the fields in this request is the subnet in which the request was created.
- devices along the path forward the request to the server.
- the server receives the request. It checks the field looking for the remote subnet. The server looks in its scopes to see if there is a scope configured for the remote subnet.
- if the server finds a scope for the remote subnet then it looks to see if it has an available address in that scope.
- if there is an available address then the server sends a message to the remote host offering the address.
- there are messages back and forth in which the host accepts the offered address. The server now marks that address as in use.
- another host in the subnet sends a DHCP request as a local broadcast. And the process repeats itself (using a different address).
04-27-2022 07:13 AM
Not sure exactly what you are after but a DHCP server is used to allocate IPs to end devices on demand rather than having to statically configure an IP address on each device.
It is primarily used for end user devices ie. network equipment, servers etc. usually have static IPs.
Jon
04-27-2022 07:22 AM
04-27-2022 07:34 AM
The environment shown in your diagram is not a simple one. Hosts connect to a switch, which connects to a firewall, which connects to router 1, which connects to router 2, which connects to the DHCP server. And there are things about the environment that we do not know: is the switch L2 or L3? What forwards a request from a host to the DHCP server? Does the firewall have access rules that allow requests from the hosts to DHCP server and responses to return?
One of the questions we need to resolve is whether the DHCP request from a host will reach the DHCP server. The DHCP request is sent as a local broadcast. The server is in a remote subnet. So something must forward the request from the host to the server and there must be routing logic to forward traffic between the involved subnets. If the switch is L3 then it could have a helper address configured that would forward the DHCP broadcast unicast to the server. If the switch is L2 then it would need to be the firewall that forwards the request.
Another question to resolve is whether the server has an appropriate DHCP scope for the subnet where the hosts are located.
Assuming that everything is correctly set up the process is like this:
- first host sends a DHCP request as a local broadcast.
- some device receives the local broadcast and creates and sends a unicast message with the DHCP request. One of the fields in this request is the subnet in which the request was created.
- devices along the path forward the request to the server.
- the server receives the request. It checks the field looking for the remote subnet. The server looks in its scopes to see if there is a scope configured for the remote subnet.
- if the server finds a scope for the remote subnet then it looks to see if it has an available address in that scope.
- if there is an available address then the server sends a message to the remote host offering the address.
- there are messages back and forth in which the host accepts the offered address. The server now marks that address as in use.
- another host in the subnet sends a DHCP request as a local broadcast. And the process repeats itself (using a different address).
04-27-2022 02:59 PM
I am glad that my explanation was helpful. Thank you for marking this question as solved. This will help other participants in the community to identify discussions which have helpful information. This community is an excellent place to ask questions and to learn about networking. I hope to see you continue to be active in the community.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide