[Guide] Resolve Realtek NIC Stability Issues on FreeBSD - FreeNAS/TrueNAS, pfSense (2.4.4, 2.4.5, 2.5.0) + OPNSense, use 2.5Gb Realtek

I don’t think I’ve seen it break 30c. Stays around 27, in room an ambient near 75F.

Added a binary package with updated Realtek interface drivers #11079

Releases — 21.02/2.5.0 New Features and Changes | pfSense Documentation (netgate.com)

@Riggi Thanks man for your invaluable help!

Could you please post the driver for OPNSense 21.1.1?

Thanks in advance

Yep, the 2.5.0 re package had been mentioned in the thread for some time - nice that 2.5.0 is official now for folks with those NICs.

Hi @JairoAV25, OPNSense should have these drivers built-in since 20.7.4.

Do you know/ or can compile this driver ‘RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller’ I seem to have the slow performance on opnsense ver 20.7.4. Reading the comments i see that it mentions RTL812xx, but nothing specific on 8111.

Hello,

Thanks for this guide !

Very helping, but I have something strange with my Odroid net card and the motherboard Odroid H2+ …

I executed pkg install realtek-re-kmod

[2.5.0-RELEASE][root@pfsense]/root: pkg install realtek-re-kmod
Updating pfSense-core repository catalogue...
pfSense-core repository is up to date.
Updating pfSense repository catalogue...
pfSense repository is up to date.
All repositories are up to date.
Checking integrity... done (0 conflicting)
The following 1 package(s) will be affected (of 0 checked):

New packages to be INSTALLED:
        realtek-re-kmod: v196.04_2 [pfSense]

Number of packages to be installed: 1

The process will require 1 MiB more space.

Proceed with this action? [y/N]: y
[1/1] Installing realtek-re-kmod-v196.04_2...
[1/1] Extracting realtek-re-kmod-v196.04_2: 100%
=====
Message from realtek-re-kmod-v196.04_2:

--
Add the following lines to your /boot/loader.conf
to override the built-in FreeBSD re(4) driver.

if_re_load="YES"
if_re_name="/boot/modules/if_re.ko"

By default, the size of allocated mbufs is enough
to receive the largest Ethernet frame supported
by the card.  If your memory is highly fragmented,
trying to allocate contiguous pages (more than
4096 bytes) may result in driver hangs.
For this reason the value is tunable at boot time,
e.g. if you don't need Jumbo frames you can lower
the memory requirements and avoid this issue with:

hw.re.max_rx_mbuf_sz="2048"
[2.5.0-RELEASE][root@pfsense]/root:

Then as indicated in the message vi /boot/loader.conf for add

if_re_load="YES"
if_re_name="/boot/modules/if_re.ko"

So, I have

[2.5.0-RELEASE][root@pfsense]/root: cat  /boot/loader.conf
kern.cam.boot_delay=10000
kern.ipc.nmbclusters="1000000"
kern.ipc.nmbjumbop="524288"
kern.ipc.nmbjumbo9="524288"
kern.geom.label.disk_ident.enable="0"
kern.geom.label.gptid.enable="0"
opensolaris_load="YES"
zfs_load="YES"
if_re_load="YES"
if_re_name="/boot/modules/if_re.ko"
autoboot_delay="3"
hw.hn.vf_transparent="0"
hw.hn.use_if_start="1"

And

[2.5.0-RELEASE][root@pfsense]/root: kldstat
Id Refs Address                Size Name
 1   14 0xffffffff80200000  3aea538 kernel
 2    2 0xffffffff83ceb000     a448 opensolaris.ko
 3    1 0xffffffff83cf6000   3bb7f0 zfs.ko
 4    1 0xffffffff840b2000   11e230 if_re.ko
 5    1 0xffffffff85121000     1000 cpuctl.ko

So for me, no problem. But

[2.5.0-RELEASE][root@pfsense]/root: ifconfig -l
re0 re1 re2 enc0 lo0 pfsync0 pflog0

He noes not miss ``re3 re4 re5` ? :astonished:
And I guarantee you that only the first port of the net card works! When I connect a cable to any port other than re0, re1 or r2, I have no networks (and the leds remain off).
I don’t understand, I forgot something or …? :thinking:

Thanks for your help

This is far more likely to be related to a physical hardware issue than a driver.

The re driver also covers 8111/8168/8411. The updated driver resolves inherent stability issues, but won’t change the performance of your underlying system.

yes I came to the same conclusion, unfortunately for me, exchange impossible. :slightly_frowning_face:

Thank you for the answer.

Thank you for helping us with the latest Realtek drivers.

My motherboard(latest 2020) has a Realtek® RTL8111H LAN Port and I am using pfsense 2.4.5-RELEASE-p1 (FreeBSD 11.3-STABLE). Which Realtek driver version shall I use? 1.95 or 1.96.04?

Cheers
Abhishek

I have a shiny new 2.5 gig ULT-WIIQ USB 3 device from Amazon (https://www.amazon.com/dp/B09CP93V3G?psc=1&ref=ppx_yo2_dt_b_product_details) that is a realtek device but it does not seem to be recognized by pfsense 2.5.2

Can someone point me to a driver for this device?

On the 2.5.x versions, you still need to install the new driver module - pkg install realtek-re-kmod and follow the additional instructions it gives (which match those above).

It seems like it is not supported as I have already installed and enabled the updated driver module which is loaded but no new interfaces have appeared. From what I can tell this is not yet supported (RTL8165B based adapter) and wouldn’t be supported with until release 13 with the if_cdce driver.

https://www.mail-archive.com/freebsd-usb@freebsd.org/msg15281.html

Unless one could use the if_cdce as a generic driver in 12.x?

Ah yeah, this is only if_re which doesn’t support it. It seems that the cdce driver isn’t great (may or may not work, and performs very poorly when it does) and someone has only just started working on updating the if_ure driver to add support. Might be out of luck for a while.

I followed this guide on TrueNAS v12.0-U8 and was able to at least get the network card to show up. But I was only able to configure it as a 1G connection instead of 2.5G. It’s a Realtek® RTL8125B-CG 2.5G LAN Controller. Any suggestions?

Thanks

Just got a new fibre connection so now have discovered this stability problem with the Realtek 8111E NICs in my pfsense box when pushing the 300MB connection downloading a Steam game.

Running this:

22.01-RELEASE (amd64)
FreeBSD 12.3-STABLE

I get
pkg: No packages available to install matching 'realtek-re-kmod' have been found in the repositories

What do I need to do to update the drivers here?

Thanks
Slink

Seems they neglected to include it in the new repos.
fetch -v https://pkg.freebsd.org/FreeBSD:12:amd64/latest/All/realtek-re-kmod-196.04.txz
pkg install -f -y realtek-re-kmod-196.04.txz

pkg add https://pkg.freebsd.org/FreeBSD:12:amd64/quarterly/All/realtek-re-kmod-196.04.pkg
or
https://pkg.freebsd.org/FreeBSD:12:amd64/latest/All/realtek-re-kmod-197.00.pkg

Thanks. Appreciate that help. Appears to be working. Getting dropped pings every 10 or so but download speed is sustained and not getting the watchdog timeout in the system log anymore. However I did get a brief drop with ">>> Gateway alarm: WAN_DHCP (Addr:192.168.1.1 Alarm:0 RTT:2.259ms RTTsd:7.496ms Loss:20%) " in the log so off to investigate that now. Much better than what was happening before though.

Hi Guys,

I did the above on a Realtek NIC mini pc. Im trying to run pfsense. Started having issues a couple of days ago. Even after the following commands I am having issues.

fetch -v https://pkg.freebsd.org/FreeBSD:12:amd64/latest/All/realtek-re-kmod-196.04.txz
pkg install -f -y realtek-re-kmod-196.04.txz

  1. Google Devices are almost always offline (including nest)
  2. Online Xbox games won’t work, some will. (Wired)
  3. General stability

Anything else I can do? I have verified the alternate driver is running and modified my loader.conf (I don’t have a loader.conf.local)

Thanks