Updating Realtek Drivers for PFSense on a ZOTAC ZBox
A long while back I built a ZOTAC Zbox (ZBOX-CI323NANO-U) to run PFSense and act as my router. For the most part, it has worked pretty well. The features are great, without any of the gimmicky stuff you’d find on a consumer router. It’s also a lot more upgradable than a consumer router.
One problem though, on occasion I’d have to restart the ZBOX when the internet would stop working. The display I had connected to the PFSense machine said this during a failure:
re1: watchdog timeout
Each time the error occurred, I would hunt around the internet for a few minutes to find a solution, but I was never able to find one. I gave up for a while. But recently I took a deeper dive.
I found some pages blaming the default network adapter drivers and how they don’t work well with realtek adapters. I also found this page announcing new realtek drivers. I’ve dabbled with Linux a bit, but I’d still consider myself pretty novice. It was pretty difficult for me to get the drivers copied over to the machine, and then installed.
Here’s the process I followed to get them installed:
- Download drivers
- Extract ZIP file
- I put mine on my desktop.
- Identify the IP address of your PFSense Router
- Open terminal
- Change directory to the desktop of your local machine
- Command “cd” will change directory
- Opening the terminal on a Mac should put you into your user’s home director. So “cd desktop” should bring you to the desktop as your working directory, and where the file is located
cd desktop
- Copy the file with the SCP command.
- Make sure to use the “root” username, not “admin”, for the target.
- When entering a directory structure “..” will go up, or back, one level.
- Default directory on target is “root” so that has to be changed to the kernel folder.
- My full command was:
scp if_re.ko root@192.168.0.1:../boot/kernel/if_re.ko
- You should get prompted for a password and then a progress indicator will show that the system is copying the file
- Now, SSH into the PFSense machine; enter your password when prompted
ssh admin@192.168.0.1
- Enter “8” to get to the shell
- Change directory to the kernel folder
cd ../boot/kernel
- Modify the file
chown root:wheel if_re.ko chmod 0555 if_re.ko
- Open your PFSense admin page (192.168.0.1) in your browser
- Go to Diagnostics -> Edit File
- Location: /boot/loader.conf.local
- Edit the file to look like this (if copy/pasting, replace smart-quotes with standard quotes):
kern.cam.boot_delay=10000 if_re_load="YES"
- Save
During the process, I ended up replacing my loader.conf file with a blank new one. So if that happens, here is the correct details I got from a fresh install file (if copy/pasting, replace smart-quotes with standard quotes):
kern.cam.boot_delay=10000
autoboot_delay="3"
kern.ipc.nmbclusters="1000000"
kern.ipc.nmbjumbop="524288"
kern.ipc.nmbjumbo9="524288"
hw.usb.no_pf="1"
So far, I’ve had no problems! Wahoo for stable internet!
I think I might be having the same problem. Thanks for the instructions!
I went through them, restarted, but continued having freezing over and over.
I went back into the loader.conf and that’s when I realized: The double quotes were smart-quoted! I fixed them, restarted, and it’s been working fine since.
Sorry about the smart quotes. WordPress.com replaces standard quotes with smart quotes, against my will. The content in the backend does not have smart quotes. They are replaced on the fly apparently. I added added to instructions to watch for that. Thanks!
Fixed the code formatting.
Is there a way of confirming that the drivers were indeed updated?
Check: https://forum.netgate.com/topic/135850/official-realtek-driver-binary-1-95-for-2-4-4-release/20
Someone said: Always use kldstat to verify if the driver if_re.ko is loaded!
Id Refs Address Size Name
1 20 0xffffffff80200000 2d9a7d0 kernel
2 1 0xffffffff82f9c000 381f00 zfs.ko
3 2 0xffffffff8331e000 a3a0 opensolaris.ko
4 1 0xffffffff83329000 7d2c0 if_re.ko
5 1 0xffffffff83911000 10a0 cpuctl.ko
6 1 0xffffffff83913000 2ec0 cryptodev.ko
7 1 0xffffffff83916000 c80 coretemp.ko
This worked for me. thanks so much! i’m running pfsense 2.4.5. Downloaded the package from https://forum.netgate.com/assets/uploads/files/1585583884639-if_re_ko_v195_freebsd-11.3_64bit.zip and followed the steps above. The NIC now works like a charm.
use the command following command to check if the newly added driver can be loaded without a reboot
kldload if_re.ko
Fabulous! Finally a easy to follow solution to this menace. Why don’t PfSense put this info out there for everyone to find easily? I used BitWise SSH client for easy console and file upload.
Better question, why doesn’t PfSense include the better driver?