Re: [SLUG] network profiles

From: Ronan Heffernan (ronanh@auctionsolutions.com)
Date: Fri Feb 27 2004 - 06:54:10 EST


Russ Wright wrote:

>Hello Sluggers
>
>I have SUSE Linux Pro 9.0
>
>I would like to configure my laptop so I can have multiple configurations for
>my internal nic card. For example my home network uses DHCP and is pretty
>vanilla and is currently configured at eth0. This office assigned me a
>static IP address and supplied me with the IP address for gateway and DNS.
>
>I need to be able to create a network profile that has all the setting for
>work and one for my home network settings. So two configurations pointing
>at the same network device that I can select based on if I am home or at the
>office.
>
>Any idea how I create this?
>
>Can I set it up so on boot I can choose a profile?
>
>
You could configure eth0:1 (a virtual interface) with your static IP and
route before your dhcp client runs. If the dhcp client successfully gets
an address, it should clobber your default route (and resolv.conf). If
the dhcp client fails to get an address, then you are already set-up to
use eth0:1. The only problem that comes to mind is if you use the same
private address range at home and at work (e.g. 192.168.x.x) then you
might have routing trouble between the two interfaces (in that case,
just write a python script that checks for the eth0 IP to be 0.0.0.0 and
if so, call 'ifconfig eth0:1 down').

--ronan

-----------------------------------------------------------------------
This list is provided as an unmoderated internet service by Networked
Knowledge Systems (NKS). Views and opinions expressed in messages
posted are those of the author and do not necessarily reflect the
official policy or position of NKS or any of its employees.



This archive was generated by hypermail 2.1.3 : Fri Aug 01 2014 - 18:15:25 EDT