pfsense and 2.5gbps?

OFaceSIG

2[H]4U
Joined
Aug 31, 2009
Messages
4,047
Anyone successfully running pfsense with 2.5gbps? I don't think I've found a post yes with details on how they got it running.
 
PFSense can work with any speed?

The issue is what NIC you use, Intel 226 I think are good now on BSD, but most other 2.5Gb NICS, including previous intels sucked and had issues.
 
pfsense should not require any special configuration just because you are using an adapter with a higher link speed. All that matters is that the particular NIC is actually supported, and that the CPU is fast enough to handle the traffic (including any extra processing required by addons/options/features that you are using).
 
Intel x710L working perfect here for years for both WAN and LAN connections
Although 10gig cards are faster, it’s older tech than 2.5/5gbps cards so not all 10g cards will step down to sync at 2.5/5.
 
I've used Intel i225v (B3) and Intel i226v on OPNsense (same FreeBSD base as pfSense) with no issues. No additional configuration is needed for the Intel stuff but you'll need to use realtek-re-kmod to get Realtek NICs working correctly (plenty of info on this if you just search it).

I would strongly avoid anything with i225v, B3 stepping is supposed to "fix" all the issues but some people still have reported issues and the first two steppings are notoriously bad. Intel i226v has been working excellent for me. Most mini PCs have already upgraded to this NIC on the boxes where there are 2 - 6 NICs but you can also get a dual port PCIe card like https://www.aliexpress.us/item/3256805613580242.html
 
I've used Intel i225v (B3) and Intel i226v on OPNsense (same FreeBSD base as pfSense) with no issues. No additional configuration is needed for the Intel stuff but you'll need to use realtek-re-kmod to get Realtek NICs working correctly (plenty of info on this if you just search it).

I would strongly avoid anything with i225v, B3 stepping is supposed to "fix" all the issues but some people still have reported issues and the first two steppings are notoriously bad. Intel i226v has been working excellent for me. Most mini PCs have already upgraded to this NIC on the boxes where there are 2 - 6 NICs but you can also get a dual port PCIe card like https://www.aliexpress.us/item/3256805613580242.html
Thank you, exact what I was looking for. I wouldn't run realtek in BSD. But knowing you have first hand experience with the 226 gives me confidence to run that on my next build.
 
I use a 2.5gbps Trendnet TEG-25GECTX as the LAN connection of my PFsense. Hosted as a VM in Hyper-V. Works fine. I occasionally use the iperf package on it for testing network performance on the network.
 
you'll need to use realtek-re-kmod to get Realtek NICs working correctly (plenty of info on this if you just search it

The realtek driver does some things better, but I'd still avoid their 1G nics if you can. I don't know about their 2.5G nics, I have some usb realtek 2.5G nics, but no drivers for FreeBSD when I checked (was a while ago though). Personally, I've been upgrading with older intel 10G for my LAN; but maybe your modem has 2.5g? (My internet connection is very sad)
 
The realtek driver does some things better, but I'd still avoid their 1G nics if you can. I don't know about their 2.5G nics, I have some usb realtek 2.5G nics, but no drivers for FreeBSD when I checked (was a while ago though). Personally, I've been upgrading with older intel 10G for my LAN; but maybe your modem has 2.5g? (My internet connection is very sad)
The realtek-re-kmod supports all (or at least most) Realtek NICs all the way from 5GbE/2.5GbE/1GbE/100M/10M. I haven't personally used one but know someone who's been using the RTL8125 with no issues in OPNsense (with the realtek-re-kmod, not the FreeBSD version). Specifically, this version is generally considered best to be used at this moment.

I think the Realtek NICs are fine from a hardware perspective, unlike the disaster i225v from Intel where the first two steppings had issues on any OS. I think we'll continue to see driver development for FreeBSD but in its current state it should be usable (provided you take the time to setup the realtek-re-kmod). Future FreeBSD versions should eventually adopt this driver to have it working out of the box but who knows how long that could take.
 
Future FreeBSD versions should eventually adopt this driver to have it working out of the box but who knows how long that could take.
I don't think they will. The FreeBSD driver in main is readable source. The realtek driver really isn't, it's full of magic constants with no explanation of what they do. I spent some time trying to figure out what was going on with my realtek 1G NIC. If the realtek source was less magic, I'd have fiddled around with combining the two drivers to get something that worked better...

I think there's a nasty timing issue/race condition in the hardware, which is why the FreeBSD driver sometimes gets stuck --- the host cpu and the NIC don't agree on what packet is to be sent, and the FreeBSD driver resets the NIC, but even when the NIC acknowledges reset, it doesn't really reset. It's actually pretty nasty, sometimes the NIC will receive a packet after reset with an old address that the kernel reused for something else; much sadness. An IO-MMU might help with debugging that, but since the NIC I have that's easiest to get into a bad state is an embedded nic on a board without an IO-MMU, I can't really debug any further.

Even ignoring all that, since the 1G nics only have one interrupt, you don't know if you got new packets, or the NIC finished sending packets, or it's a status update; and the interrupt status register is racy, so you just have to check all the things; IIRC one driver checks Rx first and the other checks Tx first, and so on a marginal cpu, you can pick drivers to decide if you want to get full speed Rx or full speed Tx, but you won't get balanced. (Although with the realtek driver, if it doesn't clear out the Rx packets in time, the nic will send out pause frames and then you have to deal with all that's wrong with ethernet flow control)

I would assume the faster realtek nics have at least separate interrupts for rx/tx/misc and probably multiple queues for rx and tx too, because you really want that for better host performance, and msi-x makes many interrupts really cheap and a new design wouldn't need to think about what to do if stuck with only one viable interrupt pin on PCI. But I dunno, maybe they kept the same interface and just bumped the speed without regard for anything else.
 
Last edited:
Back
Top