Results 1 to 5 of 5
Hi all,
I'm running gentoo on a notebook. In my work i have a static IP address, and in my home the IP is given by dhcp.
Every time i ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 07-05-2004 #1Just Joined!
- Join Date
- Jul 2004
- Posts
- 3
dual network configuration
Hi all,
I'm running gentoo on a notebook. In my work i have a static IP address, and in my home the IP is given by dhcp.
Every time i have to modify /etc/conf.d/net config file (and work well in both cases) in order to get network running, and the boot is very slow since tries to get up eth0 with the wrong configuration.
I think that maybe is a good idea is to define two runlevels, but i don't know how to define two configuration files for the same net card.
Any help or better ideas?
Thanks very much.
- 07-05-2004 #2
I think this will work:
Now add this line to your /etc/conf.d/net:Code:su - cp /etc/init.d/net.eth0 /etc/init.d/net.eth1
Configure your work static IP under iface_eth0 and remove net.eth0 from all runlevels it's in. The only catch here is you have to manually start the net interface.Code:iface_eth1="dhcp"
"Time is an illusion. Lunchtime, doubly so."
~Douglas Adams, The Hitchhiker's Guide to the Galaxy
- 07-05-2004 #3Just Joined!
- Join Date
- Jul 2004
- Posts
- 3
Currently i am in my work, so i did it but with the new created net.eth1 as the one with static IP (to see now if it works)
ok.
Originally Posted by sarumont
i did:
Originally Posted by sarumont
and configure the static IP under iface_eth1. Then i stop eth0 and start eth1:Code:iface_eth0="dhcp"
Is this problem because i should did it as you said (eth0 with static IP)?Code:/etc/init.d/net.eth1 start * Bringing eth1 up (146.155.14.xx)... SIOCSIFADDR: No such device eth1: unknown interface: No such device SIOCSIFBRDADDR: No such device eth1: unknown interface: No such device SIOCSIFNETMASK: No such device [ !! ]
Anyway i will try the other way when i get home.
Thanks for your help.
- 07-06-2004 #4
d0h...comment this line out of the /etc/init.d/net.eth1:
and add this in it's place:Code:local i iface="${1//./_}"
That should do the trick.Code:iface="eth0"
"Time is an illusion. Lunchtime, doubly so."
~Douglas Adams, The Hitchhiker's Guide to the Galaxy
- 07-06-2004 #5Just Joined!
- Join Date
- Jul 2004
- Posts
- 3
I change the line in /etc/init.d/net.eth1, but i get the following message when trying to bring up eth1 (configured with static IP)
So, tries to bring up the eth1 with the configuration of eth0. I already tried (yesterday at home) switching configuration between eth0 and eth1 and i had the same problem.Code:/etc/init.d/net.eth1 start * Bringing eth1 up via DHCP... [ !! ]
Thanks again.


Reply With Quote
