Initial data:

1. Two DHCP servers:

First: Description: Debian GNU/Linux 6.0.10 (squeeze) Release: 6.0.10 Codename: squeeze

Second NAME="Debian GNU/Linux" VERSION_ID="8" VERSION="8 (jessie)" ID=debian

2. One network, let's say

3. Two interfaces and, one per each DHCP server. Both are working and offering addresses from one subnet, but pool for first dhcp is .10-.20 gateway ip.1, pool for second ip.21-.31 with gateway ip.2

4. Task - devices in that network should receive addresses from DHCP #2 rather than DHCP #1. Why so? Main task is to migrate from one system to another, so i can't simply disconnect all devices - those of them, that are working now, must stay in working state. It's TV migration in Hotel.

5. What i've tryed? My thought was to manually increase delay in response of DCHP #1 on DHCP request from client.

6. Commands used on DHCP #1: tc qdisc add dev eth1 root handle 1: prio tc qdisc add dev eth1 parent 1:3 handle 30: netem delay 500ms tc filter add dev eth1 protocol ip parent 1:0 prio 3 u32 \ match ip sport 67 0xffff flowid 1:3 tc filter add dev eth1 protocol ip parent 1:0 prio 3 u32 \ match ip dport 68 0xffff flowid 1:3

7. Result: pinging DHCP #1 from device, i see delays in 500+ ms, but when i perform rebute of device and issueing "tcpdump -n -i eth1 portrange 67-68" command on both DHCP servers, or command "tail -f /var/log/syslog" for more details, i see, that DHCP #1 replies faster, than DHCP #2.

I will be very gratefull for ideas and clues, what to do else, or another solution. Thank you!

  • If all devices should get addresses from #2, what do you need #1 for? Turning it off won't invalidate existing client leases. Or do you need some devices to continue to renew leases on #1?
    – BowlOfRed
    May 30, 2018 at 1:12
  • Yes i do, As i saisd it's TVs and it's about 400 of them in hotel. I cant turn off DHCP #1 because it will affect guests. After changing DHCP server TV should be reconfigured and I cant simply walk in room and say: "Hello, I need your remote control, you can stay in bed". May 30, 2018 at 9:06
  • What's your lease time on #1? Nothing you've said suggests that turning off #1 would cause a problem. Can you explain the issue that the devices would have if you turn it off (and leave #2 on)? Everything should just work.
    – BowlOfRed
    May 30, 2018 at 13:22

1 Answer 1


The IP that a DHCP server gives out doesn't become invalid if the DHCP server becomes unavailable. So unless there's more to the story that you haven't added to your question, this shouldn't be too difficult.

  • All the devices request IPs from server #1 and get it with a valid lease (say 1 hour).
  • Shut down DHCP server #1. All the devices remain in pool #1.
  • After 50% of the lease has expired (30 minutes in this example), the device will attempt to renew the lease. Since the server is down, the renewal will fail, but the device will continue to use its valid pool 1 IP address.
  • After 87.5% of the lease has expired (7.5 minutes of lease remaining), the client will do a DHCPDISCOVER and accept new leases. At this point it should get a valid address from DHCP server #2 and get an IP address in pool 2.
  • After the lease period has expired, all your clients should be in pool2.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .