cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
420
Views
0
Helpful
4
Replies

Could you explain the DHCP server and How it Works Host By Host

raj11govind
Level 1
Level 1

Could you explain the DHCP server and How it Works Host By Host ?

1 Accepted Solution

Accepted Solutions

Richard Burts
Hall of Fame
Hall of Fame

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).

HTH

Rick

View solution in original post

4 Replies 4

Jon Marshall
Hall of Fame
Hall of Fame

 

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

I'm right now in site 1 My Dhcp server in site 2 I want to know step by step process. How client will get the IP address from the DHCP server please help me in understanding How it works Host by Host 

attached diagram for your reference  

Richard Burts
Hall of Fame
Hall of Fame

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).

HTH

Rick

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.

HTH

Rick
Review Cisco Networking products for a $25 gift card