Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
automatic network configuration for a laptop?
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
djepi
n00b
n00b


Joined: 03 Jan 2005
Posts: 25

PostPosted: Mon Jan 03, 2005 4:18 pm    Post subject: automatic network configuration for a laptop? Reply with quote

Hi, I am setting up a Gentoo laptop and I have some trouble automating the network configuration. I move the laptop between home and work and typically, I use 4 main network configurations. Wired fixed IP at either home or work, wireless fixed IP at home and wireless DHCP on the move.

Ideally, I'd like to setup something like in this article in ArsTechnica
http://arstechnica.com/columns/linux/linux-20040413.ars/2

It is a nice setup for a Debian system where the right configuration for either the LAN or the WLAN is used depending on where the laptop is located. To achieve this, they use ifplugd and the /etc/network/interfaces (configuration for ifup and ifdown) file ... which does not exist in Gentoo.

I have installed ifplugd and it works well at upping or downing eth0 so far but I wonder if there is a way of storing different "profiles" in /etc/conf.d/net so that when net.eth0 is run, it "chooses" the right network config.
I've seen that you can fallback from DHCP to a fixed IP "a la Windows XP" with ifconfig_fallback_eth0 but it's too limited for what I'd ike to achieve. I've also seen some people editing the script net.eth0 so that it accepts an extra argument but maybe something more standard exists?

I have looked at quickswitch [http://muthanna.com/quickswitch] and also netgo [http://netgo.hjolug.org] but for some reason I can't emerge quickswitch (compiling error during for Curses) and anyway, both programs require to be run at root and I'd prefer the choice to be transparent.

anyway, if anybody has an idea or a link to further documentation on this, it would be very much appreciated.

djepi
_________________
djepi
Back to top
View user's profile Send private message
Wooff
Tux's lil' helper
Tux's lil' helper


Joined: 19 Jun 2004
Posts: 101
Location: LB.CZ.EU

PostPosted: Tue Jan 04, 2005 9:40 pm    Post subject: same problem Reply with quote

Hi,
I have the same problem ...
I builded eth0 with fixed IP and eth1 with dynamical using the same network device. And one of them is not set up when I plug it into new socket. I dont like it and I would like something better ))-:
W
Back to top
View user's profile Send private message
catkfr
Guru
Guru


Joined: 02 Aug 2004
Posts: 300

PostPosted: Tue Jan 04, 2005 10:03 pm    Post subject: Reply with quote

I think there are multiple ways to do this but a solution you may want to consider is installing a dhcp server at home. That way, you can configure all devices to dhcp with a fallback for your wired connexion to your work fixed IP.

If you don't want to do this, I think it is possible to check the MAC address of the network card you are connecting to. I know this is possible for wireless configurations (for which you can also specify preferred ESSID) but I don't know if there's an equivalent for wired.

I don't know if there are better solutions but I'm interested to find out what you'll end up doing.
Back to top
View user's profile Send private message
Wooff
Tux's lil' helper
Tux's lil' helper


Joined: 19 Jun 2004
Posts: 101
Location: LB.CZ.EU

PostPosted: Wed Jan 05, 2005 12:40 pm    Post subject: Reply with quote

hi,
actually, I hope somebody will tell me its question about colaboration ofudev, rules, ifplugd and static x dynamic and explain how to turn it to work ((((-:

Still waiting - hope die at last (hmm english) ((-:

Have a nice day ((-:
W
Back to top
View user's profile Send private message
djepi
n00b
n00b


Joined: 03 Jan 2005
Posts: 25

PostPosted: Thu Jan 06, 2005 12:04 pm    Post subject: not solved but here's what I've done so far Reply with quote

I have just created a little script that overwrites /etc/resolv.conf and /etc/conf.d/net with either my work or home or work configuration, then bring down eth0 and then up again.

works well with the wired (fixed IP) connections. basically i boot with no network and click an icon on the desktop to connect.

I guess quickswitch does this much better but it does not emerge for me, problem with dev-perl/Curses. see this post:
https://forums.gentoo.org/viewtopic.php?t=275595

I'll update when I know more.

JP
_________________
djepi
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