[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Connecting to different net environments



Hello, I have a problem which is probably going to be more and more
common with the availability of DSL and cable modems. I need to use my
laptop on a LAN where I have a static IP, at home where I have DSL
(dynamic IP with pppoe) and while traveling via the modem with ppp.
Currently upon boot it starts eth0 with my static IP configuration. If
I am at home it cannot start this way, rather it must use pppoe and
should start with:

ifconfig eth0 up 0.0.0.0
/etc/init.d/ppp start

Upon booting at home I have to pull out my ethernet pcmcia card else
ntpdate will hang since eth0 was not started in the above fashion.

What I would like is (if possible) for the computer to detect if I am on
the LAN and start up services with the static IP configuration. If it
detects I am on my DSL connection to start services for a dynamic IP and
run pppoe. And lastly, if there is no ethernet signal then do nothing so
modem/ppp will work as before. I realize it cannot "detect" anything
unless services are already started so it might have to try several
configurations and if it doesn't detect the network then switch to the
next configuration.

Is there a package that will do this? Divine? Netenv? dhcpcd??

Much thanks,

Matt



Reply to: