# Realtek 8186?

## arnvidr

Having trouble with my RTL8111/8168B network card, and reading around the forums, this seems like an old problem? Is there a kernel-side solution to this on the horizon? Looks like I'll have to manually install drivers from Realtek for this install...  :Confused: 

Reason I'm asking is, all solutions mention driver versions 1.03, 1.04 and even 1.05. Realtek drivers for 2.4.x kernels are now 1.07, and 2.6.x versions are past 8!

----------

## didymos

Try using the 8169 driver.  In 2.6.19 it supports these cards:

```

RTL8169

RTL8169s/8110s

RTL8169s/8110s

RTL8169sb/8110sb

RTL8169sc/8110sc

RTL8168b/8111b

RTL8101e

RTL8100e

RTL8100e

```

----------

## arnvidr

That is the driver I've tried already, which doesn't work.

It brings the card up just fine, shows up perfectly alright in ifconfig and all, but it just doesn't work.

----------

## didymos

Doesn't work how?  What sort of errors are you getting and how are you trying to configure the card?

----------

## arnvidr

I'll search up some examples from the forum later if you want, but suffice to say that according to dmesg, the driver loaded fine and the link is up. ifconfig indicates that everything is normal, just like on the very same box I'm using now. I even tried to set it up to use the same ip and everything. Tried putting the same nameservers in resolve.conf, and nothing helps. Ping to network name gives an error I can't quite remember, ping to an ip gives a Network Unreachable error.

If you have any good ideas, I'd love to hear them  :Smile: 

----------

## Monkeh

Is it built in? If not, buy a decent NIC to replace it.

----------

## arnvidr

It's built in, but I'll see what I can do with the drivers from realtek. They're supposedly based on the r8169 kernel driver, so ultimately it should work with the kernel driver in the future.

----------

## Monkeh

 *arnvidr wrote:*   

> It's built in, but I'll see what I can do with the drivers from realtek. They're supposedly based on the r8169 kernel driver, so ultimately it should work with the kernel driver in the future.

 

Mine used to work (unreliably) with the kernel driver. No longer in recent kernels. Realtek driver works.. just like the old kernel driver (worthlessly unreliable.). I gave up..

----------

## energyman76b

lsmod:

r8169

lspci:

01:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 01)

10mb/sec on a 100mbit network not a problem.

Kernel 2.6.22.X and 2.6.23.X used.

----------

## arnvidr

I have the exact same lspci output, except that it starts with the number 4 instead of 1. The r8169 driver also shows in lsmod. The install disc I used had a 2.6.23 kernel. Maybe it works after I manage to install the kernel from portage.

----------

## energyman76b

 *arnvidr wrote:*   

> I have the exact same lspci output, except that it starts with the number 4 instead of 1. The r8169 driver also shows in lsmod. The install disc I used had a 2.6.23 kernel. Maybe it works after I manage to install the kernel from portage.

 

01:00.0 is just the pci adress - ignore it.

Hm, I am using my onboard nic for some month. 2.6.21, 2.6.22 and 2.6.23 all work flawlessly for me.

I am not sure that your problem really is a kernel/driver problem. Care to post some details about your configuration?

----------

## arnvidr

Okay, here goes:

dmesg | grep eth0

```
eth0: RTL8168b/8111b at 0xffffc20000054000, 00:19:db:f2:0d:73, XID 38000000 IRQ 17

eth0: RTL8168b/8111b at 0xffffc20000056000, 00:19:db:f2:0d:73, XID 38000000 IRQ 17

r8169: eth0: link up

r8169: eth0: link up

r8169: eth0: link up

r8169: eth0: link down

r8169: eth0: link up

r8169: eth0: link down

```

ifconfig

```
eth0      Link encap:Ethernet  HWaddr 00:19:DB:F2:0D:73  

          inet addr:169.254.252.176  Bcast:169.254.255.255  Mask:255.255.0.0

          UP BROADCAST MULTICAST  MTU:1500  Metric:1

          RX packets:155576 errors:0 dropped:0 overruns:0 frame:0

          TX packets:1033 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000 

          RX bytes:9496478 (9.0 Mb)  TX bytes:224976 (219.7 Kb)

          Interrupt:17 Base address:0x6000 

lo        Link encap:Local Loopback  

          inet addr:127.0.0.1  Mask:255.0.0.0

          UP LOOPBACK RUNNING  MTU:16436  Metric:1

          RX packets:280 errors:0 dropped:0 overruns:0 frame:0

          TX packets:280 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:0 

          RX bytes:22032 (21.5 Kb)  TX bytes:22032 (21.5 Kb)
```

lspci

```
00:00.0 Host bridge: Intel Corporation 82G33/G31/P35/P31 Express DRAM Controller (rev 02)

00:01.0 PCI bridge: Intel Corporation 82G33/G31/P35/P31 Express PCI Express Root Port (rev 02)

00:1a.0 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #4 (rev 02)

00:1a.1 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #5 (rev 02)

00:1a.7 USB Controller: Intel Corporation 82801I (ICH9 Family) USB2 EHCI Controller #2 (rev 02)

00:1b.0 Audio device: Intel Corporation 82801I (ICH9 Family) HD Audio Controller (rev 02)

00:1c.0 PCI bridge: Intel Corporation 82801I (ICH9 Family) PCI Express Port 1 (rev 02)

00:1c.4 PCI bridge: Intel Corporation 82801I (ICH9 Family) PCI Express Port 5 (rev 02)

00:1c.5 PCI bridge: Intel Corporation 82801I (ICH9 Family) PCI Express Port 6 (rev 02)

00:1d.0 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #1 (rev 02)

00:1d.1 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #2 (rev 02)

00:1d.2 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #3 (rev 02)

00:1d.3 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #6 (rev 02)

00:1d.7 USB Controller: Intel Corporation 82801I (ICH9 Family) USB2 EHCI Controller #1 (rev 02)

00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev 92)

00:1f.0 ISA bridge: Intel Corporation 82801IB (ICH9) LPC Interface Controller (rev 02)

00:1f.2 IDE interface: Intel Corporation 82801IB (ICH9) 2 port SATA IDE Controller (rev 02)

00:1f.3 SMBus: Intel Corporation 82801I (ICH9 Family) SMBus Controller (rev 02)

00:1f.5 IDE interface: Intel Corporation 82801I (ICH9 Family) 2 port SATA IDE Controller (rev 02)

01:00.0 VGA compatible controller: nVidia Corporation GeForce 8500 GT (rev a1)

03:00.0 IDE interface: Marvell Technology Group Ltd. 88SE6121 SATA II Controller (rev b1)

04:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 01)

05:02.0 FireWire (IEEE 1394): VIA Technologies, Inc. IEEE 1394 Host Controller (rev c0)
```

Anything else I could post that could shed a little more light on the situation?

----------

## energyman76b

are you sure that your broadcast and netmask are correct? what about your gateway, nameserver, hosts?

----------

## didymos

OK, so what about the routing?  Is the correct gateway and all that configured?

----------

## arnvidr

Don't know why DHCP should find the wrong info, but then again, DHCP obviously doesn't work....

No, I'm not sure they're correct, and I'm not sure how I would find out. I tried setting it up with ifconfig using the ip, broadcast and mask from this box. The 

```
route add default gw ${GATEWAY}
```

 failed on me, and I copied the nameservers from this box to /etc/resolv.conf, nothing seemed to have any effect whatsoever.

Looking back I realise this is probably where I should have asked for help, but I had already tried a bunch of different cd's just to get the system to boot, and when it finally did, the network didn't work...  :Confused: 

----------

## energyman76b

how about you start with the basics? your network layout, ips used, your settings in /etc/conf.d/net, /etc/resolv.conf, /etc/hosts?

what happens if you connect two of your boxes with a crossover cable, give each of them a private ip and ping each other?

----------

## Monkeh

 *energyman76b wrote:*   

> how about you start with the basics? your network layout, ips used, your settings in /etc/conf.d/net, /etc/resolv.conf, /etc/hosts?
> 
> what happens if you connect two of your boxes with a crossover cable, give each of them a private ip and ping each other?

 

*sigh*

I've dealt with this before (my laptop has the same, awful, non-functional NIC). Getting the settings right will not help if the device doesn't work.

----------

## energyman76b

 *Monkeh wrote:*   

>  *energyman76b wrote:*   how about you start with the basics? your network layout, ips used, your settings in /etc/conf.d/net, /etc/resolv.conf, /etc/hosts?
> 
> what happens if you connect two of your boxes with a crossover cable, give each of them a private ip and ping each other? 
> 
> *sigh*
> ...

 

and I have the same great, fast working NIC. Checking the settings is the only way to find an user error.

----------

## Monkeh

 *energyman76b wrote:*   

>  *Monkeh wrote:*    *energyman76b wrote:*   how about you start with the basics? your network layout, ips used, your settings in /etc/conf.d/net, /etc/resolv.conf, /etc/hosts?
> 
> what happens if you connect two of your boxes with a crossover cable, give each of them a private ip and ping each other? 
> 
> *sigh*
> ...

 

Great, fast working? In my dreams.. if this NIC worked for more than ten minutes (when it works at all), I would be utterly amazed. I highly doubt there's user error when DHCP fails.

----------

## energyman76b

 *Monkeh wrote:*   

>  *energyman76b wrote:*    *Monkeh wrote:*    *energyman76b wrote:*   how about you start with the basics? your network layout, ips used, your settings in /etc/conf.d/net, /etc/resolv.conf, /etc/hosts?
> 
> what happens if you connect two of your boxes with a crossover cable, give each of them a private ip and ping each other? 
> 
> *sigh*
> ...

 

so RMA your laptop. It is broken.

----------

## bunder

have you tried SKGE?

----------

## arnvidr

 *energyman76b wrote:*   

> how about you start with the basics? your network layout, ips used, your settings in /etc/conf.d/net, /etc/resolv.conf, /etc/hosts?
> 
> what happens if you connect two of your boxes with a crossover cable, give each of them a private ip and ping each other?

 

Basically now, there is nothing set up at all, since I started the installation over from the start when I couldn't get the NIC to work, so the 3 files you mention are all empty besides the 127.0.0.1 and ::1 binding to localhost in the hosts file.

My network is only 1 computer at a time, directly connected to the router. Not sure how I can figure out which ips are used.

About connecting the two boxes together, how would I go about giving them ips? Would probably be good to see if that worked.

 *bunder wrote:*   

> have you tried SKGE?

 Isn't that for a different NIC type?

----------

## energyman76b

hava look at /etc/conf.d/nete.xample

basically, connect the two computers (most nics can auto-crossover today so you should not need a crossover cable). and set

config_eth0=( "192.168.0.2 netmask 255.255.255.0 broadcast 192.168.0.255")

in the first one and

config_eth0=( "192.168.0.1 netmask 255.255.255.0 broadcast 192.168.0.255")

for the second (in /etc/conf.d/net)

restart /etc/init.d/net.eth0 and try to ping each other. It should work.

----------

## Monkeh

 *energyman76b wrote:*   

>  *Monkeh wrote:*    *energyman76b wrote:*    *Monkeh wrote:*    *energyman76b wrote:*   how about you start with the basics? your network layout, ips used, your settings in /etc/conf.d/net, /etc/resolv.conf, /etc/hosts?
> 
> what happens if you connect two of your boxes with a crossover cable, give each of them a private ip and ping each other? 
> 
> *sigh*
> ...

 

No.. It is not. It's a driver problem which I don't care to track down (because the old driver is unreliable anyway).

----------

## arnvidr

 *energyman76b wrote:*   

> hava look at /etc/conf.d/nete.xample
> 
> basically, connect the two computers (most nics can auto-crossover today so you should not need a crossover cable). and set
> 
> config_eth0=( "192.168.0.2 netmask 255.255.255.0 broadcast 192.168.0.255")
> ...

 

Okay, obviously the last two years has lost me all knowledge about gentoo and not given me any knowledge about the system I've been using. The other box is a debian box, and there is no such thing as /etc/conf.d/net and I can't seem to find where to put this. You wouldn't happen to know?

----------

## energyman76b

so use ifconfig to set the stuff.

----------

## arnvidr

How do I then 'unset' it? I don't wanna mess up the only working internet connection I have at the moment.  :Embarassed: 

----------

## arnvidr

BTW, a Ubuntu 7.10 livecd didn't work either, you think it could be a hardware problem?

----------

## Alice in W

arnvidr, same situation here. It was working under kernel 2.6.20, after kernel upgrading  ( 2.6.23 )-- it works the same way as you described, i.e. I do have eth0 iface, dhcp brings up, ifconfig is ok -- and nothing, I can't ping anything.

----------

## Monkeh

 *Alice in W wrote:*   

> arnvidr, same situation here. It was working under kernel 2.6.20, after kernel upgrading  ( 2.6.23 )-- it works the same way as you described, i.e. I do have eth0 iface, dhcp brings up, ifconfig is ok -- and nothing, I can't ping anything.

 

It's a driver bug. If you want it to work, you'll either have to use an older kernel, or use the older driver.

----------

## Alice in W

 *Monkeh wrote:*   

> It's a driver bug. If you want it to work, you'll either have to use an older kernel, or use the older driver.

 

Yes, we'll see if 2.6.23 'swallows' the module from 2.6.20  :Smile:  Otherwise will stay with older kernel.

And just wanted to  console arnvidr somehow, he's not alone   :Wink: 

----------

## Monkeh

 *Alice in W wrote:*   

>  *Monkeh wrote:*   It's a driver bug. If you want it to work, you'll either have to use an older kernel, or use the older driver. 
> 
> Yes, we'll see if 2.6.23 'swallows' the module from 2.6.20  Otherwise will stay with older kernel.
> 
> And just wanted to  console arnvidr somehow, he's not alone  

 

I have the same issue with my laptop. I haven't bothered using the older driver, because the NIC is so unreliable as to be worthless anyway..

----------

## energyman76b

 *Alice in W wrote:*   

> arnvidr, same situation here. It was working under kernel 2.6.20, after kernel upgrading  ( 2.6.23 )-- it works the same way as you described, i.e. I do have eth0 iface, dhcp brings up, ifconfig is ok -- and nothing, I can't ping anything.

 

have you reported that regression on bugzilla or lkml?

if not - why?

----------

## Alice in W

 *energyman76b wrote:*   

> have you reported that regression on bugzilla or lkml?
> 
> if not - why?

 

No, I didn't.

Well, I don't know...

I'm an ordinary home user (yes, since 2003   :Very Happy:  ) and always try to find solution on these boards or wiki (or use the brain, sorry  :Very Happy:  ). Very much afraid of developers and such (C) 

And good habit to overcome alll the troubles  :Very Happy: 

100% offtop  :Wink: )

----------

## arnvidr

So...if I found a livecd of something with 2.6.20 kernel it might enable me to do a network install?

----------

## arnvidr

Probably because of my fairly new hardware, older livecd's won't boot at all, including any version of 2007.0 gentoo discs, so I can't use a livecd with an older kernel.

So, I decided to buy an external NIC, just to get this thing up and running. Seems it has the exact same problem as the other one, except this one uses the 8139too driver. Will diagnose more as time allows, but since the wiki says the livecd should load this just fine is there something else that could be causing this?

Notice if I do /etc/init.d/net.eth0 restart (or eth1), they both produce practically the same output, failing on dhcpcd, even though they get offered a ip address, and even though only one of the cards are plugged into the router.

----------

