0

I've just finished rebuilding my NAS, now using an Intel-based SBC with two Realtek ethernet ports (Odroid H2 for those interested). Everything worked fine so far, up until I tried to use both ethernet ports in a bridge to maximize local network bandwidth (this NAS will be used to stream multiple 4K streams locally).

Setup of hardware is simple: the H2, with a 256GB NVMe SSD in the M.2 slot, two HDDs connected to the two SATA ports, and the two ethernet ports are slotted on my router's (HyperOptic's modem+router combo Tilgin HG2381) first two LAN ports.

Software-wise it's also simple: regular Ubuntu Server 19.04 install on the SSD, where I store my cloud stuff, Docker's stuff (images, config folders), etc.; and the two HDDs are in a RAID0 array with a single XFS partition for storage of media. Data loss is not a danger, as I do not care much about the content on the HDDs, and the docker configs (the irreplaceable bit) is backed up daily to Google Drive.

I've purged cloud-init from the system, and set the netplan renderer to NetworkManager, so that I could use Cockpit's web interface for management of all. Extra networking software installed is zerotier, which I found to be the most simple to set up and manage.

The two separate network interfaces work well, but the device gets two separate IPs. I wish to treat this connection as a single interface with load balancing, so I've created a bridge out of the two and set a static IPv4 address to it. The moment this network configuration is activated, the whole local network dies - WiFi, internet access, local network access, everything. While I do enjoy the discovery of this kill switch, I'd really like to fix it.

The current NetworkManager configs:

Wired connection 1:

[connection]
id=Wired connection 1
uuid=8d403f31-b593-38b7-a177-62d26ac8604c
type=ethernet
autoconnect-priority=-999
master=bridge0
permissions=
slave-type=bridge
timestamp=1565379408

[ethernet]
mac-address=00:1E:06:45:06:C1
mac-address-blacklist=

Wired connection 2:

[connection]
id=Wired connection 2
uuid=a440422a-941f-32c0-8863-5b35e3a9cd12
type=ethernet
autoconnect-priority=-999
master=bridge0
permissions=
slave-type=bridge
timestamp=1565379408

[ethernet]
mac-address=00:1E:06:45:06:C2
mac-address-blacklist=

bridge0:

[connection]
id=bridge0
uuid=c60701c0-12f2-4624-a6d0-4f0ba327445f
type=bridge
autoconnect-slaves=1
interface-name=bridge0
permissions=
timestamp=1565379708

[bridge]
stp=false

[ipv4]
address1=192.168.1.75/24,192.168.1.1
dns=1.1.1.1;1.0.0.1;
dns-search=
method=manual

[ipv6]
addr-gen-mode=stable-privacy
dns-search=
method=auto

At first look I do not see any issue here, however I'm nowhere near even a NetworkManager adept (I'm still familiarizing myself with it, after almost exclusively using /etc/network/interfaces - not many embedded devices have fully blown fancy-pants network management systems, even routers!). Is there something wrong with my network config, or is it the router not handling a bridged interface well?

3
  • 1
    You don't want to bridge the ports, you want to bond them. Bridging (with spanning tree turned off, as you have it) will create a bridge loop, where both the NAS and the actual switch forward traffic infinitely back & forth between the two cables. You need to set up port bonding on both the Ununtu NAS and the switch. If the switch doesn't support this, I don't think there's a way to do it. – Gordon Davisson Aug 10 '19 at 5:18
  • @GordonDavisson That's not a comment! That's an answer! Please post one, ping me and I'll come back and upvote! 0:-) ;-) – Fabby Aug 10 '19 at 18:41
  • @Fabby I've expanded my comment into something more answer-like. – Gordon Davisson Aug 10 '19 at 20:53
2

You don't want to bridge the ports, you want to bond them. Bridging allows the computer to receive packets (technically frames) on one port, and forward them out the other, which isn't what you want at all.

Bonding tells the computer to transmit frames over one port or the other (based on a policy you can configure), and the switch to do the same back at the computer. It's normally done using the IEEE 802.3ad protocol. You need to set it up on both the NAS computer and the switch. If the switch doesn't support IEEE 802.3ad, I don't think there's a way to make it work.

BTW, the reason the network died when you hooked it up in bridge mode is that connecting two bridges/switches by multiple links (with spanning tree turned off, as you have it) creates a switch loop, where both the NAS and the actual switch forward traffic infinitely back & forth between the two cables, consuming all bandwidth and effectively killing the network. The spanning tree protocol is designed specifically to prevent this problem; if you turn it off, you take on responsibility for creating a loop-free network.

1
  • As promised! :-) – Fabby Aug 10 '19 at 21:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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