Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Setting static IP - what did I miss? [SOLVED]
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
audiodef
Watchman
Watchman


Joined: 06 Jul 2005
Posts: 6656
Location: The soundosphere

PostPosted: Fri Jan 30, 2009 3:18 am    Post subject: Setting static IP - what did I miss? [SOLVED] Reply with quote

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
View user's profile Send private message
minor_prophets
Apprentice
Apprentice


Joined: 07 Oct 2007
Posts: 281

PostPosted: Fri Jan 30, 2009 3:40 am    Post subject: Reply with quote

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
View user's profile Send private message
cach0rr0
Bodhisattva
Bodhisattva


Joined: 13 Nov 2008
Posts: 4123
Location: Houston, Republic of Texas

PostPosted: Fri Jan 30, 2009 12:00 pm    Post subject: Reply with quote

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
View user's profile Send private message
audiodef
Watchman
Watchman


Joined: 06 Jul 2005
Posts: 6656
Location: The soundosphere

PostPosted: Fri Jan 30, 2009 2:55 pm    Post subject: Reply with quote

Thanks, minor_prophets and cach0rr0. I had forgotten about resolv.conf. After setting conf.d/net, I need to re-insert the DNS info into resolv.conf and that's that.

As promised:

<--- proceeds to kick self. :P
_________________
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
Back to top
View user's profile Send private message
minor_prophets
Apprentice
Apprentice


Joined: 07 Oct 2007
Posts: 281

PostPosted: Sat Jan 31, 2009 1:26 am    Post subject: Reply with quote

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
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