3

In a bid to quieten my room, I'm attempting to replace a generic box (2 nics) with an ARM (raspberry pi, the 512mb model) as my Internet gateway/firewall.

My research selecting components, lead me to believe this USB NIC (D-Link Corp. DUB-E100) would work well. And to begin with, it did:

# uname -a
Linux raspberry 3.6.11-raspberrypi+ #2 PREEMPT Wed Aug 14 16:47:02 CEST 2013 armv6l ARMv6-compatible processor rev 7 (v6l) BCM2708 GNU/Linux

# lsusb -v | egrep -i asix
Bus 001 Device 004: ID 2001:1a02 D-Link Corp. DUB-E100 Fast Ethernet Adapter(rev.C1) [ASIX AX88772]
idProduct          0x1a02 DUB-E100 Fast Ethernet Adapter(rev.C1) [ASIX AX88772]

# lsmod |egrep -i asix
asix                   18546  0
libphy                 25353  1 asix

However, when I finished configuring and actually swapped the Pi in, I began to notice problems:

Feb 22 10:43:51 XX kernel: [ 4696.635323] asix 1-1.2:1.0: eth1: asix_rx_fixup() Bad Header Length
Feb 22 10:43:58 XX kernel: [ 4703.766762] asix 1-1.2:1.0: eth1: asix_rx_fixup() Bad RX Length 618
Feb 22 10:43:58 XX kernel: [ 4703.767281] asix 1-1.2:1.0: eth1: asix_rx_fixup() Bad Header Length
Feb 22 10:44:32 XX kernel: [ 4738.366858] asix 1-1.2:1.0: eth1: asix_rx_fixup() Bad RX Length 618
Feb 22 10:44:32 XX kernel: [ 4738.366936] asix 1-1.2:1.0: eth1: asix_rx_fixup() Bad Header Length
Feb 22 10:44:33 XX kernel: [ 4738.919223] asix 1-1.2:1.0: eth1: asix_rx_fixup() Bad RX Length 618

Some research on the matter, indicates that this problem isn't resolvable on a Pi. Which lead me to wonder if this had an impact on my broadband performance, I have a 50/5mbit cable connection, so I ran some tests using Iperf.

LAN results:

[  5] local 10.99.0.1 port 5001 connected with X.X.X.X port 56018
[  5]  0.0-10.0 sec  48.6 MBytes  40.8 Mbits/sec

WAN results:

[  4] local 192.168.0.11 port 5001 connected with X.X.X.X port 56657
[  4]  0.0-10.0 sec  51.9 MBytes  43.5 Mbits/sec

(yes the bugged NIC is oddly 2-3 Mbit/sec faster ... )

With my previous gateway, I was easily able to 90-93 Mbit/sec across LAN and 50-55 Mbit/sec across WAN (ie. saturate my inet connection fully).

So my question is:

Have I hit the natural upper bounds of the pi's network performance, or are my results being impacted by the errors in the log? Please show me your iperf results across LAN and WAN with some detail on the specifics of the NICs etc. Does anyone have any experience with a Pi using 2 x USB Nics on a powered USB hub?

Given the Pi's known bottlenecks, any suggestions that will allow me to keep the Pi and improve WAN performance by 10 Mbit/sec would be extremely welcome :)

1
  • Maybe try posting this on the stack exchange IT site. They may know more about this than this as most members here are DIYers not IT experts. Commented Feb 28, 2014 at 22:57

1 Answer 1

3
+25

In my honest opinion, your should use the built in LAN on the Model B!

It is fully supported by by Raspbian and I can get 80mbits with iperf on my mixed 1gb/100mb LAN network. On my desktop I get 100mbits just fine, for comparison.

These kind of problems, that you are experiencing, seem to boil down to power problems, about 80% of the times, on the Pi. I am talking about less efficient, not the bad header issue. You do not say how you connected all this up? An external HUB or just Wifi USB and LAN USB?

I would suggest connecting a 5.2volt power adpater to the GPIO pins which is not typical so the next best thing is a Regulated power supply. Not the cheap transistor based ones like mobile phones use. Also connect it to the GPIO. Regulated power supply will make sure the voltage is 5volts up to 98% load of the power supplies capacity.

Another problem might be electrical interference between the Wifi Module and the LAN module if they are stacked on top of each other. That is not easy to figure out and is a pain in the back for any RF developer.

You are lucky to get nice Wifi speed on your Pi - As myself I, after trying about 6 different kinds of Wifi devices, and 3 routers, this causes so many issues if I move further away form the routers.


The Pi was not designed with networking in mind. It can connect to the internet and download stuff but really it should not be used a a speed critical router. But saying that I think, the solution will be to use a USB3 Hub, with yourt Gigbit USB adatpers. 1 of which will be connected to the Pi so it works like a router. THis is really messy but its the only way I can see you increase performance. Because the Pi only need to route data to other places this might work. But I have never done this, and I never will- because its too expensive, too many problems.

You should consider buying a mikrotik router or running or pfSense - On hardware desinged to do it. Here is a list of more OS designed for routing.

I am sorry if that is not the answer you were looking for but I hope you find a new OS and hardware to do this, properly.

7
  • 1
    +1 for recommending the built-in LAN instead. Note the usb bus is shared with the SD card and has a realistic total combined bandwidth of 30 MB/s (I've never seen or heard of it exceeding that). If the card is working at 20 MB/s, you ideally have 160 Mbits/s left for both the the LAN and the WAN...
    – goldilocks
    Commented Feb 24, 2014 at 18:45
  • Thanks for the responses, if you re-read my original post you'll see I tested both a USB NIC and the onboard LAN. If you're able to achieve 80mbit performance, please post your configuration and iperf results.
    – Nanzikambe
    Commented Feb 24, 2014 at 23:34
  • 1
    Thats NIC performance. To read and write the real world data you are limited by the SD card. So technically you can use a Gigabit USB NIC.. but only write at 8Megabytes (64mbits) max per second to the SD. And that is if the USB bus is idle. I can read data from my ZFS server to null at 80mbits using the built in NIC. But saving data to SD card it falls.
    – Piotr Kula
    Commented Feb 25, 2014 at 12:27
  • I updated my answer. I was rereading your question and realised you want to make something like a full blown router. I dont think you will get very far.
    – Piotr Kula
    Commented Feb 25, 2014 at 13:05
  • 1
    @goldilocks The SD card does not share the USB bus -- it is directly wired to the Broadcom BCM2835 SOC. However, the wired ethernet is connected via USB (it is on the LAN9512).
    – Craig
    Commented Feb 28, 2014 at 22:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.