Unstable ethernet on N2+ when using dual ports

Post Reply
ASword
Posts: 223
Joined: Fri Aug 04, 2017 12:48 pm
languages_spoken: english
ODROIDs: XU4, HC1, 2x N2
Has thanked: 16 times
Been thanked: 6 times
Contact:

Unstable ethernet on N2+ when using dual ports

Post by ASword »

I've been experiencing network instability, such as SSH connections having long pauses and frequently dropping connection. My N2+ is on a gigabit Ethernet network, plus it has 2 USB SSDs (via the ODROID SATA/USB adapters), a USB-connected UPS, and a second Ethernet port via a USB adapter (on a 100MBps network). I had previously had an N2 in the same harness, without seeing any network problems. When I moved the newer N2+ into its place, I immediately noticed that both network connections were problematic. I unplugged the USB Ethernet adapter, and the problems went away. Any suggestions about what might be wrong or what to check?

Ubuntu 4.9.241-114

User avatar
odroid
Site Admin
Posts: 38033
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean
ODROIDs: ODROID
Has thanked: 1999 times
Been thanked: 1206 times
Contact:

Re: Unstable ethernet on N2+ when using dual ports

Post by odroid »

Keep measuring voltage on 5.0V rail on the 40pin GPIO ports with a DMM. It must be stable at 4.8Volt at least while you access the USB SSDs and USB Ethernet ports.
Was there any clue in 'dmesg' outputs?

User avatar
mad_ady
Posts: 9681
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, C4, N1, N2, H2, Go, Go Advance
Location: Bucharest, Romania
Has thanked: 609 times
Been thanked: 721 times
Contact:

Re: Unstable ethernet on N2+ when using dual ports

Post by mad_ady »

Check journalctl to see if network manager keeps flapping the links. Maybe you have DHCP servers on both nodes and both of them set the same layer3 subnet accross both links. This may cause flapping of your layer3 link.

User avatar
mctom
Posts: 438
Joined: Wed Nov 11, 2020 4:44 am
languages_spoken: english, polish
ODROIDs: N2+, Game Advance, a few XU4
Location: Gdansk, Poland
Has thanked: 48 times
Been thanked: 41 times
Contact:

Re: Unstable ethernet on N2+ when using dual ports

Post by mctom »

And check for differences in network configuration between old and new setup.
Punk ain't no religious cult, punk means thinking for yourself!

Maintainer of PiStackMon

ASword
Posts: 223
Joined: Fri Aug 04, 2017 12:48 pm
languages_spoken: english
ODROIDs: XU4, HC1, 2x N2
Has thanked: 16 times
Been thanked: 6 times
Contact:

Re: Unstable ethernet on N2+ when using dual ports

Post by ASword »

mad_ady wrote:
Tue Sep 14, 2021 1:57 pm
Check journalctl to see if network manager keeps flapping the links. Maybe you have DHCP servers on both nodes and both of them set the same layer3 subnet accross both links. This may cause flapping of your layer3 link.
Hmmm, that's interesting. I had both ports plugged into different switches on the same LAN, so both served by the same DHCP server. I had done this on the N2, but hadn't noticed any SSH instability. The N2+ immediately started having issues.

I've moved the N2+'s built-in (and now only) port to the second switch, and it seems fine. So the problem isn't the switches, it is either the USB Ethernet dongle (which was fine on the N2) or that I had 2 connections to the same network (which was also previously fine). It could also be the newer Ubuntu version, as the N2's version is close to the original ODROID release while the N2+ is on the version I quoted above.

(just updated to 4.9.277-117 and seems to be fine)

User avatar
mad_ady
Posts: 9681
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, C4, N1, N2, H2, Go, Go Advance
Location: Bucharest, Romania
Has thanked: 609 times
Been thanked: 721 times
Contact:

Re: Unstable ethernet on N2+ when using dual ports

Post by mad_ady »

Having two links with the same layer 2 and the same metric, even if it's different addresses can cause issues.
Consider this case: you ssh into IP1 via interface1, but the kernel sees your client IP best (or uses round robin because the destination has the same metric) via Interface2. It will then route traffic asymetrically, which can get dropped in certain cases.

Post Reply

Return to “Ubuntu”

Who is online

Users browsing this forum: No registered users and 3 guests