Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

My challenge is trying to find a conditional way to change the order of the default gateways used in "option routers" parameters. Perhaps on receiving a DHCPDISCOVER message.

So the first client requestiong a DHCP address will receive as "option routers" and the next request will send as "option routers".

Basically inversing the order of the default gateways.

I need this in order to achieve some load balancing and failover in the same time, using only DHCP server for this.

I am currently looking at "dhcp-eval" options which seems like being a set of options geard towards such customizations but it is difficult to understand where to start.

Does anyone had to do something similar and if yes, could you share the code/setup that was used for scenario?

Thank you!

share|improve this question

It seems like I need to answer my own question.

I found a way to achieve the above setup although it is achieved with 2 DHCP servers workign in a failover / load balancing scenario. It turns out thet the ISC DHCP server have such options startuing with v3 onwards. It achieves what I wanted, although in a slightly different way.

Nevertheless, I would still love to hear opinions about my initial solution so any ideas are welcome.


share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.