Configuring for 1 static and 1 DHCP interface ?
Ronald F. Guilmette
rfg at tristatelogic.com
Tue Nov 23 12:35:43 UTC 2010
In message <4CEBAD46.2070301 at acm.poly.edu>,
Boris Kochergin <spawk at acm.poly.edu> wrote:
>Hi. I hypothesize that ntpd is started before your rc.local script is
>run, so it uses the NAT IP and default route. Take a look at the
>dhclient.conf man page for how to ignore certain DHCP-provided
>information for an interface.
Thanks Boris. I _did_ actually look over that man page before I posted,
but I could not really make heads or tails out of it, due to the lack
of any actual examples.
>For example:
>
># cat /etc/dhclient.conf
>...
>interface "wlan0" {
> supersede domain-name "poly.edu";
> supersede domain-name-servers 128.238.9.202;
>}
>
>The above overrides any DHCP-provided domain name and DNS servers with
>what I have above on the wlan0 interface.
Whoa! OK, I see now... I failed to take note of the small SEE ALSO annotation
down at the bottom of the man page for dhclient.conf(5)... you know... the
one that says SEE ALSO dhcp-options(5).
Obviously, that's where all of the magic symbols that can be diddled are
listed. (And that's the main thing I didn't know.)
Well, OK, so now I'll try and see if I can get a proper outcome by using
interface "rl0" {
supersede routers 69.62.255.254;
supersede domain-name-servers 127.0.0.1;
}
Thanks for giving me something I can work with.
I should say however that even this is going to produce a slightly sub-optimal
result, because (I guess) the DHCP client is _still_ going to wipe out my
eisting /etc/resolve.con file and then write its own. Now that will at
least have the proper IP address in it _however_ there does not seem to
be any way to entice the DHCP client to place certain "options" into the
/etc/resolv.conf file. That's a pity, because I wanted one in there.
(Oh well, I guss I can append it from my /etc/rc.local file.)
Anyway, thanks again. I should know soon if this fixes that ntpd problem.
Regards,
rfg
More information about the freebsd-net
mailing list