View previous topic :: View next topic |
Author |
Message |
nipplehead n00b
Joined: 09 Aug 2002 Posts: 35 Location: NYU
|
Posted: Tue Nov 19, 2002 4:09 am Post subject: different eth0 configurations |
|
|
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 |
|
|
souki n00b
Joined: 08 Jul 2002 Posts: 10
|
Posted: Wed Nov 20, 2002 12:25 am Post subject: eth0 multi-config |
|
|
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 |
|
|
dripton n00b
Joined: 16 Aug 2002 Posts: 65 Location: Virginia USA
|
Posted: Thu Nov 21, 2002 8:09 pm Post subject: |
|
|
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 |
|
|
eMJay n00b
Joined: 22 Nov 2002 Posts: 8 Location: CLZ, Germany
|
Posted: Fri Nov 22, 2002 9:20 pm Post subject: QuickSwitch for Laptops |
|
|
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 |
|
|
|