Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[Solved] Ethernet - Multiple incompatible configurations
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
lyallp
Veteran
Veteran


Joined: 15 Jul 2004
Posts: 1189
Location: Adelaide/Australia

PostPosted: Tue Jun 26, 2012 2:58 am    Post subject: [Solved] Ethernet - Multiple incompatible configurations Reply with quote

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
View user's profile Send private message
your_WooDness
Tux's lil' helper
Tux's lil' helper


Joined: 25 Oct 2007
Posts: 77

PostPosted: Tue Jun 26, 2012 4:36 am    Post subject: Reply with quote

Hi,

any reasons for not using a Networkmanager? wicd e.g. also has a tui interface for non-X.

WooD
Back to top
View user's profile Send private message
lyallp
Veteran
Veteran


Joined: 15 Jul 2004
Posts: 1189
Location: Adelaide/Australia

PostPosted: Tue Jun 26, 2012 5:15 am    Post subject: Reply with quote

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
View user's profile Send private message
lyallp
Veteran
Veteran


Joined: 15 Jul 2004
Posts: 1189
Location: Adelaide/Australia

PostPosted: Tue Jun 26, 2012 6:00 am    Post subject: Reply with quote

Even better solution can be found in this thread.
_________________
...Lyall
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum