View previous topic :: View next topic |
Author |
Message |
netpumber n00b
Joined: 10 Feb 2011 Posts: 68
|
Posted: Wed May 25, 2011 2:23 pm Post subject: [SOLVED] Getting static ip but can't connect on internet |
|
|
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 |
|
|
Anon-E-moose Watchman
Joined: 23 May 2008 Posts: 6214 Location: Dallas area
|
Posted: Wed May 25, 2011 2:29 pm Post subject: |
|
|
If "ping 8.8.8.8" works then your problem is dns resolution, check the /etc/resolv.conf file _________________ UM780, 6.12 zen kernel, gcc 13, openrc, wayland |
|
Back to top |
|
|
dmpogo Advocate
Joined: 02 Sep 2004 Posts: 3468 Location: Canada
|
Posted: Wed May 25, 2011 2:55 pm Post subject: |
|
|
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 |
|
|
netpumber n00b
Joined: 10 Feb 2011 Posts: 68
|
Posted: Wed May 25, 2011 4:26 pm Post subject: |
|
|
Indeed .. the problem was in /etc/resolv.conf . I just add two namservers..
Thanks a lot guyz... |
|
Back to top |
|
|
|