Re: how to switch between different network configurations?
Zhengquan Zhang mailing list <zhang.zhengquan.mailinglist@gmail.com> writes:
> I have to switch the network configurations between the lab, the dorm and the
> home ones. Normally I manullay edit /etc/network/interfaces and restart the
> networking.
Since you are already using /etc/network/interfaces take a look at
man ifup
Especially see "ifup eth0=home"
On my laptop, the analogue is
ifup eth1=home
because the wireless interface is eth1.
The next suggestion I have *not* tested, but it is also in
man ifup
-i FILE, --interfaces=FILE
Read interface definitions from FILE instead of from /etc/net-
work/interfaces.
If this means what it seems to mean, you can write a different file
for each of your configurations, and start ifup with the i option.
ifup is part of the package (in stable) ifupdown.
See also man ifdown.
--
Hugh Lawson
hlawson@triad.rr.com
Reply to: