Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
eth0 detected but can't ping or connect to internet (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
cocacola
n00b
n00b


Joined: 27 Dec 2006
Posts: 3

PostPosted: Fri Jan 26, 2007 5:22 pm    Post subject: eth0 detected but can't ping or connect to internet (SOLVED) Reply with quote

For some reasons my gentoo is able to detect the ethernet card, but I can't ping to or connect to websites.

These are the config files that I have (i only configured this during installation):

Code:
/etc/hostname
127.0.0.1 localhost
::1 ipv6-localhost ipv6-loopback
fe00::0 ipv6-localnet
ff00::0 ipv6-mcastprefix
ff02::1 ipv6-allnodes
ff02::2 ipv6-allrouters
ff02::3 ipv6-allhosts

Code:
/etc/conf.d/net
config_eth0=( "dhcp" )
dhcp_eth0="nodns nontp nonis"


and this is what i got for "ifconfig"
Code:

eth0     Link encap:Ethernet  HWADDR: xx:xx:xx:xx:xx:xx
         inet addr: 130.179.130.10 Bcast: 130.179.130.135 Mask: 255.255.248.0
         UP BROADCAST NOTRAILERS RUNNING MULTICAST MTU: 1500 Metric: 1
         RX packets 25169 errors: 0 drop: 0 overruns: 0 frames: 0
         TX packets 27 errors: 0 drop: 0 overruns: 0 carriers: 0
         collision: 0 txqueuelen: 1000
         RX bytes: 2115205 (2.0 Mb) TX bytes: 2770 (2.7 Kb)
         Interrupt: 9 Base address: 0xa000
lo ....


anyone has any ideas why i got this problem?
greatly appreciate any suggests and comments.


Last edited by cocacola on Sun Jan 28, 2007 11:24 pm; edited 1 time in total
Back to top
View user's profile Send private message
Dan
Veteran
Veteran


Joined: 25 Oct 2005
Posts: 1302

PostPosted: Fri Jan 26, 2007 5:26 pm    Post subject: Reply with quote

whats the output of
# route
#ping -c 3 google.com
and
#ping -c 3 64.233.187.99

also post your /etc/resolv.conf
_________________
- Failure is not an option. It's bundled with your software.
Back to top
View user's profile Send private message
cocacola
n00b
n00b


Joined: 27 Dec 2006
Posts: 3

PostPosted: Sat Jan 27, 2007 5:56 pm    Post subject: Reply with quote

here is the output for #route
Code:

Destination    Gateway        Genmask        Flags     Metric    Ref       Use       Iface
192.178.0.0    *              255.255.255.0  U         0         0         0         eth0
loopback       *              255.0.0.0      U         0         0         0         lo
default        192.178.0.1    0.0.0.0        UG        0         0         0         eth0


#ping -c 3 www.google.com
unknown host

#ping -c 3 64.233.187.99
Code:
3 packets transmitted, 3 received, 0% loss, time 2000ms
rtt min/avg/max/dev = 87.308/96.526/109.366/9.368 ms


and inside /etc/resolv.conf, there's nothing (it only has a comment about the lo)
Back to top
View user's profile Send private message
defenderBG
l33t
l33t


Joined: 20 Jun 2006
Posts: 817

PostPosted: Sat Jan 27, 2007 10:17 pm    Post subject: Reply with quote

your default gateway should be unreachable:
default 192.178.0.1 0.0.0.0 UG 0 0 0 eth0


because your ip address is (based on ifconfig):
inet addr: 130.179.130.10 Bcast: 130.179.130.135 Mask: 255.255.248.0

but u could ping google.com (when using the ip), so apperantly ur problem is the resolv.conf:
ask ur admin for the dns server ip and when u know it:

echo "nameserver <ip-add>" >> /etc/resolv.conf

u can try with 81.210.131.2 and 81.210.131.3:
echo "nameserver 81.210.131.2" >> /etc/resolv.conf
echo "nameserver 81.210.131.3" >> /etc/resolv.conf
Back to top
View user's profile Send private message
jmack1010
Tux's lil' helper
Tux's lil' helper


Joined: 25 Jan 2004
Posts: 93
Location: University of Cincinnati, Oh

PostPosted: Sun Jan 28, 2007 9:47 pm    Post subject: Reply with quote

You aren't letting dhcp set your nameserver settings automagically. It is not necessary to go through the trouble of manually setting your dhcp info if you are using dhcp. Just remove:

Quote:
dhcp_eth0="nodns nontp nonis"


from /etc/conf.d/net.

Your nameservers will be set by your isp's or home dhcp server.

Joe
Back to top
View user's profile Send private message
cocacola
n00b
n00b


Joined: 27 Dec 2006
Posts: 3

PostPosted: Sun Jan 28, 2007 10:55 pm    Post subject: Reply with quote

jmack1010 wrote:
You aren't letting dhcp set your nameserver settings automagically. It is not necessary to go through the trouble of manually setting your dhcp info if you are using dhcp. Just remove:

dhcp_eth0="nodns nontp nonis"

from /etc/conf.d/net.

Your nameservers will be set by your isp's or home dhcp server.

Joe


yes, i got it now, just by removing that line. Thanks, Joe.

Thanks defenderBG, and dcoats, too, for attempting to 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