OPNSense – Fix Realtek Ethernet NIC Issues

Author:

OPNSense is a powerful open-source firewall and routing platform, highly regarded for its flexibility, security features, and performance. However, users of OPNSense have occasionally encountered issues when using Realtek Ethernet NICs (Network Interface Cards). These issues range from packet loss and unstable connections to complete hardware incompatibility. Below, we delve into the causes of these problems and provide effective solutions to fix Realtek Ethernet NIC issues on OPNSense.

Check out my YouTube channel if you prefer video content over written posts. Here’s the link to the video:

https://youtu.be/jeXQueTipH0

Understanding the Problem

Realtek Ethernet NICs are popular for their affordability, making them a common choice for budget-conscious setups. However, they are not always ideal for high-performance environments like OPNSense. The primary issues include:

  1. Driver Incompatibility: OPNSense may not fully support the default Realtek drivers, leading to inconsistent network behavior.
  2. Interrupt Handling Problems: Realtek NICs are prone to interrupt storms under heavy load, degrading performance.
  3. Packet Loss and Latency: Some Realtek models struggle with proper packet handling, resulting in degraded network throughput.
  4. Driver Bugs: Realtek drivers in BSD-based systems (such as OPNSense) can have unresolved bugs impacting stability.
  5. Power-saving: this feature on Realtek NICs (and some other network adapters) can interfere with network performance.

Solutions to Fix Realtek NIC Issues

1. Use an Alternative NIC

The most straightforward fix is to replace the Realtek NIC with a better-supported alternative, such as Intel-based NICs. Intel NICs are widely recognized for their stability, performance, and seamless compatibility with OPNSense.

2. Update the Realtek Driver

OPNSense allows users to update or replace drivers manually. To improve Realtek NIC performance:

  • Update OPNSense: Ensure your OPNSense version is up-to-date, as newer versions may include improved driver support.
  • Install the Realtek Driver Plugin: OPNSense provides a specific plugin for Realtek drivers. Go to System > Firmware > Plugins, search for os-realtek-re, and install it.
  • Restart for OPNSense to load the new driver.

3. Adjust Advanced NIC Settings

Tuning your Realtek NIC settings can mitigate performance issues:

  • Navigate to Interfaces > Settings in OPNSense.
  • Disable features such as:
    • Hardware Checksum Offloading
    • Hardware TCP Segmentation Offloading
    • Hardware Large Receive Offloading
  • The above settings are enabled by default on OPNSense. However, please ensure that it’s enabled.

4. Switching WAN Interface to a different NIC

In my experiences, I found that each Realtek NIC is behaving differently. Realtek produces multiple chipset variants that might have different features or levels of optimization. Some NICs might prioritize cost-efficiency over performance, which could lead to inconsistent results. NICs with different firmware versions may behave differently, especially if updates or bug fixes were unevenly applied across models. You will need to experiment with each NIC to find the one that works best for the WAN interface.

5. Stress test the system using iperf3

Coming soon!

Ways to support my channel

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Translate »