Op 10-5-2011 16:00, Per-Olov Sjvholm schreef:
Hi misc

I think there maybe is a bug in the dhcp client. I am not sure but will ask
the list...

I have have had the following:
em0: lan static IP
em1: internet interface with static IP
a default route to the isp is in "mygate"

I had to add a dhcp interface to this....
This means I added "dhcp" to the hostname.bge0 interface

When I got the IP from the dhcp config on the bge0 interface it destroyed the
mygate and resolv.conf files and the default gateway was now going over to the
bge0 instead (expected though)...

I then changed the dhclient.conf to just contain the bge0 interface and the
row:
request subnet-mask;

This looks good as I want ONLY the IP and MASK from the DHCP-server and not
the gw and dns servers. However.... with this config the default gateway is
removed but not replaced with the gateway from the dhcp.


Question:
Why is the default gateway destroyed by the dhcp config?

This system uses OpenBSD 4.6 stable

Tnx in advance

/Per-Olov
If I understand well then the 'request' statement makes sure you want to know the parameters attached. The dhcp server can (and will in your case) provide other information which is accepted by dhclient. If you specifically do _not_ want parameters to be set use the 'supersede' command. That way you will exclude those parameters from being set.

eg I use
request subnet-mask, broadcast-address, routers, domain-name,domain-name-servers, host-name;
supersede domain-name "bla.local domain.local";
prepend domain-name-servers 127.0.0.1;

The use of the prepend command is shown here as well, I am sure you can figure out why it is there. ;)

BTW your version of OpenBSD is outdated and unsupported.

HTH, erik

Reply via email to