# [SOLVED] LAN But No Internet problem [mostly solved]

## ilikebeer

I have spent a week solid now trying to solve this problem, serching forum after forum.  My Gentoo box will not connect to the internet (cant even ping IP addresses or domain names) but if the machine is rebooted into WinXP, it works fine.  My wife's XP box is also on the same 2WIRE AT&T router/adsl modem and has internet.  I do not have AT&T service anymore, I just use the modem/router until I can afford a new standalone modem.

The two computers can find eachother just fine, network shares and all.  But my Gentoo install has no internet.

resolv.conf:

nameserver 10.0.0.1 - (my 2wire router's gateway address)

conf.d/net:

config_eth0 = ( "dhcp" )

dhcp_eth0 = "nodns nontp nonis"

This just started when I tried to setup SSH so I could work on my KDE problem while my wife used her computer which uses the same monitor as mine so it's always been one-at-a-time.

First i emerged ssh, then sshd, then openssh.  Then i messed with my router and laptop and wife's PC for a couple days trying to connect with PUTTY, only to get network timeouts over the internet but connect fine over LAN.  It was then, on my install Gentoo with another emerge command, i realized my gentoo machine was not reaching the internet. "Network Unreachable" it says. I'm trying to figure out why I'm getting an INFURIATING KDE Config error when compiling compizconfig-backend-kconfig (8.2), but withouth the internet i'm completly stuck... HELP!!!!!

thanks, all!

colinLast edited by ilikebeer on Sun Oct 25, 2009 9:59 pm; edited 2 times in total

----------

## malern

Can you post the output of "ifconfig -a" and "route"

----------

## ilikebeer

Thanks for the reply!  So far nobody's been able to help, and none of the other "network but no internet" posts have been much assistance.  I'm about at my wit's end!

 *Quote:*   

> poopdawg ~ # ifconfig -a
> 
> eth0      Link encap:Ethernet  HWaddr 00:e0:4d:6c:dd:74
> 
>           inet addr:10.0.1.33  Bcast:10.0.255.255  Mask:255.255.0.0
> ...

 

 *Quote:*   

> poopdawg ~ # route
> 
> Kernel IP routing table
> 
> Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
> ...

 

-colin

----------

## malern

For some reason you don't have a default route. Try adding one manually

```
route add default gw 10.0.0.1
```

(this assumes that your gateway is actually 10.0.0.1)

----------

## ilikebeer

can i do that as a command, or does that go in etc/resolv.conf, or /etc/default/tcp, or...?

thanks again!

----------

## Veldrin

this was meant as a command, but later on - if I works - it should be move (in some way) to conf.d/net

----------

## ndse2112

run that from the command line as root

----------

## ilikebeer

OK, so as i was running out the door for work I ran that as a command and then pinged www.google.com... worked!  Had no time to test further, but would guess that I'm back online now.

Now what I need to know is: If I am using DHCP, why would I need to define a route to the gateway that supplied my IP address in the first place, just to be able to see the internet?

----------

## ilikebeer

Oh, and by the way:  THANKS!  These forums are great, thanks a million for the tip.

----------

## malern

There's no requirement that a DHCP server must advertise a default route. Check your router configuration and see if you need to enable it.

It might also be a good idea to watch the network traffic with something like tcpdump or wireshark, just to double check it is sending one.

----------

## ilikebeer

I'm getting ready to ignore this until I get a new router... I still can't find a place in this thing to have it advertise a default route, and I still don't understand how I've never seen this before with all the times I've setup Gentoo in the last year, but I'm going to mark it as solved cause it did get me back online =-)

----------

