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

    ASIX AX88179 USB to GigE

    Scheduled Pinned Locked Moved Hardware
    52 Posts 9 Posters 29.8k 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.
    • H
      Huxy
      last edited by

      Turns out it was the download link. I manually downloaded and sftp'd the file from windows to the pfsense box and I was able to load the module.

      However, as soon as I attempt to assign the interface to a role, the machine crashes with reference to the algx module.

      
      Fatal trap 12: page fault while in kernel mode
      cpuid = 0; apic id = 00
      fault virtual address = 0x8
      fault code = supervisor read, page not present
      instruction pointer = 0x20:0xc5091e46
      stack pointer = 0x28:0xd6775c94
      frame pointer = 0x28:0xd6775ca0
      code segment = base 0x0 limit 0xffffff, type 0x1b
      = DPL 0, pres 1, def 32 1, gran 1
      processor eflags = interrupt enabled, resume, IOPL = 0
      current process = 14 (axge0)
      trap number = 12
      panic: page fault
      
      

      http://blog.codeape.co.uk

      1 Reply Last reply Reply Quote 0
      • B
        bryan.paradis
        last edited by

        @Huxy:

        Turns out it was the download link. I manually downloaded and sftp'd the file from windows to the pfsense box and I was able to load the module.

        However, as soon as I attempt to assign the interface to a role, the machine crashes with reference to the algx module.

        Well that sucks. Can you get the exact error?

        1 Reply Last reply Reply Quote 0
        • B
          bryan.paradis
          last edited by

          Ok. Well I am redoing the environment I compiled that in. My new adapter will be here on friday.

          Cable Matters SuperSpeed USB 3.0 to RJ45 Gigabit Ethernet Adapter

          1 Reply Last reply Reply Quote 0
          • H
            Huxy
            last edited by

            Cool. Thanks for the response. I suspect you noticed, but I added the crash error to my previous post.
            Hopefully, the new build environment will help, as will having the hardware for testing.

            http://blog.codeape.co.uk

            1 Reply Last reply Reply Quote 0
            • B
              bryan.paradis
              last edited by

              @Huxy:

              Cool. Thanks for the response. I suspect you noticed, but I added the crash error to my previous post.
              Hopefully, the new build environment will help, as will having the hardware for testing.

              Thanks for updating that. What exactly did you do to produce the issue. So I can try reproducing.

              Also here is the md5 for that module: F313B0FA8A7C38CF1E3A8A4DD39F2C22

              1 Reply Last reply Reply Quote 0
              • H
                Huxy
                last edited by

                I checked the md5sum and it was fine. Here's the steps I took to cause a crash. 100% reproducible.

                *** Welcome to pfSense 2.1-RELEASE-nanobsd (i386) on pfSense ***
                
                 WAN (wan)       -> re0        -> v4/DHCP4: 192.168.1.162/24
                 LAN (lan)       -> em0        -> v4: 192.168.1.6/24
                
                 0) Logout (SSH only)                  8) Shell
                 1) Assign Interfaces                  9) pfTop
                 2) Set interface(s) IP address       10) Filter Logs
                 3) Reset webConfigurator password    11) Restart webConfigurator
                 4) Reset to factory defaults         12) pfSense Developer Shell
                 5) Reboot system                     13) Upgrade from console
                 6) Halt system                       14) Disable Secure Shell (sshd)
                 7) Ping host                         15) Restore recent configuration
                
                Enter an option: 1
                
                Valid interfaces are:
                
                usbus00   (up)
                em0   00:16:3e:9c:ae:88   (up) Intel(R) PRO/1000 Legacy Network Connection 1.0.4
                re0   00:16:3e:39:ad:93   (up) RealTek 8139C+ 10/100BaseTX
                usbus10   (up)
                ue0   00:24:9b:09:84:0f (down) USB Ethernet
                
                Do you want to set up VLANs first?
                
                If you are not going to use VLANs, or only for optional interfaces, you should
                say no here and use the webConfigurator to configure VLANs later, if required.
                
                Do you want to set up VLANs now [y|n]? n
                
                *NOTE*  pfSense requires *AT LEAST* 1 assigned interface(s) to function.
                        If you do not have *AT LEAST* 1 interfaces you CANNOT continue.
                
                        If you do not have at least 1 *REAL* network interface card(s)
                        or one interface with multiple VLANs then pfSense
                        *WILL NOT* function correctly.
                
                If you do not know the names of your interfaces, you may choose to use
                auto-detection. In that case, disconnect all interfaces now before
                hitting 'a' to initiate auto detection.
                
                Enter the WAN interface name or 'a' for auto-detection: ue0
                
                Enter the LAN interface name or 'a' for auto-detection
                NOTE: this enables full Firewalling/NAT mode.
                (or nothing if finished): em0
                
                Enter the Optional 1 interface name or 'a' for auto-detection
                (or nothing if finished):
                
                The interfaces will be assigned as follows:
                
                WAN  -> ue0
                LAN  -> em0
                
                Do you want to proceed [y|n]?y
                
                Writing configuration...done.
                One moment while we reload the settings... done!
                
                

                http://blog.codeape.co.uk

                1 Reply Last reply Reply Quote 0
                • B
                  bryan.paradis
                  last edited by

                  @Huxy:

                  I checked the md5sum and it was fine. Here's the steps I took to cause a crash. 100% reproducible.

                  *** Welcome to pfSense 2.1-RELEASE-nanobsd (i386) on pfSense ***
                  
                   WAN (wan)       -> re0        -> v4/DHCP4: 192.168.1.162/24
                   LAN (lan)       -> em0        -> v4: 192.168.1.6/24
                  
                   0) Logout (SSH only)                  8) Shell
                   1) Assign Interfaces                  9) pfTop
                   2) Set interface(s) IP address       10) Filter Logs
                   3) Reset webConfigurator password    11) Restart webConfigurator
                   4) Reset to factory defaults         12) pfSense Developer Shell
                   5) Reboot system                     13) Upgrade from console
                   6) Halt system                       14) Disable Secure Shell (sshd)
                   7) Ping host                         15) Restore recent configuration
                  
                  Enter an option: 1
                  
                  Valid interfaces are:
                  
                  usbus00   (up)
                  em0   00:16:3e:9c:ae:88   (up) Intel(R) PRO/1000 Legacy Network Connection 1.0.4
                  re0   00:16:3e:39:ad:93   (up) RealTek 8139C+ 10/100BaseTX
                  usbus10   (up)
                  ue0   00:24:9b:09:84:0f (down) USB Ethernet
                  
                  Do you want to set up VLANs first?
                  
                  If you are not going to use VLANs, or only for optional interfaces, you should
                  say no here and use the webConfigurator to configure VLANs later, if required.
                  
                  Do you want to set up VLANs now [y|n]? n
                  
                  *NOTE*  pfSense requires *AT LEAST* 1 assigned interface(s) to function.
                          If you do not have *AT LEAST* 1 interfaces you CANNOT continue.
                  
                          If you do not have at least 1 *REAL* network interface card(s)
                          or one interface with multiple VLANs then pfSense
                          *WILL NOT* function correctly.
                  
                  If you do not know the names of your interfaces, you may choose to use
                  auto-detection. In that case, disconnect all interfaces now before
                  hitting 'a' to initiate auto detection.
                  
                  Enter the WAN interface name or 'a' for auto-detection: ue0
                  
                  Enter the LAN interface name or 'a' for auto-detection
                  NOTE: this enables full Firewalling/NAT mode.
                  (or nothing if finished): em0
                  
                  Enter the Optional 1 interface name or 'a' for auto-detection
                  (or nothing if finished):
                  
                  The interfaces will be assigned as follows:
                  
                  WAN  -> ue0
                  LAN  -> em0
                  
                  Do you want to proceed [y|n]?y
                  
                  Writing configuration...done.
                  One moment while we reload the settings... done!
                  
                  

                  Try this one went a different route with it this time:

                  rename to if_axge.ko and check md5 afterwards.

                  if_axge.ko
                  md5: 69F1819099F9183865E5895D97A6E9EE
                  

                  Also if it fails can you please setup the interface manually on the shell one step at a time. Maybe your system log showing the last error happening would be helpful as well. I don't know what part of the assign script actually triggered the problem. I figure though it must have been in the axge_ifmedia_upd() function it was calling a updated function from an updated file. This time instead of bringing in the update I switched it back to calling the original function.

                  if_axge.txt

                  1 Reply Last reply Reply Quote 0
                  • H
                    Huxy
                    last edited by

                    Boom! Great work!

                    This new version seems to work fine. I've now got a working connection.
                    I've yet to do thorough testing but it all looks good! Here's the ifconfig which I ran using a SSH login shell.

                    [2.1-RELEASE][root@pfSense.localdomain]/root(2): ifconfig ue0
                    ue0: flags=8843 <up,broadcast,running,simplex,multicast>metric 0 mtu 1500
                            options=8000b <rxcsum,txcsum,vlan_mtu,linkstate>ether 00:24:9b:09:84:0f
                            inet6 fe80::224:9bff:fe09:840f%ue0 prefixlen 64 scopeid 0x9
                            inet 192.168.1.6 netmask 0xffffff00 broadcast 192.168.1.255
                            nd6 options=1 <performnud>media: Ethernet autoselect (1000baseT <full-duplex,master>)
                            status: active
                    [2.1-RELEASE][root@pfSense.localdomain]/root(3):</full-duplex,master></performnud></rxcsum,txcsum,vlan_mtu,linkstate></up,broadcast,running,simplex,multicast> 
                    

                    http://blog.codeape.co.uk

                    1 Reply Last reply Reply Quote 0
                    • B
                      bryan.paradis
                      last edited by

                      @Huxy:

                      Boom! Great work!

                      This new version seems to work fine. I've now got a working connection.
                      I've yet to do thorough testing but it all looks good! Here's the ifconfig which I ran using a SSH login shell.

                      [2.1-RELEASE][root@pfSense.localdomain]/root(2): ifconfig ue0
                      ue0: flags=8843 <up,broadcast,running,simplex,multicast>metric 0 mtu 1500
                              options=8000b <rxcsum,txcsum,vlan_mtu,linkstate>ether 00:24:9b:09:84:0f
                              inet6 fe80::224:9bff:fe09:840f%ue0 prefixlen 64 scopeid 0x9
                              inet 192.168.1.6 netmask 0xffffff00 broadcast 192.168.1.255
                              nd6 options=1 <performnud>media: Ethernet autoselect (1000baseT <full-duplex,master>)
                              status: active
                      [2.1-RELEASE][root@pfSense.localdomain]/root(3):</full-duplex,master></performnud></rxcsum,txcsum,vlan_mtu,linkstate></up,broadcast,running,simplex,multicast> 
                      

                      Haha hardcore. First Freebsd thing I ever messed with. Maybe I didn't even need to buy one for $20 hahahaha. Can you test the throughput? There may be another change to get it to do usb 3.0 speeds. Are you on usb 2.0 or 3.0?

                      What is your output of usbconfig

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

                        Nice one!  ;D
                        There's no USB3 support at all in FreeBSD 8.3 as far as I know so that getting that working would be significantly more complex.

                        Steve

                        1 Reply Last reply Reply Quote 0
                        • B
                          bryan.paradis
                          last edited by

                          @stephenw10:

                          Nice one!  ;D
                          There's no USB3 support at all in FreeBSD 8.3 as far as I know so that getting that working would be significantly more complex.

                          Steve

                          The xhci(4) driver, which supports Extensible Host Controller Interface (xHCI) and USB 3.0, has been added.[r215944]

                          Are you sure? Seems like it started getting support in 8.2

                          I have compiled for amd64 now as well. I am posting both.

                          
                          1\. download
                          2\. rename to if_axge.ko
                          3\. place in /boot/modules
                          4\. md5 if_axge.ko and check against the md5 listed below
                          
                          
                          
                          #i386
                          md5 if_axge.ko
                          MD5 (if_axge.ko) = 69f1819099f9183865e5895d97a6e9ee
                          
                          
                          
                          #amd64
                          md5 if_axge.ko
                          MD5 (if_axge.ko) = afb51043416a0cc6cad7dfbe875a9809
                          
                          

                          if_axge.ko.i386.txt
                          if_axge.ko.amd64.txt

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

                            Hmm, fairly sure. There are many reports of the USB3 subsystem not showing up at all and I think at least some of them have been since 2.1 was released. Don't let me stop you trying though.  ;)

                            Steve

                            1 Reply Last reply Reply Quote 0
                            • H
                              Huxy
                              last edited by

                              [[b]update] I wasn't able to get the host to see the USB3 PCIe Adapter. I'm guessing driver support isn't included in this kernel.

                              http://blog.codeape.co.uk

                              1 Reply Last reply Reply Quote 0
                              • B
                                bryan.paradis
                                last edited by

                                @Huxy:

                                [[b]update] I wasn't able to get the host to see the USB3 PCIe Adapter. I'm guessing driver support isn't included in this kernel.

                                Which one? :P

                                Also I got my Cable Matters adapter! Haha. Here are my results of some fiddling around.

                                Virtualbox -> freebsd passthrough = Deteched sends SOME packets SOMETIMES
                                ESXI -> debian = Works but limited to 12mbit in my setup. Verdict usable but needs some work
                                ESXI -> pfsense = Works much better than the debian passthrough for some reason. Verdict maybe workable

                                [2.1-RELEASE][root@pfsensedev.localdomain]/(12): ./speedtest-cli
                                Retrieving speedtest.net configuration...
                                Retrieving speedtest.net server list...
                                Testing from Electronic Box (xxx.xxx.xxx.xxx)...
                                Selecting best server based on ping...
                                Hosted by TELUS (Montreal, QC) [7.35 km]: 96.083 ms
                                Testing download speed........................................
                                Download: 44.66 Mbit/s
                                Testing upload speed..................................................
                                Upload: 9.64 Mbit/s
                                
                                

                                44.66 Mbit is not half bad! I am going to be moving away from esxi to ganeti (KVM maybe XEN) so I will see how it does in passthrough there later on.

                                [2.1-RELEASE][root@pfsensedev.localdomain]/(25): ./speedtest-cli
                                Retrieving speedtest.net configuration...
                                Retrieving speedtest.net server list...
                                Testing from Electronic Box (xxx.xxx.xxx.xxx)...
                                Selecting best server based on ping...
                                Hosted by Colo-Serv Communications (Montreal, QC) [7.35 km]: 83.923 ms
                                Testing download speed........................................
                                Download: 57.40 Mbit/s
                                Testing upload speed..................................................
                                Upload: 10.27 Mbit/s
                                [2.1-RELEASE][root@pfsensedev.localdomain]/(26):
                                
                                

                                This is with emulated E1000. It is just a VM with 256mb of ram and really low priority. It is not routing through its own wan but it is still routing through my main pfsense on the same atom box ;) Maybe I will do a LAN to LAN test later

                                1 Reply Last reply Reply Quote 0
                                • H
                                  Huxy
                                  last edited by

                                  I did some testing with pfSense and m0n0wall using the USB adapter as my WAN connection.
                                  Throughput on incoming traffic was really poor 0.5mbit/s but upload was fine at 10.5mbit/s.
                                  The net connection also stopped responding on two separate occasions and I was forced to reboot the pfSense VM.

                                  I installed a Debian based router instead as a test and I had full speed 125mbit/s and 10.5mbit/s speeds on my LAN clients. I'm not sure what the issue is to be honest, but it renders pfSense unsuitable for me at this point in time.

                                  http://blog.codeape.co.uk

                                  1 Reply Last reply Reply Quote 0
                                  • B
                                    bryan.paradis
                                    last edited by

                                    @Huxy:

                                    I did some testing with pfSense and m0n0wall using the USB adapter as my WAN connection.
                                    Throughput on incoming traffic was really poor 0.5mbit/s but upload was fine at 10.5mbit/s.
                                    The net connection also stopped responding on two separate occasions and I was forced to reboot the pfSense VM.

                                    I installed a Debian based router instead as a test and I had full speed 125mbit/s and 10.5mbit/s speeds on my LAN clients. I'm not sure what the issue is to be honest, but it renders pfSense unsuitable for me at this point in time.

                                    FreeBSD integration ranges from very poor to not as poor depending on your hypervisor choice.

                                    1. What are you using as a hypervisor?
                                    2. Does the hypervisor host OS support the usb nic?
                                    3. Are you passing through the usb device?

                                    1 Reply Last reply Reply Quote 0
                                    • H
                                      Huxy
                                      last edited by

                                      1. What are you using as a hypervisor?

                                      I've been using a Xen 4.3 Wheezy based Hypervisor. I backported Xen and added PVUSB support to a recent kernel version. The VM is a QEMU traditional based HVM.

                                      2. Does the hypervisor host OS support the usb nic?

                                      Yes the host OS has drivers for it. In a debian VM it also works fine with PCI Passthrough.

                                      3. Are you passing through the usb device?

                                      I'm passing through the USB controller directly to the VM. The pfSense VM is then in control of both the USB driver and the NIC driver. I think I downloaded a PVHVM build of pfSense somewhere. That might have better luck..

                                      http://blog.codeape.co.uk

                                      1 Reply Last reply Reply Quote 0
                                      • B
                                        bryan.paradis
                                        last edited by

                                        @Huxy:

                                        I've been using a Xen 4.3 Wheezy based Hypervisor. I backported Xen and added PVUSB support to a recent kernel version. The VM is a QEMU traditional based HVM.

                                        You are using Xen on wheezy with Qemu-dm is what I gather?

                                        Yes the host OS has drivers for it. In a debian VM it also works fine with PCI Passthrough.

                                        This is probably because the debian has proper passthrough support.

                                        I'm passing through the USB controller directly to the VM. The pfSense VM is then in control of both the USB driver and the NIC driver. I think I downloaded a PVHVM build of pfSense somewhere. That might have better luck..

                                        Why not just create a virtual wan network using that as the physical adapter on the host and then using a virtual nic in the guest pfsense?

                                        1 Reply Last reply Reply Quote 0
                                        • H
                                          Huxy
                                          last edited by

                                          You are using Xen on wheezy with Qemu-dm is what I gather?

                                          Yes, not the upstream version

                                          Why not just create a virtual wan network using that as the physical adapter on the host and then using a virtual nic in the guest pfsense?

                                          I'm guessing this would work, but I was keen to keep the WAN external to the main hypervisor. I'm not an expert but I would think by passing through the device it would be more secure and reduce the amount of overhead required to communicate between the hypervisor and the guest. Given that Xen support and FreeBSD seems immature compared to it's linux brethren so it might be easier to go that route.

                                          With regards to the loss of connectivity, I think this might solve the issue with USB network interfaces.
                                          https://forum.pfsense.org/index.php/topic,72019.msg393187.html#msg393187

                                          http://blog.codeape.co.uk

                                          1 Reply Last reply Reply Quote 0
                                          • B
                                            bryan.paradis
                                            last edited by

                                            @Huxy:

                                            You are using Xen on wheezy with Qemu-dm is what I gather?

                                            Yes, not the upstream version

                                            Why not just create a virtual wan network using that as the physical adapter on the host and then using a virtual nic in the guest pfsense?

                                            I'm guessing this would work, but I was keen to keep the WAN external to the main hypervisor. I'm not an expert but I would think by passing through the device it would be more secure and reduce the amount of overhead required to communicate between the hypervisor and the guest. Given that Xen support and FreeBSD seems immature compared to it's linux brethren so it might be easier to go that route.

                                            With regards to the loss of connectivity, I think this might solve the issue with USB network interfaces.
                                            https://forum.pfsense.org/index.php/topic,72019.msg393187.html#msg393187

                                            I would keep it simple in regards to your WAN. Linux is far ahead in hardware support and integration with hypervisors that is for sure.

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