dhcp setup advice

Daniel Lang dl at leo.org
Wed Jan 21 23:27:45 PST 2004


Hi,

I'm currently chewing on a problem how to setup DHCP
properly the way I want it.

My notebook computer (running 5.2-CURRENT) has a fxp0
and a wi0 (wavelan) interface. WaveLan ist available most
of the times.

Now, what I would like it to do is:

1. If fxp0 link is up, configure fxp0 interface, get DNS and
   default router from dhcp via fxp0.
2. If fxp0 link falls down, configure wi0 now, get DNS and 
   default router from dhcp via wi0
3. If fxp0 is up again, do 1.

This can be simplified a little bit, since each interface can
stay configured and DNS servers are the same, so what it really
needs to do, is:

- fetch default route from fxp0 is fxp0 is available
- else fetch default route from wi0

I know, that dhclient can bind to more than one interface and
dhclient has the capability to detect link up/link down.
Further it appears, that its possible call a script on certain
events (so maybe I can call a script on link/up/down events
on any interface). 

What I don't know is, how to tell dhclient to fetch a new default
route from a certain interface. I do not like to kill dhclient
and start it again (well, possibly that's the only solution, but
if not, I would prefer another way).

Even the documentation of the omshell interface did not help me
much in that matter.

Any help appreciated.

Thanks,
 Daniel
-- 
IRCnet: Mr-Spock                 - Work is for people, who don't surf -  
 Daniel Lang * dl at leo.org * +49 89 289 18532 * http://www.leo.org/~dl/


More information about the freebsd-net mailing list