Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Package realtek-re-kmod198 for pfSense 2.8.0 (amd64)

    Scheduled Pinned Locked Moved Hardware
    40 Posts 7 Posters 10.6k Views 9 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • zeroepochZ Offline
      zeroepoch @SpunkThing
      last edited by

      @SpunkThing

      If I'm reading your output correctly (based on kern.ipc.nmbjumbo9?) you enabled jumbo frames? If not there is an additional setting you can add to /boot/loader.conf.local to fix a possible hang (if not using jumbo frames). I did the following on my system.

      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"
      

      My /boot/loader.conf.local looks like:

      if_re_load="YES"
      if_re_name="/boot/modules/if_re.ko"
      hw.re.max_rx_mbuf_sz="2048"
      

      As @stephenw10 suggested you should check dmesg to see what version was loaded.

      # dmesg | grep "re[0-9]: version:"
      ...
      re0: version:1.98.00
      re1: version:1.98.00
      
      SpunkThingS 1 Reply Last reply Reply Quote 0
      • SpunkThingS Offline
        SpunkThing @stephenw10
        last edited by

        Hi @stephenw10

        Seems to be the case. This screenshot was taken after installing the driver we're discussing here.

        Another indication, if I saw that correctly, is that there is no corresponding module in the /boot/modules directory. That's placed there only when installing an alternative driver such as this one if my observations were correct.

        Can't verify now as I'm in the process of installing pfSense on a 'new' system.

        GW_down10.jpg

        zeroepochZ 1 Reply Last reply Reply Quote 1
        • SpunkThingS Offline
          SpunkThing @zeroepoch
          last edited by

          @zeroepoch

          That's not something I would deliberately enable. At least not that I remember.
          Actually I think that's one of those things I used to turn off on network adapters in Windows in the old days because it caused trouble.

          But on the other hand I am the type that messes around with settings often while not completely understanding them. So don't rule it out completely.

          Anyway, as I said I'm currently working on a fresh installation of 2.7.2 and that version has always worked nicely for me, except for that one problem with the WAN going down under "heavy" loads. Suppose I'll be looking out for better NIC's if it happens again. ๐Ÿ˜…

          I'll restore a recent-ish configuration backup and leave it at that for the time being.

          I'll keep following this though if you decide to dive further into it.
          Very curious why both drivers were acting up on my system while they work fine for you.
          Could be anything, my messing in settings not being the least likely of causes... Hehehe

          1 Reply Last reply Reply Quote 0
          • zeroepochZ Offline
            zeroepoch @SpunkThing
            last edited by

            @SpunkThing

            That's right. There is no /boot/modules/if_re.ko without either of these packages being installed. It wouldn't print this message if you didn't have the driver I provided loaded, so indeed you're using the same driver as me.

            1 Reply Last reply Reply Quote 0
            • zeroepochZ Offline
              zeroepoch
              last edited by

              @stephenw10 any chance we can get realtek-re-kmod198 to be part of the official pfSense repo? FreeBSD made the decision to package these two versions separately because both 1.98 and 1.100 both have different bugs but each work best for different NICs.

              1 Reply Last reply Reply Quote 0
              • stephenw10S Online
                stephenw10 Netgate Administrator
                last edited by

                I'll see what I can do.

                S 1 Reply Last reply Reply Quote 2
                • S Offline
                  Seeking Sense @zeroepoch
                  last edited by

                  @zeroepoch Thanks for the information and more importantly the warning.

                  Was contemplating upgrading my local instance of pfSense this weekend. I am using a dual port 2.5gb Realtek Nic and remembered that I had installed the realtek-re-kmod198-198.00.1400094 driver.

                  Thankfully I came across your post when searching the forum looking for information regarding an updated driver for pfSense 2.8

                  If you don't mind can you clarify the build process.

                  You list steps 1-11 but was wondering if step 1 is to create a FreeBSD 15 VM and then do all the within that VM.

                  Also in step 1 you say you installed some packages mentioned at https://github.com/nkbali/pfSense-Build. What packages?

                  Thank you for your efforts and your support of the community.

                  zeroepochZ 1 Reply Last reply Reply Quote 0
                  • zeroepochZ Offline
                    zeroepoch @Seeking Sense
                    last edited by

                    @Seeking-Sense

                    Yes, this was all done in a FreeBSD 15 VM using VirtualBox. I had to change the default network card to VirtIO I believe since the performance with the other NICs was like dial-up modem speeds. I also had to install pkg manually using pkg-static since the auto installer when running pkg didn't work and just hung. I don't remember if I tried installing pkg before or after I fixed the slow network issue.

                    I just installed all the packages mentioned throughout the page since I wasn't trying to optimize size since I intended to throw away the VM when I was done.

                    Finding a working commit for the kernel was one of the main challenges. I looked for a commit right before a merge from main that was still 1500029.

                    1 Reply Last reply Reply Quote 0
                    • SpunkThingS SpunkThing referenced this topic on
                    • R Offline
                      rob_denver
                      last edited by

                      thank you so much for this! I have been struggling with getting IPV6 working on my virtualized pfsense within Proxmox so I can have more reliable connections for tailscale. I could only get it to work by using PCI passthrough (vs using a bridge) but that of course required me to directly expose my Realtek ethernet controller which led to many lockups and crashes when IPV6 was enabled. I just installed this and -hopefully- this will give me a stable connection.

                      1 Reply Last reply Reply Quote 0
                      • S Offline
                        Seeking Sense @zeroepoch
                        last edited by Seeking Sense

                        @zeroepoch Finding bits of time here and there to work on this.

                        I have FreeBSD 15 Current up and running, cloned and built pfSense src & ports.

                        My NOOB question relates to the following:

                        @zeroepoch said in Package realtek-re-kmod198 for pfSense 2.8.0 (amd64):

                        In FreeBSD-src checkout a new local branch using the commit c665fe00146 (for 2.8.0)

                        What does that mean? How? ( Looks away and hides in embarrassment.)

                        What I am asking as a NOOB is how do I get to the correct version so that I can make the correct driver.

                        Running make as is without selecting the correct branch produces:

                        realtek-re-kmod198-198.00.1500046
                        

                        Furthermore when running MAKE in realtek-re-kmod198 I get the following warning:

                        pkg-static: Warning: Major OS version upgrade detected.  Running "pkg bootstrap -f" recommended
                        
                        zeroepochZ 1 Reply Last reply Reply Quote 0
                        • zeroepochZ Offline
                          zeroepoch @Seeking Sense
                          last edited by

                          @Seeking-Sense

                          I meant use a command like git checkout -b tmp c665fe00146 to create a local git branch named tmp for the commit c665fe00146, which I found best represents the 2.8.0 kernel source that I could infer. This was so my local checkout was at the right source. You don't technically need to name the branch but it made it easier for me to compare things with other commits. Sorry for the confusing directions.

                          S 2 Replies Last reply Reply Quote 0
                          • S Offline
                            Seeking Sense @zeroepoch
                            last edited by

                            @zeroepoch said in Package realtek-re-kmod198 for pfSense 2.8.0 (amd64):

                            Sorry for the confusing directions.

                            I'm sure they are not confusing for the non-NOOB. It great that you have provided the information and I am grateful for your effort and time.

                            Please check out my last comment as I made some edits.

                            1 Reply Last reply Reply Quote 0
                            • S Offline
                              Seeking Sense @zeroepoch
                              last edited by

                              @zeroepoch Thanks I think I have it worked out.

                              I have the following in work/pkg:

                              102K Jun 13 11:43 realtek-re-kmod198-198.00.1500029.pkg
                              

                              I had skipped your step 10:

                              "To get the correct __FreeBSD_version I had to temporarily replace /usr/include/sys/param.h with FreeBSD-src/sys/sys/param.h"

                              zeroepochZ 1 Reply Last reply Reply Quote 0
                              • zeroepochZ Offline
                                zeroepoch @Seeking Sense
                                last edited by

                                @Seeking-Sense Awesome! Glad to hear someone was able to reproduce my quickly written steps I did late at night ๐Ÿ˜

                                1 Reply Last reply Reply Quote 0
                                • S Offline
                                  scoobay @zeroepoch
                                  last edited by scoobay

                                  @zeroepoch Thank you. That worked like a charm on a 2.5 GBE Realtek adapter. I had to modify the install command as the affected interface was the WAN-side, so I had no internet connection:

                                  pkg install --no-repo-update ./realtek-re-kmod198-198.00.150029.pkg

                                  Hope that Netgate will include this driver in future releases as it is a pain to get this running on a dedicated server at Hetzner.com when the have a 2.5 GBE as a default LAN adapter.

                                  1 Reply Last reply Reply Quote 0
                                  • zeroepochZ Offline
                                    zeroepoch
                                    last edited by

                                    I just updated to pfSense 2.8.1 and my existing build/package of the Realtek 198.00 kernel module still works fine. I installed pfSense in VirtualBox first and checked that the kernel module loads there before updating my router.

                                    1 Reply Last reply Reply Quote 1
                                    • S Offline
                                      smolka_J @stephenw10
                                      last edited by

                                      @stephenw10 Even better off, could we maybe also have this added in to the new Netgate Installer images as well? I have a Netgate 5100 I currently run into similar issues with because of lacking this driver in base images. I added two 2.5Gb Realtek NICs to my 5100 a while back and had my NDI updated on Netgate's side for that change a couple years ago. I am not able to use the Netgate Installer to install pfSense Plus in one clean install as its intended to as a result, the Netgate Installer does not detect my Realtek NICs and therefor detects my 5100's original NDI which is no longer active on Netgate's authentication servers forcing me to either install CE first and/or utilize an outdated pfSense Plus image I have from past years first to upgrade from when needed or submit a TAC ticket requesting a new Plus image from you guys each round. I'm sure there are/can/would-be more Plus subscribers out there that would also benefit from our NICs being properly detected when using the Netgate Installer so that authentication servers always see the same hardware to what Plus subscribers originally registered before random situations arise that mandate a clean re-install.

                                      zeroepochZ 1 Reply Last reply Reply Quote 0
                                      • zeroepochZ Offline
                                        zeroepoch @smolka_J
                                        last edited by

                                        @smolka_J One issue we'll run into with putting this driver into the base image, as opposed to just adding it to the repo, is realtek-re-kmod198 conflicts with the default realtek-re-kmod package currently in the repo, which also isn't in the base image for CE. Meaning you can only install one or the other. Ideally RealTek would just fix the checksum offloading bug and release a new version. The procedure I had to use was a USB Ethernet adapter for the initial install and setup a single NIC and then after getting the driver loaded do a reset to start the setup again with the 2 NICs now working.

                                        S 1 Reply Last reply Reply Quote 0
                                        • S Offline
                                          smolka_J @zeroepoch
                                          last edited by

                                          @zeroepoch I understand that much for choosing to use one version of a driver vs another, updates do roll on so that much aught to be updated on new versions of the driver upstream from the FreeBSD channels, drivers can be changed after a pfSense install is completed easily enough when needed for different versions for performance related reasons, NICs are detected by pfSense with any version of the Realtek kmod driver installed but each version may perform differently for different Realtek NICs or when IPv6 is chosen to be enabled. I guess I'm more-so referring to adding the realtek-kmod-driver to the Netgate Installer, regardless of what version it is, so that Realtek NICs are at the very least detected at the initial install screens of the Netgate Installer in the first place so that the correct NDI is validated at Netgate's server to proceed to install the correct version of pfSense your NDI is authorized for. That way the Netgate Installer can proceed to detecting such Realtek interfaces to have them available to the installer to assign and configure, IPv6 is easy enough to disable temporarily at the console to mitigate that offloading bug from affecting matters during that point of initial install with the Netgate Installer or during interface setup after an upgrade or a successful install using a Plus or CE image to install from. But, in the Netgate Installer's current stance with it being our new primary installation tool going forward, if I were to have only 2.5Gbe Realtek NICs installed like some boards do, the Netgate Installer will not detect any network interfaces to be able to proceed to install anything from it at all, unless I first add a different NIC that is able to be detected without a version of the realtek-re-kmod driver already installed first, for many first-time or would-be pfSense users that can be a stone wall reason to continue on to other alternatives when it happens on brand new hardware.

                                          zeroepochZ 1 Reply Last reply Reply Quote 0
                                          • zeroepochZ Offline
                                            zeroepoch @smolka_J
                                            last edited by

                                            @smolka_J that plan makes sense. Having some version of the realtek driver is much better than having nothing detected. I would appreciate the buggy driver even for the reason you mentioned. At least I could swap drivers later without needing that extra NIC.

                                            S 1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post
                                            Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.