It is no secret that FreeNAS is a popular NAS solution used by many. The latest FreeNAS-11.2-U2.1 (Build Date: Feb 27, 2019) showed up with several improvements and fixes. Eager to, once again, deploy a FreeNAS solution in my lab, I decided to ditch RockStor and go to FreeNAS even though the hardware at hand wasn’t really ideal for a FreeNAS deployment.
Unfortunately, I did not have an Intel NIC handy at the time of my adventure and I soon ran into the “re0: Watchdog Timeout Error” which seems to be quite common in FreeNAS forums when using Realtek NIC(s). The default Realtek driver included in FreeBSD 11.2 does not seem to be very stable and transferring 20-30GB worth of data while multiple users are connected to the FreeNAS box will lockup the network adapter entirely, leaving you with only one option, to reboot the box to bring the interface back to usable state.
Basically, as soon as there is a user pushing or pulling big files from the FreeNAS box with Realtek 8168/8111 B/C/CP/D/DP/E/F/G NICs, the network controller freaks out and goes into a limbo… fortunately, there is a quick fix for it and I hope this post helps overcome the issue to few of you out there.
The problem is simple: the Realtek network driver or Realtek NIC in general, when it comes to FreeNAS or any other FreeBSD flavor for that matter, suck!
The solution is also simple: to use a NIC driver that works or simply use an Intel NIC which is the recommended solution if that’s within your possibilities.
So, let’s dive into it:
First and foremost; making things clear – I have only tested this driver in FreeNAS-11.2-U2.1 & FreeNAS-11.2-U3 with Realtek 8168/8111 B/C/CP/D/DP/E/F/G NIC. I used FreeBSD 11.2-RELEASE to compile it and it has worked for me. I’m sharing the driver with the hope that it will be useful to you but without any guarantees!
The latest Realtek driver on their website as of this writing is version 1.95,
and despite the specific ancient FreeBSD versions listed there, it actually contains sections separated off by #if OS_VER < VERSION(11,0), so the code is fully-aware of the latest kernel versions – wrote “logic”, a member in the FreeBSD forum.
His post was really of great help to me. With that said, follow the steps below to easily load the driver in your FreeNAS 11.2x:
From FreeNAS Terminal
# ssh into freenas using its hostname or IP address ~$ ssh root@freenas or ~$ ssh firstname.lastname@example.org (where 192.168.0.10 is freenas' box IP address) # download the compiled driver ~$ fetch --no-verify-peer -o /tmp https://unlockforus.com/freenas/if_re.ko.zip # browse to tmp directory ~$ cd /tmp # unzip download ~$ unzip if_re.ko.zip # move extracted file to /boot/kernel/ directory ~$ mv if_re.ko /boot/kernel/ # set permissions ~$ chmod 555 /boot/kernel/if_re.ko
From a network/client PC
1- Download the Realtek 1.95 compiled driver (FreeBSD-11.2-RELEASE)
2- Extract the downloaded if_re.ko driver, ssh or sftp into your FreeNAS box and upload the driver into /boot/kernel/ e.g.:
~$ scp if_re.ko root@freenas:/boot/kernel/
… or use your favorite client application to upload the file to your FreeNAS box /boot/kernel/ directory.
Next, ssh into your FreeNAS box and change if_re.ko file permissions:
~$ ssh root@freenas ~$ chmod 555 /boot/kernel/if_re.ko
… or use your favorite client application to set /boot/kernel/if_re.ko file permissions.
Add System Tunable to load new driver
3- Login to FreeNAS Web UI, add and save the following tunable under System > Tunables as shown below to load the new driver during next boot
variable = if_re_load
value = YES
Type = loader
Comment = Load Realtek 195 NIC driver
Enabled = “checked”
4 – Finally, reboot your system and enjoy!
I have used this driver version for just a week but without lockups or watchdog timeout errors I must add… multiple users can now connect and push and/or pull big chunks of data simultaneously without incidents and that has quiet down my wife a notch – which is not an easy accomplishment 😛 !