RTL8126 - Cheap 5gbps (M.2) for H4+/H4 Ultra?

Post Reply
Xebec
Posts: 31
Joined: Sun Oct 20, 2013 9:22 am
languages_spoken: english
ODROIDs: ODROID-X
Has thanked: 1 time
Been thanked: 6 times
Contact:

RTL8126 - Cheap 5gbps (M.2) for H4+/H4 Ultra?

Post by Xebec »

Hey I was wondering if anyone has looked at the latest Realtek 5 Gigabit Ethernet chip such as this: https://www.aliexpress.us/item/32568067 ... pt=glo2usa

You can get this M.2 to 5 GBe adapter for $19 USD shipped on Aliexpress, it's based on the latest Realtek 8126 chip. I had read that the chip initially was intended to launch last August, but was delayed due to stability issues, though it looks like Realtek is starting to ramp this up as a Minisforum system recently released with dual x 5 Gbps Ethernet.

I'm thinking this 5 gbps M.2 would be an easy add to an ODROID-H4+ or H4 Ultra using the M.2 slot.

User avatar
odroid
Site Admin
Posts: 42535
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean
ODROIDs: ODROID
Has thanked: 3733 times
Been thanked: 2102 times
Contact:

Re: RTL8126 - Cheap 5gbps (M.2) for H4+/H4 Ultra?

Post by odroid »

Interesting item.
I've just ordered two since we don't have a 5GbE network switch.
We will install it on two H4 boards and run some iperf tests with 1:1 direct connection once we receive it.
BTW, do you know the status of the Linux driver of RTL8126?

User avatar
domih
Posts: 809
Joined: Mon Feb 11, 2019 4:48 pm
languages_spoken: English, French
ODROIDs: UX4, HC2, N2, N2+, H2, H2+, C4, HC4, M1, M1S (with UPS, 4 x Relay) H3, H3+, H4+, H4 Ultra - 1GbE, 2.5GbE, 10GbE, 45+ GbE
Location: San Francisco Bay Area
Has thanked: 337 times
Been thanked: 245 times
Contact:

Re: RTL8126 - Cheap 5gbps (M.2) for H4+/H4 Ultra?

Post by domih »

IOCrest also has the 10GbE version: https://www.aliexpress.us/item/3256805821883375.html

Pricing is bad, 5 times the price of the 5G *&^%$#@!

The chipset is the AQC107 from Marvell/Aquantia. The AQC107 driver has been included in the Linux Kernel for quite some time, see: https://www.kernel.org/doc/html/latest/ ... antic.html.

User avatar
domih
Posts: 809
Joined: Mon Feb 11, 2019 4:48 pm
languages_spoken: English, French
ODROIDs: UX4, HC2, N2, N2+, H2, H2+, C4, HC4, M1, M1S (with UPS, 4 x Relay) H3, H3+, H4+, H4 Ultra - 1GbE, 2.5GbE, 10GbE, 45+ GbE
Location: San Francisco Bay Area
Has thanked: 337 times
Been thanked: 245 times
Contact:

Re: RTL8126 - Cheap 5gbps (M.2) for H4+/H4 Ultra?

Post by domih »

odroid wrote:
Sat May 25, 2024 8:15 pm
Interesting item.
I've just ordered two since we don't have a 5GbE network switch.
We will install it on two H4 boards and run some iperf tests with 1:1 direct connection once we receive it.
BTW, do you know the status of the Linux driver of RTL8126?
The 5G Ethernet LINUX driver r8126 for kernel up to 6.4 most recent version is 10.013.00 released on 2024/02/27.

Ref: https://www.realtek.com/Download/List?cate_id=584

Good luck!
These users thanked the author domih for the post:
odroid (Mon May 27, 2024 9:12 am)

Xebec
Posts: 31
Joined: Sun Oct 20, 2013 9:22 am
languages_spoken: english
ODROIDs: ODROID-X
Has thanked: 1 time
Been thanked: 6 times
Contact:

Re: RTL8126 - Cheap 5gbps (M.2) for H4+/H4 Ultra?

Post by Xebec »

odroid wrote:
Sat May 25, 2024 8:15 pm
Interesting item.
I've just ordered two since we don't have a 5GbE network switch.
We will install it on two H4 boards and run some iperf tests with 1:1 direct connection once we receive it.
BTW, do you know the status of the Linux driver of RTL8126?
Awesome!

I just ordered an H4 ultra and a couple of RTL8126 NICs as well. Will report here when I've done some testing. (Have a windows PC and a 10G multigig switch I'd like to connect to the H4 at 5 gbps).

Realteks site has drivers so we will see how it works ;)

gokuz
Posts: 50
Joined: Thu Nov 22, 2018 1:55 am
languages_spoken: english
Has thanked: 4 times
Been thanked: 1 time
Contact:

Re: RTL8126 - Cheap 5gbps (M.2) for H4+/H4 Ultra?

Post by gokuz »

domih wrote:
Mon May 27, 2024 3:54 am


Pricing is bad, 5 times the price of the 5G *&^%$#@!
Funny enough 5gbps will be wasted on Pcie gen 3x4 slot. Means its only using 1/8 power of that slot.
Too bad there's no bifurcation on n100.
But some chinese N100 boards are using some clock magic to expand their slot: https://www.aliexpress.us/item/3256805972950232.html

They are using this on their N100 boards, do you think you can implement this on H4 Plus's bios?

User avatar
domih
Posts: 809
Joined: Mon Feb 11, 2019 4:48 pm
languages_spoken: English, French
ODROIDs: UX4, HC2, N2, N2+, H2, H2+, C4, HC4, M1, M1S (with UPS, 4 x Relay) H3, H3+, H4+, H4 Ultra - 1GbE, 2.5GbE, 10GbE, 45+ GbE
Location: San Francisco Bay Area
Has thanked: 337 times
Been thanked: 245 times
Contact:

Re: RTL8126 - Cheap 5gbps (M.2) for H4+/H4 Ultra?

Post by domih »

gokuz wrote:
Tue May 28, 2024 10:26 pm
domih wrote:
Mon May 27, 2024 3:54 am


Pricing is bad, 5 times the price of the 5G *&^%$#@!
Funny enough 5gbps will be wasted on Pcie gen 3x4 slot. Means its only using 1/8 power of that slot.
Too bad there's no bifurcation on n100.
But some chinese N100 boards are using some clock magic to expand their slot: https://www.aliexpress.us/item/3256805972950232.html

They are using this on their N100 boards, do you think you can implement this on H4 Plus's bios?
The board on AliExpress you referred to looks "weird" to me. What the hell <<...Dedicated to special aircraft, only supports CWWK 4 n...>> means? Then there is the <<...Sorry, this item is no longer available!...>> Last but not least, given what the price was ($28) I doubt very much that this board was actively multiplexing the 1 x 4 lanes into 4 x 1 lane.

Note that the H4[+][Ultra] BIOS allows you use the 1 x 4 lanes or 4 x 1 lane PCIe bifurcation. You have to reflash the BIOS for one or the other. If for example you want to use the Netcard 2 that provides 4 x 2.5 GbE ports, you have to flash to the 4 x 1 lane BIOS.

Using the 4 x 1 lane BIOS you could theoretically use a passive 4 x 1 lane board. No 100% guaranty that it will work. This is edge case usage. You're on you own.

I looked into it a few years ago to have the NetCard mounted elsewhere rather than directly to the board. I gave up because I could not find a male-female M.2 extender cable. Maybe such extender cables are available now.

gokuz
Posts: 50
Joined: Thu Nov 22, 2018 1:55 am
languages_spoken: english
Has thanked: 4 times
Been thanked: 1 time
Contact:

Re: RTL8126 - Cheap 5gbps (M.2) for H4+/H4 Ultra?

Post by gokuz »

domih wrote:
Wed May 29, 2024 5:14 am

Using the 4 x 1 lane BIOS you could theoretically use a passive 4 x 1 lane board. No 100% guaranty that it will work. This is edge case usage. You're on you own.
That's not a legit reason on odroid forum tbh, there's other boards you could buy retail, you bought odroid because your usage is edge case in of itself lol. You're one of us.
https://youtu.be/A0tG91NVX-M?t=516

Seems like it works well, hope odroid could implement this in bios.

Xebec
Posts: 31
Joined: Sun Oct 20, 2013 9:22 am
languages_spoken: english
ODROIDs: ODROID-X
Has thanked: 1 time
Been thanked: 6 times
Contact:

Re: RTL8126 - Cheap 5gbps (M.2) for H4+/H4 Ultra?

Post by Xebec »

gokuz wrote:
Tue May 28, 2024 10:26 pm
domih wrote:
Mon May 27, 2024 3:54 am


Pricing is bad, 5 times the price of the 5G *&^%$#@!
Funny enough 5gbps will be wasted on Pcie gen 3x4 slot. Means its only using 1/8 power of that slot.
Too bad there's no bifurcation on n100.
But some chinese N100 boards are using some clock magic to expand their slot: https://www.aliexpress.us/item/3256805972950232.html

They are using this on their N100 boards, do you think you can implement this on H4 Plus's bios?
For my own use case, it'll work perfectly because i'll be able to screw the RJ45 slot + bracket (cut down to size) into the ODROID H4 "Type 3" case. Yes I lose the other lanes, but 4 SATA ports is still pretty good for storage, and you can always throw on a USB drive for backups, etc.

You also technically need PCIe 3 x1 rather than PCIe 2 x1 for a 5 gbps ethernet port because there's a little bit of overhead that reduces 5 gbps to 4 gbps on PCIe gen 2. (500 MB /sec vs 625 MB/sec for 5 gbps Ethernet). PCIe 4 is a little special because it's finally enough to fully support 10 gbps ethernet on one lane.

User avatar
domih
Posts: 809
Joined: Mon Feb 11, 2019 4:48 pm
languages_spoken: English, French
ODROIDs: UX4, HC2, N2, N2+, H2, H2+, C4, HC4, M1, M1S (with UPS, 4 x Relay) H3, H3+, H4+, H4 Ultra - 1GbE, 2.5GbE, 10GbE, 45+ GbE
Location: San Francisco Bay Area
Has thanked: 337 times
Been thanked: 245 times
Contact:

Re: RTL8126 - Cheap 5gbps (M.2) for H4+/H4 Ultra?

Post by domih »

gokuz wrote:
Wed May 29, 2024 12:38 pm
domih wrote:
Wed May 29, 2024 5:14 am

Using the 4 x 1 lane BIOS you could theoretically use a passive 4 x 1 lane board. No 100% guaranty that it will work. This is edge case usage. You're on you own.
That's not a legit reason on odroid forum tbh, there's other boards you could buy retail, you bought odroid because your usage is edge case in of itself lol. You're one of us.
https://youtu.be/A0tG91NVX-M?t=516

Seems like it works well, hope odroid could implement this in bios.
I don't understand the meaning of this post. Please rephrase? TIA!

Xebec
Posts: 31
Joined: Sun Oct 20, 2013 9:22 am
languages_spoken: english
ODROIDs: ODROID-X
Has thanked: 1 time
Been thanked: 6 times
Contact:

Re: RTL8126 - Cheap 5gbps (M.2) for H4+/H4 Ultra?

Post by Xebec »

I received my 5 gbps NICs.

One of them (PCI-E x1) working on a Windows PC.

The other is the M.2 to NIC - which I have physically installed on my ODROID-H4 running PROXMOX. The NIC immediately lit up but wasn't working automatically.

After installing gcc, pve-headers, and downloading drivers from IOCrest I was able to "make" the new RTL8126 driver (as the NIC was not detected by proxmox, though it was showing under command lspci ). "./autorun.sh"

The NIC was seen successfully as enp4s0 - and ethtool enp4s0 shows proper options for speed including 5000baseT/full. (though only 'advertised' 5 gbps). The NIC now shows in "ip a"

Unfortunately my Linux skills otherwise are terrible so I can't verify speed yet on this NIC.. will report back later.

Xebec
Posts: 31
Joined: Sun Oct 20, 2013 9:22 am
languages_spoken: english
ODROIDs: ODROID-X
Has thanked: 1 time
Been thanked: 6 times
Contact:

Re: RTL8126 - Cheap 5gbps (M.2) for H4+/H4 Ultra?

Post by Xebec »

Update - got it working within a VM, and getting 5 gbps speeds. iPerf3 getting 4.75 Gbits/sec, which I think is about the theoretical max for 5 gbps Ethernet. (In the reverse direction I'm getting 4.67-4.70 Gbits/sec - fast enough).

Hope this helps some folks - You can add a 5 gbps NIC for under $20 USD (Aliexpress) to ODROID-H4 (and probably H3) with the chipset RTL8126 and it'll work fine :).
These users thanked the author Xebec for the post (total 3):
odroid (Sat Jun 08, 2024 12:02 pm) • domih (Sun Jun 09, 2024 12:44 am) • neal (Mon Jun 10, 2024 12:12 pm)

User avatar
rooted
Posts: 10633
Joined: Fri Dec 19, 2014 9:12 am
languages_spoken: english
Location: Gulf of Mexico, US
Has thanked: 822 times
Been thanked: 737 times
Contact:

Re: RTL8126 - Cheap 5gbps (M.2) for H4+/H4 Ultra?

Post by rooted »

Thank you for sharing your results, not bad for $20
These users thanked the author rooted for the post:
domih (Sun Jun 09, 2024 8:57 am)

User avatar
domih
Posts: 809
Joined: Mon Feb 11, 2019 4:48 pm
languages_spoken: English, French
ODROIDs: UX4, HC2, N2, N2+, H2, H2+, C4, HC4, M1, M1S (with UPS, 4 x Relay) H3, H3+, H4+, H4 Ultra - 1GbE, 2.5GbE, 10GbE, 45+ GbE
Location: San Francisco Bay Area
Has thanked: 337 times
Been thanked: 245 times
Contact:

Re: RTL8126 - Cheap 5gbps (M.2) for H4+/H4 Ultra?

Post by domih »

The next unicorn is now to find a USB 3.1 Gen 2 (10 Gbps) adapter for 5 GbE RJ-45. I don't even know if the usual chip makers made such a chip.

Xebec
Posts: 31
Joined: Sun Oct 20, 2013 9:22 am
languages_spoken: english
ODROIDs: ODROID-X
Has thanked: 1 time
Been thanked: 6 times
Contact:

Re: RTL8126 - Cheap 5gbps (M.2) for H4+/H4 Ultra?

Post by Xebec »

Not "pretty" but here's how I added the 5 gbps NIC to the Type 3 case. I did have to trim a section of the internal middle layer part of the case that separates the PCB and the drives.

(I did fix the case alignment at the top left after taking this pic)
Attachments
5gbps.jpg
5gbps.jpg (165.49 KiB) Viewed 213 times
These users thanked the author Xebec for the post (total 2):
domih (Mon Jun 10, 2024 2:53 am) • odroid (Mon Jun 10, 2024 2:30 pm)

User avatar
neal
Posts: 397
Joined: Fri Apr 14, 2017 10:02 am
languages_spoken: Korean, English
Has thanked: 35 times
Been thanked: 63 times
Contact:

Re: RTL8126 - Cheap 5gbps (M.2) for H4+/H4 Ultra?

Post by neal »

Xebec wrote:
Sat Jun 08, 2024 10:03 am
I received my 5 gbps NICs.

One of them (PCI-E x1) working on a Windows PC.

The other is the M.2 to NIC - which I have physically installed on my ODROID-H4 running PROXMOX. The NIC immediately lit up but wasn't working automatically.

After installing gcc, pve-headers, and downloading drivers from IOCrest I was able to "make" the new RTL8126 driver (as the NIC was not detected by proxmox, though it was showing under command lspci ). "./autorun.sh"

The NIC was seen successfully as enp4s0 - and ethtool enp4s0 shows proper options for speed including 5000baseT/full. (though only 'advertised' 5 gbps). The NIC now shows in "ip a"

Unfortunately my Linux skills otherwise are terrible so I can't verify speed yet on this NIC.. will report back later.
I confirmed that this r8126 5 Gbps NIC works well even via 1 lane pci interface. I was using NetCard BIOS ( bifurcated x1 lane ) at that time.
The same thing what I have done to make working the NIC was like @Xebec did. Thank you. ;)
But In my case, I added kernel parameter at "/etc/default/grub" like this to work properly.

Code: Select all

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash r8126.aspm=0 r8126.eee_enable=0 pcie_aspm=off loglevel=3"
and run "# sudo update-grub".
If I didn't do the above thing, the kernel logs keep being stacked like this.

Code: Select all

.
.
 2008 2024-06-05T14:53:08.754678+09:00 odroid-ODROID-H4 kernel: enp4s0: pci link is down
 2009 2024-06-05T14:53:08.754712+09:00 odroid-ODROID-H4 kernel: .
 2010 2024-06-05T14:53:08.754714+09:00 odroid-ODROID-H4 kernel: enp4s0: cmd = 0xff, should be 0x07
 2011 2024-06-05T14:53:08.754716+09:00 odroid-ODROID-H4 kernel: .
 2012 2024-06-05T14:53:10.802681+09:00 odroid-ODROID-H4 kernel: enp4s0: pci link is down
 2013 2024-06-05T14:53:10.802716+09:00 odroid-ODROID-H4 kernel: .
 2014 2024-06-05T14:53:10.802720+09:00 odroid-ODROID-H4 kernel: enp4s0: cmd = 0xff, should be 0x07
 2015 2024-06-05T14:53:10.802722+09:00 odroid-ODROID-H4 kernel: .
 2016 2024-06-05T14:53:12.850758+09:00 odroid-ODROID-H4 kernel: enp4s0: pci link is down
 2017 2024-06-05T14:53:12.850804+09:00 odroid-ODROID-H4 kernel: .
 2018 2024-06-05T14:53:12.850809+09:00 odroid-ODROID-H4 kernel: enp4s0: cmd = 0xff, should be 0x07
 2019 2024-06-05T14:53:12.850811+09:00 odroid-ODROID-H4 kernel
 .
 .
Two NICs (RTL8126) connected directly and I have made internal IP addresses (192.168.0.100 / 192.168.0.101 ).
Here is the iperf test and ethtool output.

Code: Select all

root@odroid-ODROID-H4:~# iperf3 -c 192.168.0.101 -t 600 -R
Connecting to host 192.168.0.101, port 5201
Reverse mode, remote host 192.168.0.101 is sending
[  5] local 192.168.0.100 port 42450 connected to 192.168.0.101 port 5201
[ ID] Interval           Transfer     Bitrate
[  5]   0.00-1.00   sec   560 MBytes  4.70 Gbits/sec
[  5]   1.00-2.00   sec   561 MBytes  4.71 Gbits/sec
.
.
[  5] 599.00-600.00 sec   561 MBytes  4.71 Gbits/sec
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate         Retr
[  5]   0.00-600.00 sec   329 GBytes  4.71 Gbits/sec    0             sender
[  5]   0.00-600.00 sec   329 GBytes  4.71 Gbits/sec                  receiver

iperf Done.

Code: Select all

root@odroid-ODROID-H4:~# iperf3 -c 192.168.0.101 -t 600
Connecting to host 192.168.0.101, port 5201
[  5] local 192.168.0.100 port 42430 connected to 192.168.0.101 port 5201
[ ID] Interval           Transfer     Bitrate         Retr  Cwnd
[  5]   0.00-1.00   sec   564 MBytes  4.73 Gbits/sec    0   1.36 MBytes
[  5]   1.00-2.00   sec   561 MBytes  4.70 Gbits/sec    0   1.43 MBytes
.
.
[  5] 599.00-600.00 sec   562 MBytes  4.71 Gbits/sec    0   3.80 MBytes
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate         Retr
[  5]   0.00-600.00 sec   329 GBytes  4.71 Gbits/sec    0             sender
[  5]   0.00-600.01 sec   329 GBytes  4.71 Gbits/sec                  receiver

iperf Done.

Code: Select all

root@odroid-ODROID-H4:~# ethtool enp4s0
Settings for enp4s0:
        Supported ports: [ TP ]
        Supported link modes:   10baseT/Half 10baseT/Full
                                100baseT/Half 100baseT/Full
                                1000baseT/Full
                                2500baseT/Full
                                5000baseT/Full
        Supported pause frame use: Symmetric Receive-only
        Supports auto-negotiation: Yes
        Supported FEC modes: Not reported
        Advertised link modes:  10baseT/Half 10baseT/Full
                                100baseT/Half 100baseT/Full
                                1000baseT/Full
                                2500baseT/Full
                                5000baseT/Full
        Advertised pause frame use: Symmetric Receive-only
        Advertised auto-negotiation: Yes
        Advertised FEC modes: Not reported
        Link partner advertised link modes:  10baseT/Half 10baseT/Full
                                             100baseT/Half 100baseT/Full
                                             1000baseT/Full
                                             2500baseT/Full
                                             5000baseT/Full
        Link partner advertised pause frame use: Symmetric Receive-only
        Link partner advertised auto-negotiation: Yes
        Link partner advertised FEC modes: Not reported
        Speed: 5000Mb/s
        Duplex: Full
        Auto-negotiation: on
        Port: Twisted Pair
        PHYAD: 0
        Transceiver: internal
        MDI-X: on
        Supports Wake-on: pumbg
        Wake-on: d
        Current message level: 0x00000033 (51)
                               drv probe ifdown ifup
        Link detected: yes

Code: Select all

root@odroid-ODROID-H4:~# uname -a
Linux odroid-ODROID-H4 6.8.0-35-generic #35-Ubuntu SMP PREEMPT_DYNAMIC Mon May 20 15:51:52 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
root@odroid-ODROID-H4:~# lsmod | grep r8
r8126                 196608  0
root@odroid-ODROID-H4:~#
These users thanked the author neal for the post (total 3):
odroid (Mon Jun 10, 2024 2:31 pm) • domih (Tue Jun 11, 2024 2:51 am) • Xebec (Fri Jun 14, 2024 8:26 pm)

Post Reply

Return to “Hardware and peripherals”

Who is online

Users browsing this forum: No registered users and 2 guests