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

    Realtek 8111G Support

    Scheduled Pinned Locked Moved Hardware
    53 Posts 16 Posters 48.0k Views
    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.
    • NeverSimpleN
      NeverSimple
      last edited by

      Hello Thomas,

      Very interesting!. What exactly are you working with on the DS47's? With FreeBSD or pfSense? Did you make kernel modules or are you using a FreeBSD version with these changes already applied? (10 or maybe even 11).

      If I look through the source code, as far as I can tell, the 8011G is treated exactly like the F, which is already in FreeBSD 8.3. The only thing changed, seems to be that the hardware revision is added to 'if_rlreg.h' and a few lines in 'if_re.c' to get the 'G' treated exactly like the already implemented 'F'.
      I tried that approach some time ago, when these changes started appearing on the internet. I took the the FreeBSD 8.3 source code for the Realtek NIC's and modified those files in exactly the same way as in the source code you mention in your post. Build kernel modules with it and used those.

      That didn't work at all…  :-\ The NIC's were recognized during boot and when doing an 'ifconfig', if the NIC had a network connection, it was marked as 'UP'. After that nothing seem to happen. DHCP did not work and manually assigning an address to the NIC did seem to work, but no traffic would flow in or out of it. No error messages of any sort, it just did nothing.
      I couldn't find out what was wrong with it and eventually gave up. Having a network card (or two) that refuse to move any network traffic seems rather pointless...  :(

      I'm now using the DS47 with some Linux distro... works fine, but who wants to use Linux if FreeBSD/pfSense is a possibility?  ;)

      So I'm glad (and a little confused) that it seems to work fine with you. It wouldn't surprise me if I did something wrong, but applying these changes did not seem too difficult. Who knows?

      I would appreciate it if you could give some details on how your setup works.

      Richard

      pfSense 2.7 home router
      Shutlle DS77U (passively cooled Intel Celeron CPU 3865U)
      8GB RAM, OCZ 60GB SSD
      NIC's: build in Intel i211 & i219LM

      Business: several Netgate devices

      1 Reply Last reply Reply Quote 0
      • C
        compdoc
        last edited by

        I have an ECS KBN-I/2100 motherboard which has an on-board Realtek nic, and I added a SYBA SY-PEX24028 dual-port Realtek gigabit card to have LAN, WAN, and Wi-Fi ports. But pfSense 2.1 would not work with these nics until I found your driver. Thank you very much! Its only been a couple of weeks in use on my own network, but they run smoothly with no issues so I'll be using them in a production machine being sold to a customer.

        Until now I had a heck of a time making the nics work. I even tried installing the latest release of Freebsd to see if I could grab a working driver and install it into pfSense, but the newest Freebsd would not recognize the nics.

        One solution was to install Ubuntu Server and run pfSense in a KVM virtual machine on the box. pfSense has no problems with the virtual nics available in KVM, however there was a performance penalty running on this 1 GHz dual-core processor.

        What I like about these new, (relatively) fast AMD Kabini cpus is that they include AES-256 support, while the current low watt Intel Atoms and Celerons do not. (But there are new Atoms being released that do have AES)

        Anyway, thanks again for the drivers!

        1 Reply Last reply Reply Quote 0
        • ?
          Guest
          last edited by

          That updated driver is unlikely to make 2.1.1 or 2.2.

          Maybe 2.2.1.

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

            Support (at least prelimenary) was added to the re(4) driver in FreeBSD 10.

            http://svnweb.freebsd.org/base/release/10.0.0/sys/dev/re/if_re.c?revision=257615&view=markup

            I assume that will be in 2.2?

            Steve

            1 Reply Last reply Reply Quote 0
            • P
              Panoptic
              last edited by

              I was able to compile a working AMD64 module for the 8111G. I just downloaded the latest source code from realtek and compiled on freebsd 8.3. Tested with great results on the Shuttle DS47 both ports functional.

              Attached is the compiled module. It is a zip file with a .txt extension. Just rename to .zip and extract the module in /boot/modules

              Add the following code to /boot/loader.conf.local (create the file if it does not exist!) I had to use a USB ethernet controller to get past the initial boot process and copy the module.```
              if_re_load="YES"

              
              [if_re.txt](/public/_imported_attachments_/1/if_re.txt)
              1 Reply Last reply Reply Quote 0
              • C
                compdoc
                last edited by

                I started looking at the file sizes of the drivers compiled and shared here in this forum as well as others shared online, and I noticed they kept getting larger and larger. So, i decided to try compiling the driver myself on my KBN-I/2100 board. Its an x86_64 cpu, and I have pfSense 2.1-RELEASE (amd64) installed. It turns out mine is slightly larger than the others here, but it works well and I'll include it in case it helps someone.

                To compile, first I installed freeBSD 8.3 and then fetched and installed all updates, which brought the OS to FreeBSD 8.3-RELEASE-p14. I assume there's a way to limit the release to p11, but a quick search didn't tell me. Doesn't seem to be a problem, and hopefully someone reading this can let me know if it is.

                Following the instructions included with the driver source from Realtek, (version 1.84, dated 2014/3/4) I compiled the driver and copied the file 'if_re.ko' to /boot/kernel/. I also modified /boot/loader.conf.local to contain if_re_load="YES" as mentioned in previous posts. And I made sure that the file was marked executable and matched the permissions of the other drivers in the folder.

                Rename the attached file to if_re.zip to extract the driver.

                Notes: 1) Looks like you should actually place the driver in /boot/modules instead, but this works too.

                1. There's a typo in the Makefile that prevents 'make install' from finishing. You have to change the word  kldx[1~ref  to  kldxref

                2. After compiling and installing if_re.ko on the FreeBSD test machine, DHCP stops working until you change the file /etc/rc.conf. Change the line:  ifconfig_re0="DHCP"  to:  ifconfig_re0="SYNCDHCP". However, this change isn't necessary in pfSense

                if_re.txt

                1 Reply Last reply Reply Quote 0
                • N
                  ndeppe
                  last edited by

                  Thanks, compdoc!  I just put together a machine using an ECS H87H3-M3(1.0) motherboard with a RealTek 8111G onboard NIC.  I was able to get this working using your files.  Well, at least it is recognized now.  I still have to test with a real live connection.

                  1 Reply Last reply Reply Quote 0
                  • C
                    compdoc
                    last edited by

                    I said in a note that SYNCDHCP isn't needed for pfSense, but I might be wrong about that. I use Comcast which uses DHCP for my external address, and sometimes in the wee hours of the morning my connection was going down. My dashboard was showing:

                    Gateway:  WAN_DHCP  Status: Offline

                    Since I had a problem with DHCP when using the compiled driver on freebsd, I decided to make a change in pfSense to the file  /etc/defaults/rc.conf

                    I made the change:  synchronous_dhclient="YES"  and the gateway stopped going down.

                    However, there is another setting for gateways that might solve this problem too:  Probe Interval and Down seconds.

                    1 Reply Last reply Reply Quote 0
                    • S
                      stroths
                      last edited by

                      @compdoc:

                      I started looking at the file sizes of the drivers compiled and shared here in this forum as well as others shared online, and I noticed they kept getting larger and larger. So, i decided to try compiling the driver myself on my KBN-I/2100 board. Its an x86_64 cpu, and I have pfSense 2.1-RELEASE (amd64) installed. It turns out mine is slightly larger than the others here, but it works well and I'll include it in case it helps someone.

                      To compile, first I installed freeBSD 8.3 and then fetched and installed all updates, which brought the OS to FreeBSD 8.3-RELEASE-p14. I assume there's a way to limit the release to p11, but a quick search didn't tell me. Doesn't seem to be a problem, and hopefully someone reading this can let me know if it is.

                      Following the instructions included with the driver source from Realtek, (version 1.84, dated 2014/3/4) I compiled the driver and copied the file 'if_re.ko' to /boot/kernel/. I also modified /boot/loader.conf.local to contain if_re_load="YES" as mentioned in previous posts. And I made sure that the file was marked executable and matched the permissions of the other drivers in the folder.

                      Rename the attached file to if_re.zip to extract the driver.

                      Notes: 1) Looks like you should actually place the driver in /boot/modules instead, but this works too.

                      1. There's a typo in the Makefile that prevents 'make install' from finishing. You have to change the word  kldx[1~ref  to  kldxref

                      2. After compiling and installing if_re.ko on the FreeBSD test machine, DHCP stops working until you change the file /etc/rc.conf. Change the line:  ifconfig_re0="DHCP"  to:  ifconfig_re0="SYNCDHCP". However, this change isn't necessary in pfSense
                        [/quote]

                      Your file and instructions helped fix my issue.  Thank you

                      1 Reply Last reply Reply Quote 0
                      • D
                        darkwood
                        last edited by

                        Hi guys,

                        I followed the instructions in the post, and I have performed the following steps:

                        1. install freebsd 8.3. in my machine and compile the realtek driver.
                        2. install pfsense and load the module created with my freebsd 8.3

                        When load the module my pfsense crash,

                        I installed the alpha version pfsense 2.2 and works properly.

                        Any ideas??

                        Thanks in advanced.

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

                          It just crashes with no error?

                          Steve

                          1 Reply Last reply Reply Quote 0
                          • C
                            compdoc
                            last edited by

                            did you try loading the driver you compiled in FreeBSD 8.3?

                            1 Reply Last reply Reply Quote 0
                            • E
                              elbek
                              last edited by

                              Hi.

                              Thank you so much to NeverSimple for your answer: https://forum.pfsense.org/index.php?topic=65355.msg365028#msg365028

                              I have a Gigabyte C1037UN with 2 onboard ethernet cards that not working properly with pfsense 2.1.4-amd64

                              I followed up instructions exactly as NeverSimple posted and now pfsense is working perfectly.

                              Thanks again!!!

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