Subject: Re: Dynamic configuration...
To: None <rauch@rice.edu>
From: John Darrow <John.P.Darrow@wheaton.edu>
List: netbsd-help
Date: 12/05/2001 13:06:24
Richard Rauch <rauch@rice.edu> wrote:
>The basic problem: I have multiple configurations and presently have to
>hand-munge some stuff via sudo or as root. What I'd like is something
>automatic, even if it's as yucky as polling for different possible working
>configurations. Given that there is nothing constant about these
>configurations except that they use TCP/IP over ethernet, is there a nice
>way to do this?
Looking over this thread, I'm surprised that no one has mentioned
newbtconf(8) and /etc/rc.d/bootconf.sh (though that might be what the
reference in Daemon Daily News was to...)
While it doesn't automatically listen to the network to determine
which configuration to use, it does provide a framework for using
multiple possible configurations (though the file list needs to be
updated a little, and /etc/etc/config fixed to /etc/etc.config in
/sbin/newbtconf line 17 if you're using 1.5.*). If you do manage to
hack together a method of polling the network to figure out what
traffic's going by, you might be able to just drop that code into the
center of bootconf.sh (replacing the keyboard wait)...
Another possibility... you said you could use dhcp at home and
elsewhere on campus, but your office setup is statically addressed...
do you have another machine on your office network on which you could
set up a DHCP server, set to only respond to your laptop's ethernet
address, and to hand out that static IP address?
A simple config file like the following should suffice:
boot-unknown-clients off;
ddns-update-style none;
use-host-decl-names on;
option domain-name "rice.edu";
option domain-name-servers ....;
option non-local-source-routing off;
default-lease-time 259200; # 3 days
max-lease-time 604800; # 7 days
subnet aaa.bbb.ccc.0 netmask 255.255.255.0 {
option subnet-mask 255.255.255.0;
option broadcast-address aaa.bbb.ccc.255;
option routers aaa.bbb.ccc.eee;
}
host odysseus { hardware ethernet uu:vv:ww:xx:yy:zz; fixed-address aaa.bbb.ccc.ddd; }
jdarrow
--
John Darrow - Senior Technical Specialist Office: 630/752-5201
Computing Services, Wheaton College, Wheaton, IL 60187 Fax: 630/752-5968
Pager via email: 6303160707@alphapage.airtouch.com Pager: 630/316-0707
Email: John.P.Darrow@wheaton.edu (plain text please, no HTML or proprietary)