last day (30 days later) » 

7:12 AM
0
Q: Fast IP Forwarding to WAN, but falls off cliff between LAN subnets

HuckleI replaced my consumer wireless router with a linux box that has a quad-gigabit NIC PCIe card and a single gigabit NIC on the motherboard (for the WAN). After turning on IP forwarding, masquerading (via iptables), and setting up subnets on each of the four LAN interfaces I ran some speed tests. ...

 
@DavidSchwartz Four subnets, with the interfaces configured as 10.0.0.1, 10.64.0.1, 10.128.0.1, and 10.192.0.1.
 
Please give an ifconfig -a or ip addr. Looking for mac addresses on the quad NIC.
Also where is the wireless coming from? Could you do an iperf3 between wired hosts connected to different interfaces?
 
@Pedro - retested from two wired devices both directly attached on different subnets (no layer 2 switch this time on the one subnet). Essentially identical results
@DavidSchwartz Yes, the idea will be to eventually firewall one of the subnets to just WAN access and then firewall one of the others to just allow access to certain ports -- but this point iptables is as bare as possible to reduce variables, and I'm sure I've reloaded it's configuration.
 
Could you run the iperf3 with --bandwidth at a couple points like 20m, 40m, and 80m and see if those eventually slow down? This will show if you're overflowing a buffer on the router.
 
@Pedro OUI of one of the quad NICs is in the lshw output. The card is an HP NC364T
@Pedro 20 Mbps and 10 Mbps tests posted. 20 is a no-go. Seems to sustain 10. Breaks down around 12.
 
7:12 AM
Can you please do a full bandwidth iperf from a host on enp3s0f0 to one on enp3s0f1, enp3s0f1/enp4s0f1, and enp3s0f0/enp4s0f1 to see if one of the ports is bad?
On the NC364T, can you just verify that the mac addresses are different for each port? It looks like you're only using two of the ports enp3s0f0 and enp3s0f1, correct?
These results are unexpected. I would expect a buffer overflow to crash after a consistent amount of data has transferred. The more you limit the bandwidth, the more I expect to squeak through before overflowing. However I see 40mb at ~80mbps and only ~14mb at 20mbps.
Your information about duplicate packets makes me suspect the quad NIC isn't behaving exactly like four normal NICs, but doing some deception.
 
$ ip link

3: enp3s0f0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP mode DEFAULT group default qlen 1000
link/ether 00:26:55:00:00:01 brd ff:ff:ff:ff:ff:ff
4: enp3s0f1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP mode DEFAULT group default qlen 1000
link/ether 00:26:55:00:00:00 brd ff:ff:ff:ff:ff:ff
5: enp4s0f0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc fq_codel state DOWN mode DEFAULT group default qlen 1000
link/ether 00:26:55:00:00:03 brd ff:ff:ff:ff:ff:ff
I ran tests between each of the three subnets I have hooked up to each of the others. Similar behavior where it starts strong and then falls over after a few seconds
Doing longer 60 second tests, it looks like it actually oscilates
Still finishing the matrix, but every 12-15 seconds the speed comes back for a second or two
Here's the full matrix of router against all three subnets and then the permutations of the subnets against each other: pastebin.com/HqLTNSWM
@Pedro
 
7:53 AM
Okay, so those four interfaces are the four on your quad NIC. You have another NIC on the motherboard that is presumably connected to your internet modem and doing pppoe. Could you plug in a host on that interface and do an iperf across there? Also fine would be doing an iperf over the uplink if you have a host outside.
With oscillation you can't rule out a buffer problem, but you should get way more data than that through and it shouldn't take 12 seconds of silence to catch up.
Also to clarify I mean iperf from a host on the 4xNIC to a host on the 1xNIC. Don't need any more from the router to hosts, those all appear to be good.
 
You're correct, I'm using three of the four NICs on the quad-nic card for LANs. The fourth is not connected. The WAN NIC is on the motherboard. I have an EC2 instance that I can quickly test from.
From 10.0.0.0/16 to host on WAN I get 40 Mbps / 5 Mbps as expected
Same from 10.192.x.x network to WAN
Both sustained each direction for a minute
 
8:09 AM
You did that with iperf or something else?
 
Also with iperf3
 
And you ran it for a good amount of time?
 
10.64/16 is running now and early results look good
60 seconds
I'm going to start an RMA process on this card I think.
 
Unfortunately I would guess this is a bug with the driver for the 4xNIC or a problem with the card.
Do you happen to have a second one you could swap?
 
Unfortunately not
Thanks for the help anyway.
 
8:13 AM
The fact that the card works from router to host makes me think it's a bug in the driver.
uname -a?
or uname -v really
 
4.15.2-2-ARCH #1 SMP PREEMPT Thu Feb 8 18:54:52 UTC 2018
Driver is the e1000e driver
Which is fairly well traveled
Of course, the single-NIC code path is well tested. Who knows about these more exotic cards
 
Exactly
 
But quad gigabit was industry standard, what, like a decade ago
 

  last day (30 days later) »