Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
different eth0 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
nipplehead
n00b
n00b


Joined: 09 Aug 2002
Posts: 35
Location: NYU

PostPosted: Tue Nov 19, 2002 4:09 am    Post subject: different eth0 configurations Reply with quote

i've finally figured out the whole runlevel stuff, but now i've got a new question.

what's the best/easiest way to have two different net configs for the same eth0. For example, i want my default bootlevel to simply assign a static IP and default gateway since i have static IPs setup on my home network. I want the work bootlevel to load a network config using dhcpd.

The networking is setup in the /etc/conf.d/net and this stuff simply refers to the configs for eth0. is it as easy as making a copy of /etc/init.d/net.eth0 to /etc/init.d/net.eth0_work and adding an iface_eth0_work="dhcpd" line?

mainly i don't know if the /etc/conf.d/net file only works with actual interface names? or is the eth0 in there only refering to the name of the net.eth0 file?

gimme a whack with the cluestick if i'm making this harder than it should be, but i can't find any posts about this issue. thanks in advance.

-nip
_________________
System: Thinkpad T30, P4-m 1.8GHz, 1024MB RAM
To Do: winmodem. grr. lexmark 3200 = winprinter. grr.
Back to top
View user's profile Send private message
souki
n00b
n00b


Joined: 08 Jul 2002
Posts: 10

PostPosted: Wed Nov 20, 2002 12:25 am    Post subject: eth0 multi-config Reply with quote

you can use several config files, let say /etc/conf.d/net-static and /etc/conf.d/net-dhcp
then you just have to symlink to the correct one.

If you need something more powerfull, there are some usefull tools that need some adaptations for gentoo's specific configuration files -- netSwitch, divine ...


Last edited by souki on Wed Nov 20, 2002 12:28 am; edited 1 time in total
Back to top
View user's profile Send private message
dripton
n00b
n00b


Joined: 16 Aug 2002
Posts: 65
Location: Virginia USA

PostPosted: Thu Nov 21, 2002 8:09 pm    Post subject: Reply with quote

Quote:

what's the best/easiest way to have two different net configs for the same eth0. For example, i want my default bootlevel to simply assign a static IP and default gateway since i have static IPs setup on my home network. I want the work bootlevel to load a network config using dhcpd.


IMO the cleanest solution is NOT to twiddle a laptop's network config based on location. Instead, have the laptop always use dhcp, and run dhcpd on another box at home. dhcpd can be configured to hand out fixed IPs based on MAC address.
Back to top
View user's profile Send private message
eMJay
n00b
n00b


Joined: 22 Nov 2002
Posts: 8
Location: CLZ, Germany

PostPosted: Fri Nov 22, 2002 9:20 pm    Post subject: QuickSwitch for Laptops Reply with quote

Hi out there,

QuickSwitch should solve your problems with switching network config on-the-fly and at boottime.

Take a look here:
http://edgesolutions.ca/article.php?sid=21

best regards,
eMJay
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