QUOTE(narf03 @ Jun 10 2023, 03:54 PM)
I know DHCP supposed to provide ip to machines, but need to know how they handle when things dont go well.
ie
1) do DHCP communicate with each other ? assuming many DHCP in the network with the same setting, will they fight or work together ?
2) multiple DHCP in a network, what will happen when a new machine come in ? get ip from a random DHCP ? any idea which 1 get priority?
3) if a machine already used a fixed ip, but that fixed ip is in dynamic ip address range, will that IP get offered ?
There are few methods available to setup a network with DHCP available, lets focus on just 2 methods.
Method # A (DHCP Server from Router)1) NO, Router's DHCP will not communicate with each other and will cause IP address conflicts. If you have multiple routers with DHCP enabled then your Clients will use the NEAREST/FASTEST DHCP router to get an IP address.
If Router#1 have DHCP range --> 192.168.0.1~254 -----> Your Clients will get that IP range.
If Router#2 have the same DHCP range in Router#1, your Clients might get the same IP range thus causing IP address conflicts among devices.
Think of it as 2 person have the same Serial Number of a Concert ticket with the same seat...
By having multiple DHCP Router in the same network will also causes bandwidth issues, as DHCP's protocol is using UDP and DHCP is always broadcasting in the network and having multiple DHCP will also causes traffic congestions in the network.
2) If you have multiple routers with DHCP enabled then your Clients will use the NEAREST/FASTEST DHCP router to get an IP address. Router's DHCP doesn't have the features to configure priority. Whichever Router DHCP response the request for an IP address... that device will get its IP address from.
3) YES, if a computer have manual Static IP address configured and that IP address was also in the same range of the DHCP then the chances of IP address conflict is high. It is always recommended not have a Static IP address in the same range of DHCP.
Suggestions:
a) Always ensure there is only a single DHCP Server in the network.
b) Ensure the DHCP range only covers what is needed, if your house only have 10 devices and maybe you allows your visitors/friends to use the WiFi/Internet; then configure the range to 20 addresses.
c) Always leave the first 10 address empty and the last 10 address empty, not in DHCP range.
---> Example:
---> Router's IP address is = 192.168.0.1
---> DHCP Start address must be at = 192.168.0.10
---> DHCP End address must be at = 192.168.0.30
With the above example, you will have at least 20 addresses available for 20 devices.
If you need further explanation or wanted to know about
Method #2 (DHCP Server with Microsoft Windows Server), then just let me know...
Hope this explains and helps.