Realtek RTL8111C on FreeNAS 0.69

I’ve been using FreeNAS, a terrific open-source NAS based on my favorite server OS, FreeBSD. I’m running it on an MSI Wind PC, a tiny silent desktop based on an Atom processor. It’s hosting a couple terabytes on my home network at very fast gigabit speeds, and also serves my iTunes library to the household.

Unfortunately FreeBSD support for the embedded Realtek RTL8111C gigabit NIC that this machine has is still new, and FreeNAS (which, as of 0.69, uses a FreeBSD 6.4 kernel) doesn’t yet support it. I downloaded the OEM Realtek driver (v1.7.7 at the time of writing) and compiled it on another FreeBSD 6.4 machine (32bit x86). Attached is the compiled kernel module. To use it on an embedded FreeNAS install, re-mount your /cf partition read-write, drop this file in /cf/boot/kernel/, and add if_rl_load=”YES” to /cf/boot/loader.conf. Reboot and you should be able to configure your network.

Attachment: if_rl.ko

I love your comments. Don't be shy, reply!

There are 21 replies to “Realtek RTL8111C on FreeNAS 0.69

  1. Rutger Kirkels

    Hi,

    This page was a great help to me! I’m using FreeNAS with an Intel D945GCLF2 board which has the RTL8111C chip on it.

    Thank to this page i’m now able to use the only PCI slot for something more interesting than a NIC, like a SATA controller that enables me to add more disks… ;-)

    I’m maintaining a project blog (in dutch) and i’ll place a link to your website.

    Reply
  2. bmcclure937

    I really liked reading your blog post on this, which I found the link you posted in the FreeNAS forums.

    I was wondering if this would be possible for an AMD motherboard. I am unsure which Realtek onboard gigabit NIC it is using… so I still need to find that out.

    I am currently using this motherboard, EVGA 113-M2-E113

    Is there any way you could compile the driver I would need? I would really appreciate it.

    Thanks a ton,

    BMC

    Reply
  3. PC

    YOU ARE AWESOME!!!! This worked Perfectly!! Like Rutger, I too am using FreeNAS on a Intel D945GCLF2 board which has the RTL8111C chip on it.

    Now, If I could just get this HPT 1740 RAID controller working!!!

    Thank you again.

    Need a donation?

    Reply
  4. Ales Omahen

    Sebastian: I was just about to install FreeBSD and compile the module myself. But this really saved me some time. The latest version is 1.7.7 and it seems just an extension of sorts to the 1.7.6 driver.

    PC: BTW, I have the D945GCLF2 board and also use HPT 1740 RAID controller. It wasn’t that difficult to configure so I can give you a few tips. But I guess you figured it out by now. :) Let me know. I am also trying to find some free time to add some HPT 1740 RAID controller info and a S.M.A.R.T. info viewer to the FreeNAS admin pages.

    Reply
  5. Ben

    Hey Sebastian,

    I have the same setup you do, msi wind nettop 100, rtl 8111c nic.

    Got this up and running on 0.69.2 but my gigeth performance is horrible. I was wondering what sort of speeds do you see, and what tuning you would recommend?

    -Ben

    Reply
  6. sebastian Post author

    Check out this article for some good starting points.

    Here are the sysctl settings I’m currently using under FreeNAS:

    kern.ipc.maxsockbuf 2097152
    kern.ipc.nmbclusters 32768
    kern.ipc.somaxconn 8192
    net.inet.tcp.delayed_ack 0
    net.inet.tcp.inflight.enable 0
    net.inet.tcp.path_mtu_discovery 0
    net.inet.tcp.recvspace 65536
    net.inet.tcp.sendspace 65536
    net.inet.udp.maxdgram 57344
    net.inet.udp.recvspace 65536
    net.local.stream.recvspace 65536
    net.local.stream.sendspace 65536

    Reply
  7. Chris

    Hi,
    If I dont have a network connection (because the NIC is inactive) how do I make those changes? This is probably very basic, but ive only ever done things like that from the WEB GUI. Any assistance would be greatly appreciated.

    Cheers!

    Reply
  8. sebastian Post author

    Hi Chris,
    I used a USB drive the first time to get the drivers onto the machine. Since then I’ve kept the files on a volume that the machine itself serves up, so it’s pretty easy to update the driver if I re-flash the boot system.

    Reply
  9. patrick0525

    Sorry for the newbie question.

    Cannot copy my updated loader.config into /cf/boot/defaults directory. Message says its a “read only file system”

    I used command df- h and identified the compact flash (/dev/adoa).
    I tried mount -o rw /dev/ad0a/ And now I get “mount /dev/adoa : operation not permitted”.

    What I am doing wrong?

    Thanks!

    Reply
  10. sebastian Post author

    Hi Patrick,

    You should be able to unmount /cf first, and then mount it using ‘mount -o rw’

    Hope this helps!

    Reply
  11. megagolgoth

    Great post! i’ve got an intel D410pt with a realtek rtl8103, but the chip was not supported by freenas 0.7. i’ve build successfully a kernel module on freebsd 7.2, and insert it on freenas, reboot, and -oh yeah- the network run. Unfortunatly, there is a 100mbit chip :/

    I want to write a article (in french) on how to i solve my problem, can i use your post as source?

    Reply
  12. Mahdi Hedhli

    Does this include Jumbo Frame support? I have an MSI-945GC running FreeNAS 0.71 and it has dual RTL8111C. FreeNAS detected it but when I can’t enable Jumbo Frames. If this works, you are a lifesaver. Anyone have any commentary on this before I break my FreeNAS?

    Reply
  13. sebastian Post author

    Yes, jumbo frames were working for me (but I never actually sniffed the network). Try it, but if you can compile it yourself. I’m a bit out of the loop these days, but I don’t think the binary I provide above will work on your newer kernel.

    As long as your NAS has local access to the working driver and you have a physcial console on your NAS box, it’s pretty easy to try out a different driver.

    Reply
  14. Mahdi Hedhli

    just installed freebsd 7 on in vmware in hopes of compiling this but the instructions are leading me to belief I don’t have to follow each step. What did you do to compile?

    Did you do this step or just skip to step 3?

    2. recompile your kernel (you must install your FreeBSD source code first !!)
    # vim /usr/src/sys/i386/conf/GENERIC and delete re
    # vim /usr/src/sys/modules/Makefile and delete re
    # cd /usr/src/sys/i386/conf
    # /usr/sbin/config GENERIC

    (for FreeBSD 5.x/6.x/7.x/8.x)
    # cd ../compile/GENERIC
    (for FreeBSD 4.x)
    # cd ../../compile/GENERIC

    # make depend
    # make
    # make install
    # reboot

    3. update the driver source code:
    Copy the dirver source code( if_re.c and if_rereg.h) into /usr/src/sys/dev/re
    Copy the Makefile into /usr/src/sys/modules/re

    4. build the driver:
    # cd /usr/src/sys/modules/re
    # make clean
    # make

    5. install the driver
    # cd /usr/src/sys/modules/re
    # kldload ./if_re.ko
    Thanks

    Reply
  15. Gregg Casey

    Hello,
    I keep getting this error:
    link_elf: symbol bpf_mtap_new undefined
    kldload: can’t load ./if_rl.ko: No such file or directory

    It comes in the log file with your instructions but I can do the same thing by executing:
    cd /cf/boot/kernel
    kldload ./if_rl.ko

    See link: http://blog.bagnile.it/articolo.aspx?id=158&censured=comment#commenti-inserisci
    (I tried that if_rl.ko too. But it had the same problem.)

    Hardware/Software:
    mobo: ASUS M4A87TD EVO
    Graphics: GeForce 8400 GS (NVIDIA)
    FreeNAS iso: FreeNAS-i386-LiveCD-0.7.2.5266.iso
    (FreeBSD version Version 0.7.2 (rev 5266) under the covers)

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *

The "are you a human" quiz *