View previous topic :: View next topic |
Author |
Message |
cocacola n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 27 Dec 2006 Posts: 3
|
Posted: Fri Jan 26, 2007 5:22 pm Post subject: eth0 detected but can't ping or connect to internet (SOLVED) |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
Dan Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
Joined: 25 Oct 2005 Posts: 1302
|
Posted: Fri Jan 26, 2007 5:26 pm Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
cocacola n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 27 Dec 2006 Posts: 3
|
Posted: Sat Jan 27, 2007 5:56 pm Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
defenderBG l33t
![l33t l33t](/images/ranks/rank_rect_4.gif)
![](images/avatars/388460744529ac7dbb3b6.jpg)
Joined: 20 Jun 2006 Posts: 817
|
Posted: Sat Jan 27, 2007 10:17 pm Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
jmack1010 Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
Joined: 25 Jan 2004 Posts: 93 Location: University of Cincinnati, Oh
|
Posted: Sun Jan 28, 2007 9:47 pm Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
cocacola n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 27 Dec 2006 Posts: 3
|
Posted: Sun Jan 28, 2007 10:55 pm Post subject: |
|
|
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 ![Smile :)](images/smiles/icon_smile.gif) |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|