Regarding Two Devices creating latency on a single switch

0

I have scripts that run on bootup on two NAS's (let's say they're QNAPs) to create bonds and have different ips for different vlans.

ie- NAS 1 (all NICs bonded to 1 via TLB) set bond0 -> 0.0.0.0 or flush bond 0 vlan 50 140.100.100.1 subnet 255.255.0.0

NAS 2 (all NICs bonded to 1 via TLB) set bond0 -> 0.0.0.0 or flush bond 0 vlan 50 140.100.100.2 subnet 255.255.0.0

My switch config looks something like ports 1 and 2 untagged for vlan 50 ports 5 and 6 tagged (NAS 1 connected to port 5, NAS 2 connected to port 6, computer connected to port 1 with proper network adapter configuration)

My problem is that when both NAS's are plugged in and I ping both at the same time from the computer, I get huge latency (>=32ms) on the pings and pretty much any traffic going to either unit. The second I unplug one of the NAS, the other NAS ping drops to <1ms and I no longer have bad latency. Initially I thought that it may be a IP collision issue so I look at ifconfig of the NAS's on startup - turns out it is running something after my autorun script to set the bond0s to a factory ip (150.140.100.100). So I manually set the bond ip to something arbitrary and different for both NAS's, turn off the /etc/init.d/dhcpd.sh script and try to ping 140.100.100.1 and 140.100.100.2 - it works for a few minutes then it goes back to timing out and having bad latency. This time however, bond0 of both NAS's have different ips - and that's where I am really confused. Thanks for any help! Also, MAC addresses on all the NICS are all different.

Summary - How do I fix latency issue between two NAS units connected to the same switch despite having different bond ips?

kenten

Posted 2018-08-08T16:09:56.860

Reputation: 1

Answers

0

Bonding is used to make several LAN connections into a single virtual LAN connection. Packets send on the bond are distributed to all the LAN connections in turn, to increase bandwidth.

If you connected a single NAS to a single port, bonding makes no sense at all, and packet transfer will fail when using the other NICs, which is why you see the huge latency.

So either connect up all NICs that are bonded to the switch, or even better, connect all of them directly to the other bonding endpoint. Or don't use bonding.

If you connect them to the switch, you'll have to make sure that each bonded NIC port of the NAS is only connected to a single other bond, and all those ports go to the second end of your bond, where you have an identical bonding configuration.

I don't think VLAN works on the parts of the bond, and it wouldn't make sense, anyway - you can't get a bandwidth increase this way. Bonding should only be used on point-to-point connections.

dirkt

Posted 2018-08-08T16:09:56.860

Reputation: 11 627

Thanks for your answer, I appreciate it. So I have mirroring bonding configurations on both NAS and switch (LACP). I always thought LACP provided fault tolerance so thats why I was testing by just plugging in 1/4 NICs from each NAS to test. However, plugging in all the NICS from the NAS into a 4x trunked LACP set of ports on the switch fixed the problem temporarily and I had latency again down the line. I monitor the port traffic and it turns out the two NAS are looping to each other tons of ARP request/DHCP packets for an unknown reason to me. – kenten – 2018-08-15T19:50:58.423

Because I am using a unique distro of linux on these QNAPs, they do not have ip netns so I have to use a hacky way to make multiple VLANs the same IP - by creating a bridge, and adding the VLANS on bond0 to the bridge, and then stopping it from acting like a switch. The reason for the bond is to allow multiple VLANs to access the bonded channel, and while it wont increase bandwidth, I want each access to be as close as the max bandwidth of a single port when all VLANs are acessing at the same time. Also the bonding on both NAS and switch creates failover (unplugged cable or switch down, etc) – kenten – 2018-08-15T19:55:08.897

i should mention that I am trying to achieve double redundancy on everything, two NAS, two switch trunked together, and all NICS on NAS bonded together with multiple VLAN access. The NAS needs to access multiple vlans with one IP. This problem with the two NAS looping tons of packets is really setting me back though, literally 300k packets a second and clogging the network. All my bridge does is accept traffic going to itself, and reject traffic from being broadcasted to the other vlans on the bridge - so that doesnt explain the huge amount of ARP / DHCP because those rules govern ip packets – kenten – 2018-08-15T20:01:39.897

Sorry, I don't see how multiple VLAN access helps with redundancy. And if you want redundancy, make sure to use a backup policy for bonding, not some policy that focuses on increase throughput. And funny network setups which cause network clogging are not going to help. Keep it simple. – dirkt – 2018-08-16T08:46:40.103

sorry I misspoke, I meant to say bonded interfaces create redundancy via LACP or balance xor, etc - multiple vlan access is just a feature I need – kenten – 2018-08-16T17:33:04.730