Brian Stults wrote: > Hi, > > I have a laptop with debian (unstable) installed on it. Sometimes I use > it at home and sometimes I use it at work. At work, it has a direct > connection to the internet, so it has its own IP. At home, its > connection is masqueraded through my main linux box which shares a cable > modem. There, the address of the laptop is 192.168.0.2. Anyway, the > addresses are different at both places, but they are both static > addresses. > > Can someone think of a way that I can configure the startup scripts to > know which IP address needs to be used? I have complete control of the > linux box at home, so I could use DHCP there, but I couldn't configure > DHCP at work. > > Any suggestions? Thanks.
One possibility is to use the schemes provided by the PCMCIA package. Basically what you do is set up the different configurations as schemes in the /etc/pcmcia/network.opts file. Then, when you start the laptop you issue the command "cardctl scheme <scheme_name>" to switch schemes. I'm using this method on my laptop which goes from a DHCP LAN here at home to school where I need to use a fixed IP. IIRC the docs that describe the schemes would be the network.opts manpage, but I won't swear to it. -- Mike Werner KA8YSD | He that is slow to believe anything and | everything is of great understanding, '91 GS500E | for belief in one false principle is the Morgantown WV | beginning of all unwisdom.
pgp2Vp7p8jt0i.pgp
Description: PGP signature