In: Computer Science
Network administrators warn against configuring a file server to use DHCP. Explain what would happen if a file server was configured to use DHCP and, due to a power outage, the file server and DHCP server rebooted at the same time? Justify your answer.
Network administrators warn against configuring a file server to use DHCP. Explain what would happen if a file server was configured to use DHCP and, due to a power outage, the file server and DHCP server rebooted at the same time? Justify your answer.
Answer:
Explain what would happen if a file server was configured to use DHCP.
Network administrators warn against configuring a file server to use DHCP (Dynamic Host Control Protocol) because it automatically assigns an IP address to the file server from a defined scope of IP addresses configured in that network. The users in that network may not have any idea as to what IP address they need to contact to communicate with the file server.
To overcome this problem, Network administrators suggest to assign a static IP address to the file server. This will allow the users of that network to communicate with the file server without any change in the IP address. For example, you send a letter to your friend on his address but your friend keeps on changing his house address due to this your letter is not delivered to him. But if your friend is using one permanent address then it is easy for you to send a letter to him which can be delivered with confirmation.
Due to a power outage, the file server and DHCP server rebooted at the same time? Justify your answer.
How DHCP assigns an IP address when the file server is restarted:
1) When the file server is restarted as a DHCP client it sends a broadcast request packet called DHCPDISCOVER, searching for a DHCP server in the network.
2) The router device in the network forwards this request to the assigned DHCP server.
3) The DHCP server receives the request. Depending on the availability of its resources and network policies, it arbitrates an available IP address to give to the file server. The DHCP server then for time being reserves that IP address for the file server and sends back to the file server a DHCPOFFER packet with that IP address information.
4) The file server sends a DHCPREQUEST packet, and tells the DHCP server that it wants to use this IP address.
5) The DHCP server sends an DHCPACK acknowledgement packet, confirming that the client has been assigned a lease IP address for a specific period of time.
6) The leased period can be 24 hours or 7 days or 30 days etc depending on the DHCP settings. After finishing the lease period the file server once again sends request for a new IP address to the DHCP server.
If both the file server and DHCP server rebooted at the same time, in this scenario the IP address of the file server is renewed if the lease period is over. But if the file server is not able to contact the DHCP server then the file server will assign itself an APIPA IP address.
In my opinion, it is always good practice to assign a static IP address to the file server to avoid the inconvenience caused by the DHCP service.