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 :)

Nanzikambe
  • 83
  • 1
  • 5

1 Answers1

3

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.

Piotr Kula
  • 17,336
  • 6
  • 66
  • 105