Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] Getting static ip but can't connect on internet
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
netpumber
n00b
n00b


Joined: 10 Feb 2011
Posts: 68

PostPosted: Wed May 25, 2011 2:23 pm    Post subject: [SOLVED] Getting static ip but can't connect on internet Reply with quote

Hi!

im trying to put static ip on my computer. This is the /etc/conf.d/net file


Code:
#Static IP
config_eth0=( "192.168.1.3 netmask 255.255.255.0" )
routes_eth0=( "default via 192.168.1.1" )


After change it i run /etc/init.d/net.eth0 restart

Code:
* Caching service dependencies ...                                       [ ok ]
 * Stopping sshd ...                                                      [ ok ]
 * samba -> stop: smbd ...                                                [ ok ]
 * samba -> stop: nmbd ...                                                [ ok ]
 * Unmounting network filesystems ...                                     [ ok ]
 * Bringing down interface eth0
 *   Stopping dhcpcd on eth0 ...                                          [ ok ]
 *   Removing addresses
 * Bringing up interface eth0
 *   192.168.1.3 ...                                                      [ ok ]
 *   Adding routes
 *     default via 192.168.1.1 ...                                        [ ok ]
tux n3t #  * samba -> start: smbd ...
 * Starting sshd ...
 * Mounting network filesystems ...                                       [ ok ]
 * samba -> start: nmbd ...       



All went ok... but if i try to connect to the internet or ping www.google.com nothing happens..

What i forgot to change ? Does anyone an idea.

I have internet if only i use DHCP.

Thanks in advance.


Last edited by netpumber on Wed May 25, 2011 4:26 pm; edited 1 time in total
Back to top
View user's profile Send private message
Anon-E-moose
Advocate
Advocate


Joined: 23 May 2008
Posts: 4872
Location: Dallas area

PostPosted: Wed May 25, 2011 2:29 pm    Post subject: Reply with quote

If "ping 8.8.8.8" works then your problem is dns resolution, check the /etc/resolv.conf file
_________________
PRIME x570-pro, 3700x, RX 550 - 5.8 zen kernel
Acer E5-575 (laptop), i3-7100u - i965 - 5.5 zen kernel
---both---
gcc 9.3.0, profile 17.1 (no-pie & modified) amd64-no-multilib, eudev, openrc, openbox, palemoon
Back to top
View user's profile Send private message
dmpogo
Advocate
Advocate


Joined: 02 Sep 2004
Posts: 2835
Location: Canada

PostPosted: Wed May 25, 2011 2:55 pm    Post subject: Reply with quote

Is 192.168.1.1 indeed address of your gateway ? Is it a router you connect to internet though ? If it is, they have some specific adress configured. Mine, for example is 192.168.1.254, go figure.

If still you have a problem, could you post output of "route -n" when addresses configured by dhcp ?
Back to top
View user's profile Send private message
netpumber
n00b
n00b


Joined: 10 Feb 2011
Posts: 68

PostPosted: Wed May 25, 2011 4:26 pm    Post subject: Reply with quote

Indeed .. the problem was in /etc/resolv.conf . I just add two namservers..

Thanks a lot guyz...
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