Realtek 8111G

Status
Not open for further replies.

ievq

Cadet
Joined
Aug 21, 2013
Messages
4
I can not install the driver on Realtek 8111G..
FreeNAS 9.1
who has module if_re.ko?

install the driver manually:
http://forums.freebsd.org/showthread.php?t=41366

Readme.txt:

1. keep the orginal driver source code:
# cd /usr/src/sys/dev/re
# cp if_re.c if_re.c.org

# cd /usr/src/sys/modules
# cp Makefile Makefile.org

# cd /usr/src/sys/modules/re
# cp Makefile Makefile.org

# cd /usr/src/sys/i386/conf/
# cp GENERIC GENERIC.org

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/9.x)
# cd ../compile/GENERIC
(for FreeBSD 4.x)
# cd ../../compile/GENERIC

# make cleandepend
# 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

6. configurate the static IP address
# ifconfig re0 xxx.xxx.xxx.xxx

7. configurate the IP address by DHCP
# /sbin/dhclient re0

but I did not find directory usr/src/sys

help..
 

ievq

Cadet
Joined
Aug 21, 2013
Messages
4
in the output of ifconfig only lo0
installed on this pc freebsd 9.1 - no results... only lo0

The re(4) driver supports ... and RTL8111 based Fast Ethernet and Gigabit Ethernet adapters including:
8111G is also supported, right?
 
D

dlavigne

Guest
The "G" part is not clear from the Hardware list, but if it is not showing up in ifconfig, it's not finding the driver. Please create a bug report as a feature request later on today, when the Redmine migration is complete. Include a copy/paste of ifconfig, your FreeNAS version and architecture, and the link to that forum post, asking that that driver be included.
 

ievq

Cadet
Joined
Aug 21, 2013
Messages
4
bug report created.
https://bugs.freenas.org/issues/3045
today after a reboot ifconfig:

ipfw0: flags=8801<UP,SIMPLEX,MULTICAST> metric 0 mtu 65536
nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
options=600003<RXCSUM,TXCSUM,RXCSUM_IPV6,TXCSUM_IPV6>
inet6 ::1 prefixlen 128
inet6 fe80::1%lo0 prefixlen 64 scopeid 0x5
inet 127.0.0.1 netmask 0xff000000
nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>

what's this ipfw0 ?
 

ievq

Cadet
Joined
Aug 21, 2013
Messages
4
thank you.
installed the freebsd 9.1 and install the driver from src.
checked for freenas 9.1_x64 - ОК.
module attached

the problem is solved
 

Attachments

  • if_re.zip
    85.8 KB · Views: 844

James Snell

Explorer
Joined
Jul 25, 2013
Messages
50
thank you.
installed the freebsd 9.1 and install the driver from src.
checked for freenas 9.1_x64 - ОК.
module attached

the problem is solved


Yup works for me. Thank you massively! I was quite sad when my new little motherboard's NIC turned out to be unsupported!
 

bitsandbooks

Cadet
Joined
Nov 3, 2013
Messages
2
I'm having a similar problem with the integrated NIC (RealTek 8111GR) in my mobo (Asus Z87-A) and I'm a FreeNAS/FreeBSD newbie. (I'm coming from a Linux background.) How do I install this module in FreeNAS?
 

James Snell

Explorer
Joined
Jul 25, 2013
Messages
50
I'm having a similar problem with the integrated NIC (RealTek 8111GR) in my mobo (Asus Z87-A) and I'm a FreeNAS/FreeBSD newbie. (I'm coming from a Linux background.) How do I install this module in FreeNAS?

I hear ya bits. I'm not far off from you myself. Thankfully, with the kernel module posted by iveq, if you're running the 64bit build of FreeNAS 9.1.1, this should be pretty easy.

However, I should add, I have no idea if your 8111GR will be handled by this module. It sounds like a highly similar device, but it could be significantly different, even if only by device ID or something, this driver may not help you. For my 8111G, this did the trick:


Installing a pre-compiled FreeBSD Kernel Module: if_re on FreeNAS 9.1.1

Step 1: Download the file to a flash drive
http://forums.freenas.org/attachments/if_re-zip.2607/

Step 2: Mount the flash drive on your Freenas box
My flash drive was formatted with FAT32, so the mount command for me is "mount_msdosfs".

For people with FreeNAS running from a hard drive: The command you want to run is probably going to be mount_msdosfs /dev/da1s1 /media

If you run FreeNAS from a USB drive like me, then you'll likely use mount_msdosfs /dev/da2s1 /media

When you attach the USB drive, you should see a dmesg-like comment on the main console that'll tip you off to which /dev/daX device you're after. The "s1" postfix is pointing out what partition/slice on the device to mount.

Step 3: Remount root file system as read-write
You'll next need to re-mount your root file system as read-write so you can make changes.
mount -o rw /

Step 4: Copy the kernel module to the appropriate location
cp /media/if_re.ko /boot/kernel/

Step 5: Edit /boot/loader.conf to auto load the module
I used 'vi' to edit this file. You very likely want to edit it so that the module will automatically load on each boot. I added the following to the end of my loader.conf:

## JTS: For Realtek Nic, not supported by default
## as of FreeNAS 9.1.1
if_re_load="YES"
Step 6: Reboot and verify
Reboot your system to check & confirm that if_re is loading automatically.

Running ifconfig is the acid test, if your nic is now configured, it should appear in the ifconfig output.

If it's not there, check if the kernel module is loaded. Run kldstat and check for if_re, if it's there, the module is loaded.

If it's not loaded, you can try manually loading the module to see if there are any error messages or something to tip you off. kldload is the command to load the module. I think kldload if_re would load it, but, as I said before I'm a Linux-type, I'm not totally sure if this will work on FreeBSD. I read somewhere it will, but I haven't tried since the above steps worked first try for me.


EDIT: In response to follow-up comments:
There was a ticket created for this issue about a year ago.

Indeed upgrades will nuke these changes, which is probably good since, as Cyberjock mentioned, future builds of the FreeBSD kernel used by FreeNAS will likely be different and this module (probably) won't work with those. Hopefully by the next release, the driver will have been added/activated in the FreeBSD build that is included with FreeNAS.

I wrote these instructions out like this in the event that some of us will need to refer to them on a regular basis.


EDIT 2: Maybe this is actually a terrible idea!
I've since noticed that while doing this did WORK at all.. I was having daily network problems. I don't know if it's the realtec hardware, driver or something else, but as soon as I switched NICs, my NAS performance got a lot more stable. So, it's probably worth your time to seriously consider not actually using this NIC. I'm now using an Intel Gigabit CT with vastly better stability.

Thanks to Cyberjock for pointing this out to me so I could test it, as it resolved the problem I was having.
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
Just an FYI.. when you upgrade FreeNAS someday that file will be removed since its not part of FreeNAS. So keep the instructions and the driver file backed up.

Also keep in mind that the driver may not be compatible with future builds.

I'd recommend you put a ticket in at bugs.freenas.org make it permanently part of FreeNAS if a ticket doesn't already exist.
 
Joined
Dec 2, 2013
Messages
2
I was able to successfully use this technique to get my on-board NIC working on my Asus M87-Plus.
The NIC on-board is the RealTek 8111G.
I did my install with FreeNAS 9.1.

Thanks for everyone's help with this.
 
Last edited by a moderator:

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
Unfortunately, more than likely as soon as you upgrade to 9.2 that file may stop working since it'll be a different kernel. :(
 
Joined
Dec 2, 2013
Messages
2
I'm aware of that and told the owner I was helping with the setup as much. The good news is he won't likely need the latest greatest. He needs reliable storage for his backups.

Maybe there will be an updated driver released for 9.2 eventually, if there is we'll consider it.
 

James Snell

Explorer
Joined
Jul 25, 2013
Messages
50
One would think this driver would get merged in to the main branch for 9.2? I wonder if there's a good place for us to express our desire for this? (aside from this thread, of course)
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
One would think this driver would get merged in to the main branch for 9.2? I wonder if there's a good place for us to express our desire for this? (aside from this thread, of course)

Yeah, I wouldn't necessarily bet on that.

Realtek is pretty much crap hardware. Most FreeBSD developers are more interested in supporting hardware that is actually good quality stuff. Last thing an OS needs is a bunch of crap drivers supporting crap hardware. If you want that, Windows is available. :P

But seriously, why go with Realtek when a $20 Intel NIC is VERY well supported by Intel(Realtek doesn't support their hardware on FreeBSD at all) and Intel NICs far outperform Realtek despite both being "1Gb".
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
Thanks for adding that Dusan. Somehow I deleted 1/2 my post. I had mentioned bugs.freenas.org but apparently I deleted it. Probably did a palm-delete thanks to my laptop trackpad.
 

James Snell

Explorer
Joined
Jul 25, 2013
Messages
50
Yeah, I wouldn't necessarily bet on that.

Realtek is pretty much crap hardware. Most FreeBSD developers are more interested in supporting hardware that is actually good quality stuff. Last thing an OS needs is a bunch of crap drivers supporting crap hardware. If you want that, Windows is available. :p

But seriously, why go with Realtek when a $20 Intel NIC is VERY well supported by Intel(Realtek doesn't support their hardware on FreeBSD at all) and Intel NICs far outperform Realtek despite both being "1Gb".


I generally find Cyberjock's comments condescending and obnoxious, but the thing is, he's totally right about this... Sigh, hats off to Cyberjock.

All NICs are not equal
I've been having serious issues with VMs (ESXi) over NFS (on ZFS) on my FreeNAS box would die. Since I added an Intel Gigabit CT card to use instead of my Realtec, I haven't had a failure. It's only been a day and a half, but so far it's a win, as things would have imploded by now, with the Realtec in play. So, turns out this was a really solid piece of advice, thanks Cyberjock. What I'd like to know is where I really could have seen a log (I've looked) that'd really indicate what my problem was. On my ESX side, all I'd get is event messages that the NFS share disconnected (it'd reconnect in quick order, but, you know, that's no good for a VM).

Switches may be worth a look too
Another factor that I'd discovered was (probably) hurting my setup was one of my VM Host machines was connected through a D-Link "Green Ethernet" switch (DGS-100SD). I noticed in a review for a much newer "green" switch, a comment that the green devices often throttle connections down to save power, but to the point that the connections have problems, some times throughput, sometimes total loss of connections. Assuming that comment was correct, I swapped in a trusty expensive Netgear Prosafe Gigabit switch. The other network problem I was having is now resolved. So, this would have been a major problem for my VMs over NFS too.
 
Status
Not open for further replies.
Top