# cant get the network config to work :(

## kraay

Hi i just installed gentoo   :Very Happy:  ..but  am doing something wrong because i cant get  my network up.

I have edited my /etc/conf.d/net  like this :

config_eth0=( "192.168.123.123" )

routes_eth0=( "default via 192.168.123.254" )

or 

config_eth0=( "192.168.123.123 netmask 255.255.255.0" )

routes_eth0=( "default gw 192.168.123.254" )

or

config_eth0=( "192.168.123.123 netmask 255.255.254.0" )

routes_eth0=( "default gw 192.168.123.254" )

my resolf.conv :

search deven1.ov.nl.home.com

nameserver 213.51.129.37

nameserver 213.51.144.37

or

search deven1.ov.nl.home.com

nameserver 192.168.123.254 (my routers adress)

And i try'd so many more .. but still am doing something very wrong. could someone plz tell me what.  :Idea: 

I really really would like to go on whit installing Gentoo ..so i need a connection...some help would be very appriciated.Last edited by kraay on Fri Sep 08, 2006 9:44 am; edited 2 times in total

----------

## bunsen

Do you really mean /etc/init.d/net and not /etc/confd.d/net ?

----------

## kraay

yeah sorry .. i mean /etc/conf.d/net

----------

## bunsen

OK, your first two config lines look similar to mine.

How does 

```
/etc/init.d/net.eth0 restart
```

 respond ?

----------

## kraay

nope does not work 

but it does not give errors of any kind it says:

 bringing up eth0  192.168.123.123  [ok]

 Adding routes  default gw 192.168.123.254 [ok]

and it also gives me a mac adress

----------

## bunsen

Not sure about the 'default gw' in your routes_eth0. What I meant was that your first two of your listed config lines resembled mine, e.g.,

```
config_eth0=( "192.168.10.12 netmask 255.255.255.0 broadcast 192.168.10.255" )

routes_eth0=( "default via 192.168.10.254" )
```

What does 

```
/sbin/route
```

 show and do you get a healthy response to pinging the route IP address?

Any clues from dmesg?

----------

## kraay

/sbin/route

 gives not output  

dmesg says : 

addrconf(netdev_up) : eth0: link is not ready 

eth0 : no link during initializationLast edited by kraay on Sat Sep 09, 2006 10:56 pm; edited 1 time in total

----------

## bunsen

Is your network hardware being identified?  Try  

```
dmesg | grep eth0
```

Or is what you've already listed the result of the same?

----------

## kraay

dmesg | grep eth0

yes gives same result

----------

## kocoorek

First of all make sure if right module for you network card is loaded. Then check if you've got link to net.lo

```
$ ls -ali /etc/init.d/net.eth0

 5308 lrwxrwxrwx 1 root root     6 sie 24 09:53 /etc/init.d/net.eth0 -> net.lo
```

If your router address is 192.168.123.254 your /etc/conf.d/net should look like this

 *Quote:*   

> config_eth0=( "192.168.123.254 netmask 255.255.255.0" )
> 
> routes_eth0=( "default gw 192.168.123.254" )

 

Now run the script

```
/etc/init.d/net.eth0 start
```

and check if eth0 is up with ifconfig. If it's up try to ping your router

```
ping 192.168.123.254
```

If it doesn't respond maybe your cable or router is broken.

----------

## kraay

My router ( & tested the kabel ) aint broken because my other box on that router does work.

Pinging my network card works fine  ... but i cant ping my router or www.google.nl or do anything else that requires a connection. 

+ When i use the minimal cd ... and start up sshd then i can login from my other box to install & configure gentoo ..so the cabel & router must be oke. 

But after the reboot to continue the install ..i cant get the connection back.

----------

## kocoorek

Pleas post your ifconfig output(after eth0 is up) and if you've got iptables installed post output of iptables -L.

 *Quote:*   

> Pinging my network card works fine ... 

 

Do you mean, you can ping your gentoo box from another one?

An one more question, how you check your cable?

----------

## kraay

ifconfig output :

whit eth0_config =192.168.123.123 ( the ip that i used to install whit ssh and thats the ip that port of the router normally uses )

the output is:

internet adress : 192.168.123.123 

Bcast : 192.168.123.255 

mask 255.255.255.0

or when i use  192.168.123.254 as u told me to

the ifconfig output is :

internet adress : 192.168.123.254 

Bcast : 192.168.123.255

mask 255.255.255.0

So i mean.... i can ping 192.168.123.123  from the same gentoo box ..not from the other box.

And i can ping 192.168.123.254 only when i use eth0_config =192.168.123.254 but than am not pinging my router but the networkcard. 

No i do not got iptabels installed yet...

I checkt the cabel by using it on my other box...works fine.  :Smile: 

----------

## kocoorek

Sorry, my mistake I don't know why I told you to set your IP to 192.168.123.254. You can not use it obviously because it's your getaway address (router address), but I understand that when you set IP to 192.168.123.123 your card doesn't work neither. So the last thing I can suggest you it's to try with another card. Maybe it's something wrong with it.

----------

## kocoorek

One more suggestion. Did you try to boot with some LiveCD and checked if network works ?

----------

## kraay

I have replaced my network card... i didn't think it would make any difference  ..but i hoped it would..but unfortunely it did not.  ...& when i boot a live cd whit any of those cards the internet works.

I did everything i know that suppose to make my net config work .. but there must be something i dont know or see..but wtf is it.   :Confused: 

Anyway thanx for al the help so far   :Very Happy: Last edited by kraay on Sat Sep 09, 2006 10:57 pm; edited 1 time in total

----------

## kocoorek

So now we know that the problem is not related with hardware. If your network work when you are booting from live cd maybe your router has build in dhcp server. Try set your card for dhcp.

In /etc/conf.d/net only:

 *Quote:*   

> config_eth0=( "dhcp" )

 

make sure you've got net-misc/dhcpcd installed.

Btw the problem could be caused by wrong kernel configuration.

----------

## kraay

I try'd using config_eth0=( "dhcp") earlyer but it didn't work it says :

 *Quote:*   

>  Error , Timed out   waiting for a valid DHCP server  response 

 

Thats poberly because i dont have net-misc/dhcpcd installed ?

Are these the links i should use to get the file:

http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-misc/dhcp/

OR 

http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-misc/dhcpcd/

I have a AMD Ahton 64 x2 dualcore proccesor 

So i used stage  /releases/amd64/current/stages/stage3-amd64-2006.1.tar.bz2

And i installed using the  guide  http://www.gentoo.org/doc/en/gentoo-x86-quickinstall.xml

----------

## kocoorek

If you've got portage installed link for right source is in ebuild file /usr/portage/ net-misc/dhcpcd/dhcpcd-xxx.ebuild. When you download it copy it to /usr/portage/distfiles/ and then simply run

```
emerge dhcpcd
```

hope it doesn't want any dependency.

Btw can you show me output of lspci and lsmod 

```
lspci > out.txt

lsmod >> out.txt
```

Copy the out.txt file to post.

----------

## kraay

emerge dhcp  succeded ... but i think that already was oke ...

when i do   *Quote:*   

>  lspci > out.txt  
> 
> command not found 

 

 *Quote:*   

>  lsmod >> out.txt  ( no output )  

 Last edited by kraay on Sat Sep 09, 2006 10:57 pm; edited 2 times in total

----------

## kocoorek

Did you run lspci as a root ?

----------

## kraay

yes.. the command does not exist yet ...when i do tab....it does not show

----------

## kocoorek

Did you compile kernel by yourself ?

What type a network card do you have ? (chipset)

----------

## kraay

I compiled the kernel by using the guide.

chipset networkcard : RTL 8029as   

                               (89162T1)

----------

## kocoorek

Did you build driver for your card into a kernel or as a module ?

If it's possible post your kernel config file.

----------

## sonicbhoc

emerge pciutils to get lspci.

----------

## kraay

I build the driver for my card in the kernel.

using this command during setup :

 *Quote:*   

>  echo r8029  >> /etc/modules.autoload.d/kernel-2.6 

 

Where do i find the kernel config file ? (cant find it whit )   *Quote:*   

>  whereis kernel , kernel.cfg or kernel.config 

 

& how do i read its output ....

----------

## sonicbhoc

to output the kernel config, type:

cat /usr/src/linux/.config

----------

## kocoorek

The right driver for your card is 8139too, so try to load it (as a root)

```
modprobe 8139too
```

then start net

```
/etc/init.d/net.eth0 start
```

and check if network is working.

Your kernel config file could be find in /boot/ or /usr/src/linux/ directories ( .config or config-xxx file).

----------

## kraay

 *Quote:*   

>  modprobe 8139too  ( gives the output : FATAL : Module r8139 not found. ) 

 

I cant give my kernel output because its simply to big .. i cant cp it... i must write every output over to here.

(sonicbhoc)

I cant emerge lspci because i dont have a connection so i burnt it on a cd

And did  *Quote:*   

>  cp pciutils-2.2.0.tar.gz to /usr/portage/distfiles/  

 

When i emerged it says... emerge : there are no ebuilds to satisfy "pciutils-2.2.0.tar.gz" 

I cant find that ebuild file on http://sources.gentoo.org/viewcvs.py/gentoo-x86/ if thats even the place where i must search it.

I did find dhcpcd-2.0.0.ebuild there & cp that to  /usr/portage/distfiles/  and that workt ( see post: Sat Sep 09, 2006 11:27 am)Last edited by kraay on Sat Sep 09, 2006 4:55 pm; edited 1 time in total

----------

## kocoorek

If you can not copy all your kernel config check only support for your card

```
cat /usr/src/linux/.config | grep -i 8139
```

Btw did you compile any kernel earlier or it was yours first time?

----------

## kraay

Doing   *Quote:*   

>  cat /usr/src/linux/.config | grep -i 8139 

 

Gives the output :

CONFIG_8139CP=y

CONFIG_8139TOO=y

# CONFIG_8139TOO_PIO is not set

# CONFIG_8139T00_TUNE_TWISTER is not set

# CONFIG_8139TOO_8129 is not set 

# CONFIG_8139_OLD_RX_RESET is not set

Its the first time i compiled a kernel ....

----------

## kocoorek

Maybe this is a problem

 *Quote:*   

> # CONFIG_8139TOO_8129 is not set

 

Try to set it up and build new kernel. Then boot with new one. I assume that you have set up network support and etc.

There is a guide from gentoo handbook http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=1&chap=7. You can try use genkernel if you don't fell comfortable setting up everything by yourself.

Btw you don't need this for sure

 *Quote:*   

> CONFIG_8139CP=y

 

----------

## kraay

Am building the new kernel.

I have started all over whit the guide ... the best thing to do i suppose.

for network i have done: 

livecd etc # cd conf.d

livecd conf.d # echo 'config_eth0=( "192.168.123.123/22" )' >> net

livecd conf.d # echo 'routes_eth0=( "default via 192.168.123.254" )' >> net

livecd conf.d # rc-update add net.eth0 default

livecd conf.d # rc-update add sshd default

Am now at the point where i can emerge packages.

Are there any packages i should emerge besides pciutils before rebooting ?Last edited by kraay on Sat Sep 09, 2006 8:29 pm; edited 3 times in total

----------

## kocoorek

If you build your driver into a kernel you don't have to do this

 *Quote:*   

> livecd conf.d # echo r8139 >> /etc/modules.autoload.d/kernel-2.6)

 

This is necessary only if you build your driver like a module and want to load it at boot (beside the right name of the module is 8139too not r8139).

When you run menuconfig of your kernel remember to set

 *Quote:*   

> Device Drivers  ---> Network device support  ---> 
> 
> [*] Network device support
> 
> Ethernet (10 or 100Mbit)  --->
> ...

 

Are you using genkernel ?

----------

## kraay

livecd conf.d # echo r8139 >> /etc/modules.autoload.d/kernel-2.6)

( I had already removed the line before pressing enter )  

btw 

lspci >> out.txt  output:

RTL-8029(AS)  

If genkernel is what appears with make menuconfig ...yes am using genkernel.

Done this:

 *Quote:*   

> Device Drivers ---> Network device support --->
> 
> [*] Network device support
> 
> Ethernet (10 or 100Mbit) --->
> ...

 

And i finished the install ... after the reboot still no connection.

----------

## kocoorek

Wirte in your /etc/conf.d/net

 *Quote:*   

> config_eth0=( "dhcp" )
> 
> fallback_eth0=( "192.168.123.123 netmask 255.255.255.0" )
> 
> fallback_routes_eth0=( "default gw 192.168.123.254" )

 

Do

```
/etc/init.d/net.eth0 start
```

Post output of

```
dmesg | grep -i eth0
```

and

```
dmesg | grep -i rtl
```

----------

## kraay

 *Quote:*   

>  dmesg | grep -i eth0 

  output: 

eth0: forcedeth.c: subsystem: 01462:7250 bound to 0000:00:08.0

eth0: no link during initialization.

ADDCONF(NETDEV_UP) :eth0: link is not ready

 *Quote:*   

>  dmesg | grep -i rtl 

  no output 

----------

## kocoorek

It seems like we don't have the right driver for rtl-8029 card.

The best way to check the right one is to boot with livecd and see output of

```
lsmod
```

and

```
dmesg | grep -i eth0
```

can you do that ?

----------

## kocoorek

I found on the web that the driver for the rtl 8029 card is ne2k-pci not 8139too what I thought earlier (sorry by that). So you need in your kernel

 *Quote:*   

> Device Drivers ---> Network device support ---> 
> 
> [*] Network device support 
> 
> Ethernet (10 or 100Mbit) ---> 
> ...

 

And you need to rebuild your kernel ones again =|

----------

## kraay

Oke than i will do that ... thnx for finding that out for me. 

lsmod output : 

Module                  Size  Used by

ipv6                  187744  8

parport_pc             26948  0

parport                21544  1 parport_pc

pcspkr                  1156  0

rtc                     8948  0

forcedeth              16356  0

ne2k_pci                7040  0

8390                    6752  1 ne2k_pci

eth1394                14536  0

dm_mirror              14672  0

dm_mod                 37048  1 dm_mirror

pdc_adma                6212  0

sata_mv                12516  0

ata_piix                6532  0

ahci                    9124  0

sata_qstor              6468  0

sata_vsc                5316  0

sata_uli                4644  0

sata_sis                5220  0

sata_sx4               10052  0

sata_nv                 5924  0

sata_via                5668  0

sata_svw                4932  0

sata_sil24              7684  0

sata_sil                6244  0

sata_promise            7716  0

libata                 35912  15 

pdc_adma,sata_mv,ata_piix,ahci,sata_qstor,sata_ 

vsc,sata_uli,sata_sis,sata_sx4,sata_nv,sata_via,sata_svw,sata_sil24,sata_sil,sat 

a_promise

sbp2                   16484  0

ohci1394               25140  0

ieee1394               57272  3 eth1394,sbp2,ohci1394

sl811_hcd               9344  0

ohci_hcd               14916  0

uhci_hcd               24144  0

usb_storage            49920  0

usbhid                 28992  0

ehci_hcd               22856  0

usbcore                80068  7 

sl811_hcd,ohci_hcd,uhci_hcd,usb_storage,usbhid,e hci_hcd

dmesg | grep -i eth0 output :

eth1394: eth0: IEEE-1394 IPv4 over 1394 Ethernet (fw-host0)

----------

## kraay

CONNECTION ESTABLISHED !!! 

The  PCI NE2000 and clones support ...did the trick.

Kocoorek ..thnx man...for helping me getting my connection back   :Very Happy:  ..thnx alot !!

----------

## kocoorek

No problem man  :Cool: 

----------

