RealTek 8168/8111 gigabit ethernet issues (stuck on default 10baseT/UTP)

I'm having a lot of difficulty getting my RealTek NIC to behave. I'm using the re(4) driver, which was chosen for me by sysinstall, but my transfer speeds are dog slow (just over 1mbps).

Here's some relevant output:

Code:
$ pciconf -lv
re0@pci0:3:0:0:	class=0x020000 card=0xe0001458 chip=0x816810ec rev=0x03 hdr=0x00
    vendor     = 'Realtek Semiconductor'
    device     = 'Gigabit Ethernet NIC(NDIS 6.0) (RTL8168/8111/8111c)'
    class      = network
    subclass   = ethernet

Code:
$ ifconfig re0
re0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=3898<VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,WOL_UCAST,WOL_MCAST,WOL_MAGIC>
        ether 6c:f0:49:09:35:5c
        inet 10.0.0.5 netmask 0xffffff00 broadcast 10.0.0.255
        media: Ethernet 10baseT/UTP <full-duplex>
        status: active

I've played a bit with the settings, which might be evident from the output above. Particularly, I tried the following suggestion from a number of other forum posts:

Code:
$ ifconfig re0 -tso -rxcsum -txcsum

Unfortunately, this doesn't seem to have any effect (good nor bad). I also tried changing the media type, since I'm guessing this problem has something to do with the fact that it's set to 10baseT/UTP. According to man re(4), my driver-compatible media types are:

Code:
10baseT/UTP (full-duplex, half-duplex)
100baseTX (full-duplex, half-duplex)
1000baseTX (full-duplex)

I've tried them all, but each time I change it, I get:

Code:
$ ifconfig re0
...
status: no carrier

I've used this same hardware under Mac OS X and Linux with no problems, so I'm fairly sure it's not a hardware problem. Any suggestions? Thanks to anyone willing to read and/or reply.
 
What is this NIC connected to? If changing the mediatype to a higher setting makes 'the other end' drop the carrier, it sounds like a switch not liking what it sees. Have you tried setting the mediatype/mediaopt in /etc/rc.conf and rebooting with that setting?
 
Is your switch 100M or gigabit? If it's 100M, think duplex mismatch. Does your cable have all the pairs connected?
 
Thanks for the replies. My network interface is integrated on my mobo, a Gigabyte GA-P55A-UD3P. It supports gigabit speeds, which I was getting with Mac OS X and Linux installed. I'm not at home right now so I can't check the cabling, but I tested the same cable (connected to the same port on the same router) with my MacBook Pro, which was able to get a much faster connection (30-40mbps transferring a file from a computer on the same network via scp). I'll try setting the media in /etc/rc.conf when I get home tomorrow.
 
Okay, so it looks like this might actually be a hardware issue after all. Now I don't even get the usual blinking orange light when I plug in a cable (and getting "no carrier" no matter what I do with ifconfig). I've heard of these integrated RealTeks crapping out before, so I wouldn't be surprised if it's actually broken.

So with that in mind, does anyone have any recommendations for gigabit PCI-e NICs? Just did a newegg search, but not sure what to look for. I wouldn't mind spending up to $30 or so for one that will actually work.

I posted what I was going to write below in case anyone has any further insight before I buy a new card.

---

Still no luck, but here are some more points to consider:

1. I tried setting the following in /etc/rc.conf and rebooting:
Code:
ifconfig_re0="DHCP"
ifconfig_re0="-tso -txcsum -rxcsum media 1000baseTX mediaopt full-duplex"
But got "no carrier" in the ifconfig output again.

2. My card is plugged directly into an Apple Time Capsule, which supports gigabit ethernet. I have verified this using the same cord connected to my MacBook Pro, which gives the following ifconfig output (in Mac OS X):
Code:
en0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
	ether 58:b0:35:fe:09:c0 
	inet6 fe80::5ab0:35ff:fefe:9c0%en0 prefixlen 64 scopeid 0x5 
	inet 10.0.0.25 netmask 0xffffff00 broadcast 10.0.0.255
	media: autoselect (1000baseT <full-duplex,flow-control>)
	status: active
Note the "media" line.

3. I tried plugging into another switch (a non-configurable Trendnet TEG-S50g), but couldn't even get 10baseT working.
 
If you can't solve this and can spend the cash, an Intel PRO/1000 (em(4)) should work just fine. They're less than $30 usually.
 
Inspect the pins in the Ethernet connector, and try a different cable. I've had good luck with 8111C onboard Ethernet. But then, never really had any trouble with anything except Marvell and a little bit with Broadcom.

If you have PCIE slots, this is nice.
 
Your ifconfig output indicates you're using forced media configuration. Please don't do that and always use auto-negotiation. Because your link partner is 1000baseT you should always use auto-negotiation and it's a requirement of the IEEE standard. Manual media configuration is normally for broken link partner or switches.
 
I can confirm that the re(4) driver was not working on 8.2-RELEASE, but is working (out of the box) with the last 8.2-STABLE snapshot (May 2011).

I'm building a new machine with a Gigabyte GA-P67A-UD4 motherboard and the RealTek 8168/8111 gigabit NIC. (This mobo supports the new Intel SandyBridge CPUs)
 
Re: RealTek 8168/8111 gigabit ethernet issues (stuck on defa

I'm not sure if I should answer this post, because it is a little old, bu I have problems with RTL8111 and re0 and I found some help above.

Yesterday I've installed FreeBSD 10.0-RELEASE amd64 on new machine: MSI B85M-G43 (MS-7823).

With the following line in rc.conf:
Code:
ifconfig_re0="DHCP"
the Realtek NIC was detected and the re(4) driver was initialized but the card can't get an IP configuration from DHCP. After boot I can see in ifconfig re0:
Code:
re0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=8209b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,WOL_MAGIC,LINKSTATE>
        ether 44:8a:5b:26:cc:ae
        nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
        media: Ethernet autoselect (1000baseT <full-duplex,master>)
        status: active
The card doesn't have an IP and doesn't work. I've tried to set the IP manually but it didn't help. After reading the above posts I've tried some options. I've logged in to the system and issued the command ifconfig re0 tso. The card gets an IP in a few seconds and everything works fine. So I've changed rc.conf to:
Code:
ifconfig_re0="DHCP tso"
But it didn't help. And I've noticed that any change in one of the three parameters suggested to turn off earlier: tso, rxcsum, txcsum after login makes the NIC working: ifconfig re0 -rxcsum or ifconfig re0 -txcsum helps too. It could be also -rxcsum inf rc.conf and ifconfig re0 rxcsum after login. And so on...

pciconf says:
Code:
re0@pci0:2:0:0: class=0x020000 card=0x78231462 chip=0x816810ec rev=0x0c hdr=0x00
    vendor     = 'Realtek Semiconductor Co., Ltd.'
    device     = 'RTL8111/8168B PCI Express Gigabit Ethernet controller'
    class      = network
    subclass   = ethernet
    bar   [10] = type I/O Port, range 32, base 0xe000, size 256, enabled
    bar   [18] = type Memory, range 64, base 0xf7c00000, size 4096, enabled
    bar   [20] = type Prefetchable Memory, range 64, base 0xf0000000, size 16384, enabled
    cap 01[40] = powerspec 3  supports D0 D1 D2 D3  current D0
    cap 05[50] = MSI supports 1 message, 64 bit
    cap 10[70] = PCI-Express 2 endpoint IRQ 1 max data 128(128) link x1(x1)
                 speed 2.5(2.5) ASPM disabled(L0s/L1)
    cap 11[b0] = MSI-X supports 4 messages, enabled
                 Table in map 0x20[0x0], PBA in map 0x20[0x800]
    cap 03[d0] = VPD
    ecap 0001[100] = AER 1 0 fatal 0 non-fatal 0 corrected
    ecap 0002[140] = VC 1 max VC0
    ecap 0003[160] = Serial 1 01000000684ce000
    ecap 0018[170] = LTR 1

So I made a little workaround putting into /etc/rc.local the following line:
Code:
/sbin/ifconfig re0 tso
And I still have problems on start and with the initial communication with DHCP but the interface wakes up after rc.local processing and seems to work properly.

The rc.conf has only:
Code:
ifconfig_re0="DHCP"
How to make it better? Is there a problem with driver initialization?
 
Re: RealTek 8168/8111 gigabit ethernet issues (stuck on defa

marcinkk said:
How to make it better? Is there a problem with driver initialization?
I'd suggest filing a bug report with the information you've posted here and see if a developer picks it up. If not, you may want to try one of the mailing lists (probably freebsd-stable or freebsd-net), as the appropriate developers don't vist here that often.
 
Re: RealTek 8168/8111 gigabit ethernet issues (stuck on defa

I've grabbed the PR and will write a follow-up. Thanks.
 
Re: RealTek 8168/8111 gigabit ethernet issues (stuck on defa

@marcinkk: I'm having the same issue as you describe, I'm having to take the interface down and bring it back up before it will work normally. Did you file a bug report as @Terry_Kennedy suggested? I'm wondering if it is a bug or if there is just some driver setting that needs setting or something.
 
Last edited by a moderator:
Re: RealTek 8168/8111 gigabit ethernet issues (stuck on defa

@marcinkk: thanks. I will read the bug report and I will try to test the patch, though that might take me some while I learn how it's done.
 
Last edited by a moderator:
Re: RealTek 8168/8111 gigabit ethernet issues (stuck on defa

Have you tried my method of bringing interface to work? Using ifconfig re0 tso or ifconfig re0 -tso or somethig similar?
 
Re: RealTek 8168/8111 gigabit ethernet issues (stuck on defa

I tried adding -tso to my ifconfig but it didn't help. I still have to take the interface down and bring back up to get it to work.
 
Back
Top