Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Support for RTL8153 Adapter?

    Scheduled Pinned Locked Moved Hardware
    25 Posts 6 Posters 3.6k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Q
      Quasiguru
      last edited by Quasiguru

      Hello everyone, I would be interested in seeing the Realtek 8153 adapter be able to be adapted to the kernel of 2.4.5 or 2.5 if possible. Of course not having the access to the files needed I cannot personally rebuild the PFSense kernel. Any possibility of some assistance from the Netgate team? I can get the device to initialize by typing usbconfig -d x.x set_config 1 however the performance of the adapter is abysmal only hitting 40 Mbps max. From what I am reading the ure driver would be able to get this adapter to run at the full Gigabit speed (also have compiled the FreeBSD 11 and 12 kernel to config), but I would rather not run "just" a FreeBSD kernel, and risk security issues with PF packages.

      https://www.freebsd.org/cgi/man.cgi?query=ure&sektion=4&manpath=freebsd-release-ports

      1 Reply Last reply Reply Quote 0
      • stephenw10S
        stephenw10 Netgate Administrator
        last edited by

        What USB IDs does it present in config index 1? What driver attaches to it?

        I'd be amased if it could use more than one driver.

        USB Ethernet devices are pretty much always terrible. 40Mbps us very slow but I would not expect to ever see Gigabit line rate.

        Steve

        1 Reply Last reply Reply Quote 0
        • Q
          Quasiguru
          last edited by

          Driver is cdce0, but a recompile of the kernel can make it ure, I did confirm on standard FreeBSD 11 and 12... Also I was getting Gigabit speeds over usb on the recompiled kernels.
          8639c76c-2abf-4bcb-83d4-a9b66da61dcb-image.png

          Descriptors are below:
          `ugen0.2: <TP-LINK USB 101001000 LAN> at usbus0, cfg=1 md=HOST spd=SUPER (5.0Gbps ) pwr=ON (64mA)

          Configuration index 0

          bLength = 0x0009
          bDescriptorType = 0x0002
          wTotalLength = 0x0039
          bNumInterfaces = 0x0001
          bConfigurationValue = 0x0001
          iConfiguration = 0x0000  <no string>
          bmAttributes = 0x00a0
          bMaxPower = 0x0020
          
          Interface 0
            bLength = 0x0009
            bDescriptorType = 0x0004
            bInterfaceNumber = 0x0000
            bAlternateSetting = 0x0000
            bNumEndpoints = 0x0003
            bInterfaceClass = 0x00ff  <Vendor specific>
            bInterfaceSubClass = 0x00ff
            bInterfaceProtocol = 0x0000
            iInterface = 0x0000  <no string>
          
           Endpoint 0
              bLength = 0x0007
              bDescriptorType = 0x0005
              bEndpointAddress = 0x0081  <IN>
              bmAttributes = 0x0002  <BULK>
              wMaxPacketSize = 0x0400
              bInterval = 0x0000
              bRefresh = 0x0000
              bSynchAddress = 0x0000
          
            Additional Descriptor
          
            bLength = 0x06
            bDescriptorType = 0x30
            bDescriptorSubType = 0x03
             RAW dump:
             0x00 | 0x06, 0x30, 0x03, 0x00, 0x00, 0x00
          
          
           Endpoint 1
              bLength = 0x0007
              bDescriptorType = 0x0005
              bEndpointAddress = 0x0002  <OUT>
              bmAttributes = 0x0002  <BULK>
              wMaxPacketSize = 0x0400
              bInterval = 0x0000
              bRefresh = 0x0000
              bSynchAddress = 0x0000
          
            Additional Descriptor
          
            bLength = 0x06
            bDescriptorType = 0x30
            bDescriptorSubType = 0x03
             RAW dump:
             0x00 | 0x06, 0x30, 0x03, 0x00, 0x00, 0x00
          
          
           Endpoint 2
              bLength = 0x0007
              bDescriptorType = 0x0005
              bEndpointAddress = 0x0083  <IN>
              bmAttributes = 0x0003  <INTERRUPT>
              wMaxPacketSize = 0x0002
              bInterval = 0x0008
              bRefresh = 0x0000
              bSynchAddress = 0x0000
          
            Additional Descriptor
          
            bLength = 0x06
            bDescriptorType = 0x30
            bDescriptorSubType = 0x00
             RAW dump:
             0x00 | 0x06, 0x30, 0x00, 0x00, 0x02, 0x00
          

          Configuration index 1

          bLength = 0x0009
          bDescriptorType = 0x0002
          wTotalLength = 0x0062
          bNumInterfaces = 0x0002
          bConfigurationValue = 0x0002
          iConfiguration = 0x0000  <no string>
          bmAttributes = 0x00a0
          bMaxPower = 0x0020
          
          Interface 0
            bLength = 0x0009
            bDescriptorType = 0x0004
            bInterfaceNumber = 0x0000
            bAlternateSetting = 0x0000
            bNumEndpoints = 0x0001
            bInterfaceClass = 0x0002  <Communication device>
            bInterfaceSubClass = 0x0006
            bInterfaceProtocol = 0x0000
            iInterface = 0x0005  <CDC Communications Control>
          
            Additional Descriptor
          
            bLength = 0x05
            bDescriptorType = 0x24
            bDescriptorSubType = 0x00
             RAW dump:
             0x00 | 0x05, 0x24, 0x00, 0x10, 0x01
          
          
            Additional Descriptor
          
            bLength = 0x05
            bDescriptorType = 0x24
            bDescriptorSubType = 0x06
             RAW dump:
             0x00 | 0x05, 0x24, 0x06, 0x00, 0x01
          
          
            Additional Descriptor
          
            bLength = 0x0d
            bDescriptorType = 0x24
            bDescriptorSubType = 0x0f
             RAW dump:
             0x00 | 0x0d, 0x24, 0x0f, 0x03, 0x00, 0x00, 0x00, 0x00,
             0x08 | 0xea, 0x05, 0x00, 0x00, 0x00
          
          
           Endpoint 0
              bLength = 0x0007
              bDescriptorType = 0x0005
              bEndpointAddress = 0x0083  <IN>
              bmAttributes = 0x0003  <INTERRUPT>
              wMaxPacketSize = 0x0010
              bInterval = 0x0008
              bRefresh = 0x0000
              bSynchAddress = 0x0000
          
            Additional Descriptor
          
            bLength = 0x06
            bDescriptorType = 0x30
            bDescriptorSubType = 0x00
             RAW dump:
             0x00 | 0x06, 0x30, 0x00, 0x00, 0x08, 0x00
          
          
          
          Interface 1
            bLength = 0x0009
            bDescriptorType = 0x0004
            bInterfaceNumber = 0x0001
            bAlternateSetting = 0x0000
            bNumEndpoints = 0x0000
            bInterfaceClass = 0x000a  <CDC-data>
            bInterfaceSubClass = 0x0000
            bInterfaceProtocol = 0x0000
            iInterface = 0x0000  <no string>
          
          
          Interface 1 Alt 1
            bLength = 0x0009
            bDescriptorType = 0x0004
            bInterfaceNumber = 0x0001
            bAlternateSetting = 0x0001
            bNumEndpoints = 0x0002
            bInterfaceClass = 0x000a  <CDC-data>
            bInterfaceSubClass = 0x0000
            bInterfaceProtocol = 0x0000
            iInterface = 0x0004  <Ethernet Data>
          
           Endpoint 0
              bLength = 0x0007
              bDescriptorType = 0x0005
              bEndpointAddress = 0x0081  <IN>
              bmAttributes = 0x0002  <BULK>
              wMaxPacketSize = 0x0400
              bInterval = 0x0000
              bRefresh = 0x0000
              bSynchAddress = 0x0000
          
            Additional Descriptor
          
            bLength = 0x06
            bDescriptorType = 0x30
            bDescriptorSubType = 0x03
             RAW dump:
             0x00 | 0x06, 0x30, 0x03, 0x00, 0x00, 0x00
          
          
           Endpoint 1
              bLength = 0x0007
              bDescriptorType = 0x0005
              bEndpointAddress = 0x0002  <OUT>
              bmAttributes = 0x0002  <BULK>
              wMaxPacketSize = 0x0400
              bInterval = 0x0000
              bRefresh = 0x0000
              bSynchAddress = 0x0000
          
            Additional Descriptor
          
            bLength = 0x06
            bDescriptorType = 0x30
            bDescriptorSubType = 0x03
             RAW dump:
             0x00 | 0x06, 0x30, 0x03, 0x00, 0x00, 0x00
          

          `

          1 Reply Last reply Reply Quote 0
          • johnpozJ
            johnpoz LAYER 8 Global Moderator
            last edited by johnpoz

            @stephenw10 said in Support for RTL8153 Adapter?:

            I would not expect to ever see Gigabit line rate.

            Depends on what level of usb ;)

            I see 2+ gbs using a usb nic plugged into my nas and then one in my pc.. This was the cheapest easiest way to get gig+ to my nas from my pc.

            $ iperf3 -c 192.168.10.10
            Connecting to host 192.168.10.10, port 5201
            [  5] local 192.168.10.9 port 25428 connected to 192.168.10.10 port 5201
            [ ID] Interval           Transfer     Bitrate
            [  5]   0.00-1.00   sec   268 MBytes  2.24 Gbits/sec
            [  5]   1.00-2.00   sec   282 MBytes  2.37 Gbits/sec
            [  5]   2.00-3.00   sec   281 MBytes  2.36 Gbits/sec
            [  5]   3.00-4.00   sec   282 MBytes  2.36 Gbits/sec
            [  5]   4.00-5.00   sec   282 MBytes  2.36 Gbits/sec
            [  5]   5.00-6.00   sec   281 MBytes  2.36 Gbits/sec
            [  5]   6.00-7.00   sec   282 MBytes  2.37 Gbits/sec
            [  5]   7.00-8.00   sec   282 MBytes  2.36 Gbits/sec
            [  5]   8.00-9.00   sec   282 MBytes  2.36 Gbits/sec
            [  5]   9.00-10.00  sec   284 MBytes  2.38 Gbits/sec
            - - - - - - - - - - - - - - - - - - - - - - - - -
            [ ID] Interval           Transfer     Bitrate
            [  5]   0.00-10.00  sec  2.74 GBytes  2.35 Gbits/sec                  sender
            [  5]   0.00-10.01  sec  2.74 GBytes  2.35 Gbits/sec                  receiver
            
            iperf Done.
            

            That is via usb3 on my my nas, and then another usb3 on my pc.. Using 2 CAC-1420 adapters from club 3d. I am normally not a fan of usb nics - but this was only way to achieve plus gig on my nas.. And I had no other slots free on my pc for a actual nic as well.. So this was cheap way to skin that cat.

            So clearly it is possible to achieve gig via usb.. But yeah depend on what usb, and nic and drivers, etc.

            An intelligent man is sometimes forced to be drunk to spend time with his fools
            If you get confused: Listen to the Music Play
            Please don't Chat/PM me for help, unless mod related
            SG-4860 24.11 | Lab VMs 2.7.2, 24.11

            Q 1 Reply Last reply Reply Quote 0
            • Q
              Quasiguru @johnpoz
              last edited by

              @johnpoz said in Support for RTL8153 Adapter?:

              @stephenw10 said in Support for RTL8153 Adapter?:

              I would not expect to ever see Gigabit line rate.

              Depends on what level of usb ;)

              I see 2+ gbs using a usb nic plugged into my nas and then one in my pc.. This was the cheapest easiest way to get gig+ to my nas from my pc.

              $ iperf3 -c 192.168.10.10
              Connecting to host 192.168.10.10, port 5201
              [  5] local 192.168.10.9 port 25428 connected to 192.168.10.10 port 5201
              [ ID] Interval           Transfer     Bitrate
              [  5]   0.00-1.00   sec   268 MBytes  2.24 Gbits/sec
              [  5]   1.00-2.00   sec   282 MBytes  2.37 Gbits/sec
              [  5]   2.00-3.00   sec   281 MBytes  2.36 Gbits/sec
              [  5]   3.00-4.00   sec   282 MBytes  2.36 Gbits/sec
              [  5]   4.00-5.00   sec   282 MBytes  2.36 Gbits/sec
              [  5]   5.00-6.00   sec   281 MBytes  2.36 Gbits/sec
              [  5]   6.00-7.00   sec   282 MBytes  2.37 Gbits/sec
              [  5]   7.00-8.00   sec   282 MBytes  2.36 Gbits/sec
              [  5]   8.00-9.00   sec   282 MBytes  2.36 Gbits/sec
              [  5]   9.00-10.00  sec   284 MBytes  2.38 Gbits/sec
              - - - - - - - - - - - - - - - - - - - - - - - - -
              [ ID] Interval           Transfer     Bitrate
              [  5]   0.00-10.00  sec  2.74 GBytes  2.35 Gbits/sec                  sender
              [  5]   0.00-10.01  sec  2.74 GBytes  2.35 Gbits/sec                  receiver
              
              iperf Done.
              

              That is via usb3 on my my nas, and then another usb3 on my pc.. Using 2 CAC-1420 adapters from club 3d. I am normally not a fan of usb nics - but this was only way to achieve plus gig on my nas.. And I had no other slots free on my pc for a actual nic as well.. So this was cheap way to skin that cat.

              I know what you mean... I have a Lenovo M93P Tiny running PFSense, and have the WAN currently configured to a vlan, but would be interested in separating my wan out... I have a lot of VLAN traffic, so any little bit helps ;)

              1 Reply Last reply Reply Quote 0
              • stephenw10S
                stephenw10 Netgate Administrator
                last edited by

                In FreeNAS? Or something Linux based? That's impressive though!

                1 Reply Last reply Reply Quote 0
                • johnpozJ
                  johnpoz LAYER 8 Global Moderator
                  last edited by

                  No not freenas - that is on a synology ds918+, they have no official support for them - but there are a lot of smart people out there ;) hehehe

                  Found the driver for it here.
                  https://github.com/bb-qq/r8152

                  Not exactly sure what synology runs - its some sort of bastardized linux of theirs..

                  ash-4.3# uname -a
                  Linux NAS 4.4.59+ #25426 SMP PREEMPT Tue Nov 24 17:18:27 CST 2020 x86_64 GNU/Linux synology_apollolake_918+

                  An intelligent man is sometimes forced to be drunk to spend time with his fools
                  If you get confused: Listen to the Music Play
                  Please don't Chat/PM me for help, unless mod related
                  SG-4860 24.11 | Lab VMs 2.7.2, 24.11

                  1 Reply Last reply Reply Quote 0
                  • stephenw10S
                    stephenw10 Netgate Administrator
                    last edited by

                    You can open a feature request: https://redmine.pfsense.org/

                    I don't see one for that specifically.

                    Steve

                    Q 1 Reply Last reply Reply Quote 0
                    • stephenw10S
                      stephenw10 Netgate Administrator
                      last edited by

                      Ah, well, yes in Linux the support is likely far better.

                      I've never seen that sort or rate from USB Ethernet in FreeBSD myself.

                      Steve

                      1 Reply Last reply Reply Quote 0
                      • Q
                        Quasiguru @stephenw10
                        last edited by

                        @stephenw10 and done. Thank you!

                        https://redmine.pfsense.org/issues/11125

                        1 Reply Last reply Reply Quote 0
                        • johnpozJ
                          johnpoz LAYER 8 Global Moderator
                          last edited by

                          How many interfaces does your pfsense have on it now? If the problem is bandwidth for your vlans - while sure multigig interface would be 1 option, be it 2.5, 5 or even better 10

                          But you can split your vlans across multiple physical gig interfaces.. Part of the reason its a good idea to have router with lots of interfaces ;) That is why I love my 4860, its got 6 interfaces.. So I have my vlans spread across 5 of those.. The only interface that has multiple vlans on it is the one that does the wireless vlans - since they are always low bandwidth anyway - and they don't talk to each other - so no intervlan traffic on the same physical.

                          An intelligent man is sometimes forced to be drunk to spend time with his fools
                          If you get confused: Listen to the Music Play
                          Please don't Chat/PM me for help, unless mod related
                          SG-4860 24.11 | Lab VMs 2.7.2, 24.11

                          1 Reply Last reply Reply Quote 0
                          • J
                            jesusvinasaltosystems
                            last edited by

                            for this reason it does not show the link speed
                            the ure(4) driver is not currently included in pfSense so your adapter is instead using the cdce(4) driver.
                            You should add comments to the feature request of you want that driver to be included in a future version.
                            40a14ac3-0432-4eb5-8062-09c1885d2209-image.png

                            1 Reply Last reply Reply Quote 0
                            • J
                              jean-francois
                              last edited by

                              I've upgraded to 2.5.2 and the new kernel driver is unstable with my RTL8153 adaptor, it works for 1 or 2 days and the stops working. It was working perfectly as a module to load with set_config/usbconfig, without needing any reboot for months (uptime > 90 days...). Bad idea guys...

                              1 Reply Last reply Reply Quote 0
                              • stephenw10S
                                stephenw10 Netgate Administrator
                                last edited by

                                usbconfig does not load kernel modules. What module were you using? In 2.5.1? What happens if you load that module in 2.5.2? More details needed to even define the issue you're seeing.

                                But at a basic level don't use USB Ethernet if you're looking for speed or stability.

                                Steve

                                J 1 Reply Last reply Reply Quote 0
                                • J
                                  jean-francois
                                  last edited by stephenw10

                                  Your're absolutly right Steve, sorry about it: this is the "cdce" driver that was running! Personnaly, I don't mind the speed as I have a DSL link, however it was very stable (I have tried kernel modules urtwn, urndis and ipheth from FreeBSD deposit before, but stopped due to the complexity to upgrade).

                                  My /conf/config.xml in 2.5.1 and previous releases was:

                                  <earlyshellcmd>usbconfig -d `usbconfig list | grep "Thinkpad" | cut -c5-7` set_config 1</earlyshellcmd>
                                  

                                  Jean-Francois.

                                  1 Reply Last reply Reply Quote 0
                                  • J
                                    jean-francois @stephenw10
                                    last edited by

                                    @stephenw10
                                    I forgot to answer the other questions:

                                    • in 2.5.2, the same config as the one reported doesn't work: the interface is active but no DHCP received (and no communication if I set a fixed IP address)
                                    • in 2.5.2, if I change the config to "set_config 0", then it also works for 1 or 2 days (same as removing the whole line in config.xml)

                                    I know USB Ethernet is not the best solution, but my mini PC only hosts 1 NIC in my homelab.

                                    Jean-Francois.

                                    1 Reply Last reply Reply Quote 0
                                    • stephenw10S
                                      stephenw10 Netgate Administrator
                                      last edited by

                                      So it was using the generic cdce(4) driver in 2.5.1 but is now using ure(4) in 2.5.2?

                                      How does it fail? Anything logged?

                                      Steve

                                      1 Reply Last reply Reply Quote 0
                                      • J
                                        jean-francois
                                        last edited by

                                        I can't see anything in system logs, but maybe I'm not looking at the right place. ifconfig indicates that the interface is down, but the activity links are still blinking. If my memory is good, with "set_config 0" there was a "disconnected" message on the console, but I'm not 100% sure (since I removed the config.xml line I can't see any message related to this NIC on the console).

                                        The weirdest thing it that the link being active while the interface is down (GUI & ifconfig, and the console doesn't display any IP address assigned to the NIC). My wife and I were working from home with 2 VPNs and we only figured the Internet was not working when we tried to use our personnal PC. The existing TCP tunnels were working perfectly fine.

                                        Please let me know if you want me to run special command lines for you the next time it happens (in 2 days probably sigh).

                                        1 Reply Last reply Reply Quote 0
                                        • stephenw10S
                                          stephenw10 Netgate Administrator
                                          last edited by

                                          Grab a status_output file when it fails. Navigate to <firewall IP>/status.php , it's not linked from the GUI anyway. Then you can review that later.

                                          However if open connections continued to p[ass traffic that doesn't sound like a NIC issue. More like state exhaustion or conflciting states maybe.

                                          You could try adding to /boot/loader.conf.local:

                                          hint.ure.0.disabled=1
                                          

                                          That might just disable it completely rather than allow cdce to attach though.

                                          Steve

                                          1 Reply Last reply Reply Quote 0
                                          • J
                                            jean-francois
                                            last edited by

                                            I tried "hint.ure.0.disabled=1" but then ue0 interface was not available anymore... Do you mean I should use this loader.conf.local to disable the new driver, in which case I should revert config.xml with the previous <earlyshellcmd> to get the previous cdce driver?

                                            If so, I'll give it a 2nd try next time it fails (I'm waiting to grab status_output before).

                                            1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post
                                            Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.