N100Firewall
Isometric illustration of a fanless mini PC firewall with open heatsink lid, five Ethernet ports and a blue cable, beside two single-port 2.5GbE PCIe network cards
hardware

Realtek 2.5GbE Driver on OPNsense Explained: re vs rge

Which Realtek 2.5GbE driver works on OPNsense 26.7? Install os-realtek-re online or from USB, verify the RTL8125 driver, and roll back if needed.

By N100Firewall Editorial · ·Updated · 5 min read

On OPNsense 26.7, install os-realtek-re and reboot for RTL8125 driver support. The plugin installs Realtek’s realtek-re-kmod driver. The built-in re(4) lacks RTL8125 support. Plugin Makefile, plugin description, re(4) manual

Which driver handles the RTL8125 on OPNsense?

DriverRTL8125 supportStatus on OPNsense 26.7
FreeBSD re(4)NoListed in the amd64 GENERIC kernel configuration. OPNsense kernel configuration, re(4) manual
Realtek realtek-re-kmodYesInstalled by os-realtek-re. Reboot to activate it. Plugin Makefile, plugin description, package index, supported device list
FreeBSD rge(4)YesAbsent from the 26.7 amd64 GENERIC kernel configuration and the listed amd64 package index. Kernel configuration, package index, rge(4) manual

The vendor driver covers RTL8125, RTL8125B(G), RTL8125D, RTL8125K, RTL8125BP and RTL8125CP. It also supports the 5GbE RTL8126 and 10GbE RTL8127 families. FreeBSD Ports supported device list

Why doesn’t the built-in re(4) driver attach to an RTL8125?

OPNsense 22.1 switched the base system from Realtek’s vendor driver to FreeBSD’s re(4), which lacked support for the newer 2.5GbE chips. The FreeBSD 15.1 manual lists older families such as the RTL8168 and RTL8111. OPNsense 22.1 release notes, re(4) manual

From the console shell, run pciconf -lv and look for the Realtek controller. If its driver name is none, the system can see the PCI device and no driver is attached. pciconf(8) manual

How to install os-realtek-re, even with no working NIC

With a working port, open System → Firmware → Plugins, find os-realtek-re, and use the install icon. Reboot the firewall to activate the driver. OPNsense changelog guide, firmware guide, plugin description

The plugin ships these settings in src/etc/rc.loader.d/50-realtek-re. The FreeBSD package gives the same lines “to override the built-in FreeBSD re(4) driver”. Plugin loader file, FreeBSD Ports install message

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

Install offline from USB

If the firewall has no working network port, download both packages for installation from a USB stick. A spare USB Ethernet adapter is another option if OPNsense can use it. One RTL8125 owner reported that both of their USB adapters crashed before they could download the package. OPNsense forum report

  1. Download realtek-re-kmod and os-realtek-re for the firewall’s installed OPNsense release and architecture. The 26.7 amd64 index lists realtek-re-kmod-1102.01.1501000_3.pkg and os-realtek-re-1.0.pkg. Use the matching filenames in the commands below. OPNsense 26.7 package index

  2. Copy both files to the root of the USB stick’s FAT filesystem. On the firewall console, select option 8 for Shell. With the stick inserted, use gpart show -p to list partition names. OPNsense console guide, gpart(8) manual

  3. Replace USB_PARTITION with your USB partition name and mount it at /mnt. Install the driver package, then the plugin that depends on it. mount_msdosfs(8) manual, pkg-add(8) manual, plugin Makefile

    mount_msdosfs /dev/USB_PARTITION /mnt
    pkg add /mnt/realtek-re-kmod-1102.01.1501000_3.pkg
    pkg add /mnt/os-realtek-re-1.0.pkg
  4. After both installs succeed, run umount /mnt and then reboot. umount(8) manual, reboot(8) manual

Verify the driver and assign the ports

After rebooting, run kldstat and look for if_re.ko. Run pciconf -lv again to check for a driver attached to the RTL8125. kldstat(8) manual, pciconf(8) manual, Realtek 2.5GbE port example

To assign the new ports to LAN and WAN, select option 1 for Assign interfaces in the console menu. The OPNsense install and first boot guide walks through the setup. OPNsense console guide

How to undo the plugin

Keep console access before removing the packages. Removing realtek-re-kmod can leave RTL8125 ports without a driver after reboot. re(4) manual

Run the removal command from the console shell and review the package list before confirming. Reboot after package removal succeeds. pkg-delete(8) manual, reboot(8) manual

pkg delete os-realtek-re realtek-re-kmod
reboot

Upgrading from OPNsense 26.1 to 26.7

OPNsense 26.7 moved to FreeBSD 15.1. The 26.7.9 release notes list fixes to the built-in re(4) driver, including changes to transmit recovery and the reset sequence for RTL8168G and later chips. OPNsense 26.7 release notes

One owner reported errors waiting for configd after the os-realtek-re step of a 26.1.11 to 26.7 upgrade. They recovered by reinstalling 26.7.1 and restoring a configuration backup. OPNsense upgrade forum report

A separate report covers an RTL8111E that stopped working on 26.1 and 26.7. The reporter tried the Realtek plugin and saw the same behavior. OPNsense issue 307

The 26.7 release notes also list security fixes for the series.

Realtek vendor driver tunables and checksum offload

Set the hw.re.* values under System → Settings → Tunables when they apply to your setup. OPNsense settings guide, FreeBSD Ports install message

  • hw.re.max_rx_mbuf_sz="2048" reduces the receive buffer size if you can do without jumbo frames. The package message suggests it for hangs that can occur when memory is highly fragmented.
  • hw.re.flow_control="0" turns off 802.3x flow control if a congested link partner throttles transmission with pause frames. For Intel NICs, see the i226-V link-drop checklist.
  • hw.re.s5wol="1" and hw.re.s0_magic_packet="1" may be needed to enable Wake on LAN.

Version 1102.01 of the vendor driver fixed an RTL8125 transmit hang when sending small UDP packets. If the RTL8125 still has network hangs with IPv6 enabled, check Disable hardware checksum offloading under Interfaces → Settings. For drivers that support configurable checksum offloading, the FreeBSD ifconfig flags to disable it are -rxcsum -txcsum -rxcsum6 -txcsum6. FreeBSD Ports install message, OPNsense interface settings, ifconfig(8) manual

What rge(4) changes

FreeBSD imported rge from OpenBSD in December 2025. It supports Realtek RTL8125 at up to 2.5Gbps, RTL8126 at up to 5Gbps and RTL8127 at 10Gbps. FreeBSD import commit, rge(4) manual, FreeBSD Ports package description

Run ifconfig -l to list interface names. The FreeBSD example shows an interface named rge0. For an RTL8125 on OPNsense 26.7, use os-realtek-re from the release’s package repository. ifconfig(8) manual, FreeBSD interface example, OPNsense 26.7 package index

NIC choice for an OPNsense firewall

OPNsense’s hardware guide recommends Intel NICs for LAN connections. OPNsense hardware guide

The I226-V vs I225-V comparison covers Intel NIC differences. The N100 firewall build guide and fanless mini PC picks cover hardware choices.

Suricata IPS and netmap settings

Suricata IPS uses netmap. The FreeBSD netmap manual lists re(4) as a driver with native netmap support. OPNsense directs you to disable all hardware offloading under Interfaces → Settings for IPS mode. OPNsense IPS guide, netmap(4) manual

For a card without full netmap support, set dev.netmap.admode to 2 under System → Settings → Tunables to force emulated mode. OPNsense IPS guide, OPNsense settings guide, netmap(4) manual

Evidence and limits. The procedures are based on OPNsense 26.7 documentation, FreeBSD 15.1 manuals and package files. No hands-on testing was performed for this guide.

Sources

  1. os-realtek-re plugin Makefile (OPNsense Plugins)
  2. re(4) RealTek PCI/PCIe Ethernet Driver (FreeBSD Manual Pages)
  3. OPNsense 26.7 amd64 GENERIC kernel configuration
  4. os-realtek-re package description (OPNsense Plugins)
  5. OPNsense 26.7 package repository (FreeBSD:15:amd64)
  6. rge(4) Realtek 8125/8126/8127 Ethernet Driver (FreeBSD Manual Pages)
  7. realtek-re-kmod supported devices (FreeBSD Ports)
  8. 22.1 Observant Owl Series Release Notes (OPNsense Documentation)
  9. pciconf(8) (FreeBSD Manual Pages)
  10. Changelogs (OPNsense Documentation)
  11. Firmware (OPNsense Documentation)
  12. 50-realtek-re loader settings (OPNsense Plugins)
  13. net/realtek-re-kmod pkg-message (FreeBSD Ports)
  14. Yet another frustrated Realtek RTL8125 operator (OPNsense Forum)
  15. Initial Installation and Configuration (OPNsense Documentation)
  16. gpart(8) (FreeBSD Manual Pages)
  17. mount_msdosfs(8) (FreeBSD Manual Pages)
  18. pkg-add(8) (FreeBSD Manual Pages)
  19. umount(8) (FreeBSD Manual Pages)
  20. reboot(8) (FreeBSD Manual Pages)
  21. kldstat(8) (FreeBSD Manual Pages)
  22. Upgrade to 26.7 from 26.1.11 failed with realtek 2.5g NICs (OPNsense Forum)
  23. pkg-delete(8) (FreeBSD Manual Pages)
  24. 26.7 Xenial Xenops Series Release Notes (OPNsense Documentation)
  25. RTL8111E not working in 26.7, 26.1 (opnsense/src issue 307)
  26. Settings (OPNsense Documentation)
  27. Interface Settings (OPNsense Documentation)
  28. ifconfig(8) (FreeBSD Manual Pages)
  29. Initial if_rge import from OpenBSD (FreeBSD source tree)
  30. realtek-rge-kmod package description (FreeBSD Ports)
  31. Realtek RTL8125/8126/8127 new driver 2.5/5/10GBE (FreeBSD Forums)
  32. Hardware Sizing and Setup (OPNsense Documentation)
  33. Intrusion Prevention System (OPNsense Documentation)
  34. netmap(4) (FreeBSD Manual Pages)

Related