# Network properly configured: no network (SOLVED)

## Sloefke

Just installed Gentoo, got working network throughout the whole installation procedure.

I'm connected to a router and had to provide the networking information myself (manual IP for computer, router IP as gateway, that sort of stuff).  It all worked seemlessly.

Until now.  I have configured /etc/conf.d/net to the same settings and ifconfig shows a proper configuration of eth0.  When booting the system, everything gets set to its proper value.  But when I try to ping Google, I get timeouts.  Even pinging my router results in faults: destination host unreachable.

I suspect a problem with my gateway, but everything is set to proper values, I think.  I tried "route add default gw 192.168.0.1" but that resulted in a "SIOCADDRT: File exists" message.

Any ideas?Last edited by Sloefke on Mon Nov 28, 2005 6:55 pm; edited 1 time in total

----------

## bLaXe

Do you have DNS working correctly? Check the contents of /etc/resolv.conf

You should have at least one nameserver. For example, on my system, where 192.168.1.1 is my router box:

```
chris@phi ~ $ cat /etc/resolv.conf

nameserver 192.168.1.1

```

----------

## Sloefke

 *bLaXe wrote:*   

> Do you have DNS working correctly? Check the contents of /etc/resolv.conf
> 
> You should have at least one nameserver. For example, on my system, where 192.168.1.1 is my router box:
> 
> ```
> ...

 

It reads:

```

nameserver 134.58.126.3

nameserver 134.58.127.1

search kotnet.org

```

----------

## bLaXe

It's not that then (I think).

So you cannot ping the router? What kind of router is it? Is it a Gentoo (or other Linux) box or is it a commercial router?

Are you sure that your network config is correct? Could you post your /etc/conf.d/net and output of 'ifconfig'.

----------

## Sloefke

/etc/conf.d/net

```

config_eth0=( "192.168.0.199 netmask 255.255.255.0 brd 192.168.0.255" )

routes_eth0=( "default gw 192.168.0.1" )

```

ifconfig outputs normal data (eth0 is configured with the correct IP address, broadcast address and netmask).

19:37 <Sloef> during installation I configured eth0 properly

19:37 <Sloef> it worked

19:37 -!- baywatcMonaff [~alphacpu@222.Red-83-46-22.dynamicIP.rima-tde.net] has

          joined #gentoo

19:37 <Sloef> but I have two network connections, eth0 and eth1

19:37 -!- wflmf [~Bay_Bora@d150-130-108.home.cgocable.net] has quit [Signed off]

19:37 <Sloef> one of the two is not physically connected, could it be that

              these two are swapped somehow?

Three network ports even, two onboard and one NIC (now connected to onboard port).

----------

## bluedevils

what does nestat -rn give you? (edit: I see you posted your gateway)

you can ping your own interface, but not the router interface that is on the same network?  Are there any other devices to ping?  Have you made sure there is a good link light for the cable between computer and router?

----------

## Sloefke

 *bluedevils wrote:*   

> what does nestat -rn give you? (edit: I see you posted your gateway)

 

0.0.0.0 192.168.0.1 0.0.0.0 UG 0 0 0 eth0

and two other gateways (0.0.0.0 and 127.0.0.1).

 *Quote:*   

> you can ping your own interface, but not the router interface that is on the same network?  Are there any other devices to ping?  Have you made sure there is a good link light for the cable between computer and router?

 

Pinging own interface: yes.

Other devices to ping: no.

Physical connection is ok, it works in Windows.

-mod-: copied /etc/init.d/eth0 to /etc/init.d/eth1 and changed information in /etc/conf.d/net to match eth1.  Somehow eth0 and eth1 got swapped.  Pretty ridiculous  :Smile: Last edited by Sloefke on Mon Nov 28, 2005 6:54 pm; edited 1 time in total

----------

## bluedevils

ah multi homed interfaces.  Yes it is a distinct possibility that the interface names during installation do not line up after installation.  I had that problem the first time I installed Gentoo.

----------

