1

I have the following problem I want to solve:

  • I have multi homed system running linux, with three interfaces. All interfaces are configured by dhcp. The DHCP client is ISC dhcp 4.2.5
  • The DHCP server provides a default route on all networks.
  • I want the default route to be set for the first interface only.

So basically I want to instruct dhclient to not request routers on all interfaces, except for one. The documentation, and examples I found on the internet suggest that this is possible. However I can't get it to work.

I can do it manually. If I do:

sudo dhclient -d -1  -R subnet-mask,broadcast-address eth1

Then I see that the dhcp request only contains a request for subnet-mask and broadcast-address. I verified that with wireshark, and done like this no default route will be set on eth1. This is what I expect.

I then created the following dhclient.conf file:

request subnet-mask, broadcast-address;

interface "eth0" {
  also request routers, domain-name, domain-name-servers, domain-search, host-name, interface-mtu, rfc3442-classless-static-routes, ntp-servers, time-offset;
}

As far as I can see this should result in only ubnet-mask, broadcast-address being requested, except on eth1, where a lot more should be requested.

I tested this with:

sudo dhclient -d -1  -cf dhclient.conf  eth1

And I looked at the network again with wireshark. And what I saw was that, in spite of what the config says the dhclient is requesting the default list of options , not just the two options I configured.

Why would that be? Is this a bug? Did I make a mistake in my config file?

0

You must log in to answer this question.

Browse other questions tagged .