| View previous topic :: View next topic |
| Author |
Message |
lyallp Veteran


Joined: 15 Jul 2004 Posts: 1189 Location: Adelaide/Australia
|
Posted: Tue Jun 26, 2012 2:58 am Post subject: [Solved] Ethernet - Multiple incompatible configurations |
|
|
I have a gentoo amd64 laptop, with one network interface.
Usually, it's plugged into the office and uses DHCP.
However, occasionally I need to be in a lab environment where DHCP is not available, for reasons I won't go into. I have to setup a fixed IP address, whilst in the lab environment.
I had thought I would just setup an /etc/init.d/net.thelab symlink and update /etc/conf.d/net to reflect the required IP address, netmask and gateway.
Then, I setup a runlevel for thelab which turned of net.eth0 and started net.thelab.
However, this does not work, as the device /dev/thelab does not exist so when I try /etc/init.d/net.thelab start, it fails with a missing device.
Now I could manually create a symlink of /dev/thelab to /dev/eth0 but that seems all too much of a hack.
How should I proceed? Maybe a udev rule?
Any suggestions would be gratefully received  _________________ ...Lyall
Last edited by lyallp on Tue Jun 26, 2012 5:15 am; edited 1 time in total |
|
| Back to top |
|
 |
your_WooDness Tux's lil' helper

Joined: 25 Oct 2007 Posts: 77
|
Posted: Tue Jun 26, 2012 4:36 am Post subject: |
|
|
Hi,
any reasons for not using a Networkmanager? wicd e.g. also has a tui interface for non-X.
WooD |
|
| Back to top |
|
 |
lyallp Veteran


Joined: 15 Jul 2004 Posts: 1189 Location: Adelaide/Australia
|
Posted: Tue Jun 26, 2012 5:15 am Post subject: |
|
|
I found /etc/conf.d/net
fallback entries being the key ! | Code: |
# General DHCP
config_eth0="dhcp"
# Lab area
fallback_eth0="10.100.100.20 netmask 255.255.255.0"
fallback_routes_eth0="10.2.25.0 netmask 255.255.255.0 via 10.100.100.1"
|
_________________ ...Lyall |
|
| Back to top |
|
 |
lyallp Veteran


Joined: 15 Jul 2004 Posts: 1189 Location: Adelaide/Australia
|
Posted: Tue Jun 26, 2012 6:00 am Post subject: |
|
|
Even better solution can be found in this thread. _________________ ...Lyall |
|
| Back to top |
|
 |
|