View previous topic :: View next topic |
Author |
Message |
audiodef Watchman
![Watchman Watchman](/images/ranks/rank-G-2-watchman.gif)
![](images/avatars/121230830564ba822c25c21.jpg)
Joined: 06 Jul 2005 Posts: 6656 Location: The soundosphere
|
Posted: Fri Jan 30, 2009 3:18 am Post subject: Setting static IP - what did I miss? [SOLVED] |
|
|
I went to set a static IP on a new Gentoo install, and it's not working. I know I'm going to kick myself, but I can't think of offhand what I'm missing. I changed my /etc/conf.d/net to:
Code: |
config_eth0=( "192.168.1.4 netmask 255.255.255.0 brd 192.168.1.255" )
routes_eth0=( "default via 192.168.1.1" )
|
or
Code: |
config_eth0="192.168.1.4 netmask 255.255.255.0 brd 192.168.1.255"
routes_eth0="default via 192.168.1.1"
|
Either of which, when restarting /etc/init.d/net.eth0 (a symlink to /etc/init.d/net.lo), does not let me connect to the net. I have another Gentoo box on which I've done this (different last digit on the IP, of course) and it works fine.
I just upgraded this new Gentoo box from stable to ~arch, including upgrading to openRC. The other machine on which I have a static IP is also the latest openRC. So what am I missing? _________________ decibel Linux: https://decibellinux.org
Github: https://github.com/Gentoo-Music-and-Audio-Technology
Facebook: https://www.facebook.com/decibellinux
Discord: https://discord.gg/73XV24dNPN
Last edited by audiodef on Fri Jan 30, 2009 2:59 pm; edited 1 time in total |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
minor_prophets Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
Joined: 07 Oct 2007 Posts: 281
|
Posted: Fri Jan 30, 2009 3:40 am Post subject: |
|
|
Syntax is the first example.
Can you ping any other machines on the LAN? What's in you /etc/resolv.conf? What does ifconfig eth0 say?
Have you tried doing an ifconfig eth0 192.xxx.xxx.xxx netmask xxx.xxx.xxx.xxx up ; route add default gw 192.168.1.1 ; ping <internet> ; ping <lan ip> ?
What's doing domain name resolution? You may need a line like dns_servers_eth0="192.168.x.x" in you /etc/conf.d/net
Just ideas to get you started off the top of my head. Its late. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
cach0rr0 Bodhisattva
![Bodhisattva Bodhisattva](/images/ranks/rank-bodhisattva.gif)
![](images/avatars/14936637654ee19d6630f96.gif)
Joined: 13 Nov 2008 Posts: 4123 Location: Houston, Republic of Texas
|
Posted: Fri Jan 30, 2009 12:00 pm Post subject: |
|
|
What about DNS?
I don't see that you've set that yet - unless the above snippet is incomplete.
This is my full /etc/conf.d/net
Code: |
config_eth0=( "10.44.21.218 netmask 255.255.255.0 broadcast 10.44.21.255" )
routes_eth0=( "default via 10.44.21.254" )
dns_domain_eth0="mydomain.com"
dns_servers_eth0="10.44.10.1 208.67.222.222 208.67.220.220 4.2.2.2"
|
|
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
audiodef Watchman
![Watchman Watchman](/images/ranks/rank-G-2-watchman.gif)
![](images/avatars/121230830564ba822c25c21.jpg)
Joined: 06 Jul 2005 Posts: 6656 Location: The soundosphere
|
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
minor_prophets Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
Joined: 07 Oct 2007 Posts: 281
|
Posted: Sat Jan 31, 2009 1:26 am Post subject: |
|
|
Just curious, which conf.d/net syntax was correct in your case? The second is the new style for openrc/baselayout2, if I'm not mistaken.
Glad to be of help. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|