Skip to content

Instantly share code, notes, and snippets.

@scyto
Last active May 16, 2024 12:15
Show Gist options
  • Save scyto/67fdc9a517faefa68f730f82d7fa3570 to your computer and use it in GitHub Desktop.
Save scyto/67fdc9a517faefa68f730f82d7fa3570 to your computer and use it in GitHub Desktop.
Thunderbolt Networking Setup

Thunderbolt Networking

this gist is part of this series

NOTE FOR THIS TO BE RELIABLE ON NODE RESTARTS YOU WILL NEED PROXMOX KERNEL 6.2.16-14-pve OR HIGER

This fixes issues i bugged with the thunderbolt / thunderbolt-net maintainers (i will take everyones thanks now, lol)

Install LLDP - this is great to see what nodes can see which.

  • install lldpctl with apt install lldpd

Load Kernel Modules

  • add thunderbolt and thunderbolt-net kernel modules (this must be done all nodes - yes i know it can sometimes work withoutm but the thuderbolt-net one has interesting behaviou' so do as i say - add both ;-)
    1. nano /etc/modules add modules at bottom of file, one on each line
    2. save using x then y then enter

Prepare /etc/network/interfaces

doing this means we don't have to give each thunderbolt a manual IPv6 addrees and that these addresses stay constant no matter what Add the following to each node using nano /etc/network/interfaces

If you see any sections called thunderbolt0 or thunderbol1 delete them at this point.

Now add the following (note we will set IP addresses in the UI):

allow-hotplug en05
iface en05 inet manual
       mtu 65520

iface en05 inet6 manual
        mtu 65520

allow-hotplug en06
iface en06 inet manual
        mtu 65520

iface en06 inet6 manual
        mtu 65520

If you see any thunderbol sections delete them from the file before you save it.

Rename Thunderbolt Connections

This is needed as proxmox doesn't recognize the thunderbolt interface name. There are various methods to do this. This method was selected after trial and error because:

  • the thunderboltX naming is not fixed to a port (it seems to be based on sequence you plug the cables in)
  • the MAC address of the interfaces changes with most cable insertion and removale events
  1. use udevadm monitor command to find your device IDs when you insert and remove each TB4 cable. Yes you can use other ways to do this, i recommend this one as it is great way to understand what udev does - the command proved more useful to me than the syslog or lspci command for troublehsooting thunderbolt issues and behavious. In my case my two pci paths are 0000:00:0d.2and 0000:00:0d.3 if you bought the same hardware this will be the same on all 3 units. Don't assume your PCI device paths will be the same as mine.

  2. create a link file using nano /etc/systemd/network/00-thunderbolt0.link and enter the following content:

[Match]
Path=pci-0000:00:0d.2
Driver=thunderbolt-net
[Link]
MACAddressPolicy=none
Name=en05
  1. create a second link file using nano /etc/systemd/network/00-thunderbolt1.link and enter the following content:
[Match]
Path=pci-0000:00:0d.3
Driver=thunderbolt-net
[Link]
MACAddressPolicy=none
Name=en06

Set Interfaces to UP on reboots and cable insertions

This section en sure that the interfaces will be brought up at boot or cable insertion with whatever settings are in /etc/network/interfaces - this shouldn't need to be done, it seems like a bug in the way thunderbolt networking is handled (i assume this is debian wide but haven't checked).

  1. create a udev rule to detect for cable insertion using nano /etc/udev/rules.d/10-tb-en.rules with the following content:
ACTION=="move", SUBSYSTEM=="net", KERNEL=="en05", RUN+="/usr/local/bin/pve-en05.sh"
ACTION=="move", SUBSYSTEM=="net", KERNEL=="en06", RUN+="/usr/local/bin/pve-en06.sh"
  1. save the file

  2. create the first script referenced above using nano /usr/local/bin/pve-en05.sh and with the follwing content:

#!/bin/bash

# this brings the renamed interface up and reprocesses any settings in /etc/network/interfaces for the renamed interface
/usr/sbin/ifup en05

save the file and then

  1. create the second script referenced above using nano /usr/local/bin/pve-en06.sh and with the follwing content:
#!/bin/bash

# this brings the renamed interface up and reprocesses any settings in /etc/network/interfaces for the renamed interface
/usr/sbin/ifup en06

and save the file

  1. make both scripts executable with chmod +x /usr/local/bin/*.sh
  2. Reboot (restarting networking, init 1 and init 3 are not good enough, so reboot)

Enabling IP Connectivity

proceed to the next gist

@scyto
Copy link
Author

scyto commented Jan 17, 2024

looks good

can you make sure you have this line at the end of the interfaces file, this was missing from my instructions (but is in my live system)

# This must be the last line in the file
post-up /usr/bin/systemctl restart frr.service

@jacoburgin
Copy link

What is the point of having IPV4 and IPV6 setup for the TB 10. network when if one fails it doesn't failover to the other? I'm still struggling to get IPV4 to come up on boot but should it not failover to IPV6 ?

@travisw3
Copy link

travisw3 commented Feb 5, 2024

Hello @scyto

Thanks for putting all this together, I have been setting up a cluster using 3 NUC 13 Pros and have made it to the end of this section (all TB4 connections made) however after rebooting the units I found that one of my connections is causing a hang during reboots and it was putting of quite a bit of heat looking at the udevadm monitor I get the following output

KERNEL[676.845850] add      /devices/pci0000:00/0000:00:0d.2/domain0/0-0/usb4_port1/0-0:1.1 (thunderbolt)
UDEV  [676.846221] add      /devices/pci0000:00/0000:00:0d.2/domain0/0-0/usb4_port1/0-0:1.1 (thunderbolt)
KERNEL[676.858735] add      /devices/pci0000:00/0000:00:0d.2/domain0/0-0/usb4_port1/0-0:1.1/nvm_active0 (nvmem)
KERNEL[676.858743] add      /devices/pci0000:00/0000:00:0d.2/domain0/0-0/usb4_port1/0-0:1.1/nvm_non_active0 (nvmem)
UDEV  [676.859085] add      /devices/pci0000:00/0000:00:0d.2/domain0/0-0/usb4_port1/0-0:1.1/nvm_active0 (nvmem)
UDEV  [676.859108] add      /devices/pci0000:00/0000:00:0d.2/domain0/0-0/usb4_port1/0-0:1.1/nvm_non_active0 (nvmem)
KERNEL[676.860384] remove   /devices/pci0000:00/0000:00:0d.2/domain0/0-0/usb4_port1/0-0:1.1/nvm_non_active0 (nvmem)
KERNEL[676.860395] remove   /devices/pci0000:00/0000:00:0d.2/domain0/0-0/usb4_port1/0-0:1.1/nvm_active0 (nvmem)
KERNEL[676.860404] remove   /devices/pci0000:00/0000:00:0d.2/domain0/0-0/usb4_port1/0-0:1.1 (thunderbolt)
UDEV  [676.860709] remove   /devices/pci0000:00/0000:00:0d.2/domain0/0-0/usb4_port1/0-0:1.1/nvm_non_active0 (nvmem)
UDEV  [676.860721] remove   /devices/pci0000:00/0000:00:0d.2/domain0/0-0/usb4_port1/0-0:1.1/nvm_active0 (nvmem)
UDEV  [676.860868] remove   /devices/pci0000:00/0000:00:0d.2/domain0/0-0/usb4_port1/0-0:1.1 (thunderbolt)
KERNEL[678.051243] add      /devices/pci0000:00/0000:00:0d.2/domain0/0-0/usb4_port1/0-0:1.1 (thunderbolt)
UDEV  [678.054194] add      /devices/pci0000:00/0000:00:0d.2/domain0/0-0/usb4_port1/0-0:1.1 (thunderbolt)
KERNEL[678.064379] add      /devices/pci0000:00/0000:00:0d.2/domain0/0-0/usb4_port1/0-0:1.1/nvm_active0 (nvmem)
KERNEL[678.064390] add      /devices/pci0000:00/0000:00:0d.2/domain0/0-0/usb4_port1/0-0:1.1/nvm_non_active0 (nvmem)
UDEV  [678.064583] add      /devices/pci0000:00/0000:00:0d.2/domain0/0-0/usb4_port1/0-0:1.1/nvm_active0 (nvmem)
UDEV  [678.064932] add      /devices/pci0000:00/0000:00:0d.2/domain0/0-0/usb4_port1/0-0:1.1/nvm_non_active0 (nvmem)
KERNEL[678.066627] remove   /devices/pci0000:00/0000:00:0d.2/domain0/0-0/usb4_port1/0-0:1.1/nvm_non_active0 (nvmem)
KERNEL[678.066635] remove   /devices/pci0000:00/0000:00:0d.2/domain0/0-0/usb4_port1/0-0:1.1/nvm_active0 (nvmem)
KERNEL[678.066644] remove   /devices/pci0000:00/0000:00:0d.2/domain0/0-0/usb4_port1/0-0:1.1 (thunderbolt)
UDEV  [678.066716] remove   /devices/pci0000:00/0000:00:0d.2/domain0/0-0/usb4_port1/0-0:1.1/nvm_non_active0 (nvmem)
UDEV  [678.066725] remove   /devices/pci0000:00/0000:00:0d.2/domain0/0-0/usb4_port1/0-0:1.1/nvm_active0 (nvmem)
UDEV  [678.066747] remove   /devices/pci0000:00/0000:00:0d.2/domain0/0-0/usb4_port1/0-0:1.1 (thunderbolt)
KERNEL[750.416859] add      /devices/pci0000:00/0000:00:0d.3/domain1/1-0/usb4_port1/1-0:1.1 (thunderbolt)
UDEV  [750.419547] add      /devices/pci0000:00/0000:00:0d.3/domain1/1-0/usb4_port1/1-0:1.1 (thunderbolt)
KERNEL[750.427347] add      /devices/pci0000:00/0000:00:0d.3/domain1/1-0/usb4_port1/1-0:1.1/nvm_active0 (nvmem)
KERNEL[750.427361] add      /devices/pci0000:00/0000:00:0d.3/domain1/1-0/usb4_port1/1-0:1.1/nvm_non_active0 (nvmem)
UDEV  [750.427671] add      /devices/pci0000:00/0000:00:0d.3/domain1/1-0/usb4_port1/1-0:1.1/nvm_active0 (nvmem)
UDEV  [750.427868] add      /devices/pci0000:00/0000:00:0d.3/domain1/1-0/usb4_port1/1-0:1.1/nvm_non_active0 (nvmem)
KERNEL[754.725589] change   /1-1 (thunderbolt)
UDEV  [754.728059] change   /1-1 (thunderbolt)
KERNEL[755.751440] add      /devices/pci0000:00/0000:00:0d.3/domain1/1-0/1-1 (thunderbolt)
KERNEL[755.751464] add      /devices/pci0000:00/0000:00:0d.3/domain1/1-0/1-1/1-1.0 (thunderbolt)
KERNEL[755.751473] add      /devices/pci0000:00/0000:00:0d.3/domain1/1-0/1-1/1-1.0/net/thunderbolt0 (net)
KERNEL[755.751479] add      /devices/pci0000:00/0000:00:0d.3/domain1/1-0/1-1/1-1.0/net/thunderbolt0/queues/rx-0 (queues)
KERNEL[755.751485] add      /devices/pci0000:00/0000:00:0d.3/domain1/1-0/1-1/1-1.0/net/thunderbolt0/queues/tx-0 (queues)
KERNEL[755.751492] bind     /devices/pci0000:00/0000:00:0d.3/domain1/1-0/1-1/1-1.0 (thunderbolt)
UDEV  [755.751957] add      /devices/pci0000:00/0000:00:0d.3/domain1/1-0/1-1 (thunderbolt)
UDEV  [755.752120] add      /devices/pci0000:00/0000:00:0d.3/domain1/1-0/1-1/1-1.0 (thunderbolt)
KERNEL[755.752988] move     /devices/pci0000:00/0000:00:0d.3/domain1/1-0/1-1/1-1.0/net/en06 (net)
UDEV  [755.779674] add      /devices/pci0000:00/0000:00:0d.3/domain1/1-0/1-1/1-1.0/net/en06 (net)
UDEV  [755.779884] add      /devices/pci0000:00/0000:00:0d.3/domain1/1-0/1-1/1-1.0/net/thunderbolt0/queues/rx-0 (queues)
UDEV  [755.780230] add      /devices/pci0000:00/0000:00:0d.3/domain1/1-0/1-1/1-1.0/net/thunderbolt0/queues/tx-0 (queues)
UDEV  [755.780506] bind     /devices/pci0000:00/0000:00:0d.3/domain1/1-0/1-1/1-1.0 (thunderbolt)
UDEV  [756.014526] move     /devices/pci0000:00/0000:00:0d.3/domain1/1-0/1-1/1-1.0/net/en06 (net)
KERNEL[853.208132] add      /devices/pci0000:00/0000:00:0d.2/domain0/0-0/usb4_port1/0-0:1.1 (thunderbolt)
UDEV  [853.210861] add      /devices/pci0000:00/0000:00:0d.2/domain0/0-0/usb4_port1/0-0:1.1 (thunderbolt)
KERNEL[853.219740] add      /devices/pci0000:00/0000:00:0d.2/domain0/0-0/usb4_port1/0-0:1.1/nvm_active1 (nvmem)
KERNEL[853.219748] add      /devices/pci0000:00/0000:00:0d.2/domain0/0-0/usb4_port1/0-0:1.1/nvm_non_active1 (nvmem)
UDEV  [853.220110] add      /devices/pci0000:00/0000:00:0d.2/domain0/0-0/usb4_port1/0-0:1.1/nvm_active1 (nvmem)
UDEV  [853.220489] add      /devices/pci0000:00/0000:00:0d.2/domain0/0-0/usb4_port1/0-0:1.1/nvm_non_active1 (nvmem)
KERNEL[853.221462] remove   /devices/pci0000:00/0000:00:0d.2/domain0/0-0/usb4_port1/0-0:1.1/nvm_non_active1 (nvmem)
KERNEL[853.221469] remove   /devices/pci0000:00/0000:00:0d.2/domain0/0-0/usb4_port1/0-0:1.1/nvm_active1 (nvmem)
KERNEL[853.221479] remove   /devices/pci0000:00/0000:00:0d.2/domain0/0-0/usb4_port1/0-0:1.1 (thunderbolt)
UDEV  [853.221698] remove   /devices/pci0000:00/0000:00:0d.2/domain0/0-0/usb4_port1/0-0:1.1/nvm_non_active1 (nvmem)
UDEV  [853.221707] remove   /devices/pci0000:00/0000:00:0d.2/domain0/0-0/usb4_port1/0-0:1.1/nvm_active1 (nvmem)
UDEV  [853.221827] remove   /devices/pci0000:00/0000:00:0d.2/domain0/0-0/usb4_port1/0-0:1.1 (thunderbolt)
KERNEL[855.475088] add      /devices/pci0000:00/0000:00:0d.2/domain0/0-0/usb4_port1/0-0:1.1 (thunderbolt)
UDEV  [855.475427] add      /devices/pci0000:00/0000:00:0d.2/domain0/0-0/usb4_port1/0-0:1.1 (thunderbolt)
KERNEL[855.485666] add      /devices/pci0000:00/0000:00:0d.2/domain0/0-0/usb4_port1/0-0:1.1/nvm_active1 (nvmem)
KERNEL[855.485676] add      /devices/pci0000:00/0000:00:0d.2/domain0/0-0/usb4_port1/0-0:1.1/nvm_non_active1 (nvmem)
UDEV  [855.485944] add      /devices/pci0000:00/0000:00:0d.2/domain0/0-0/usb4_port1/0-0:1.1/nvm_active1 (nvmem)
UDEV  [855.486058] add      /devices/pci0000:00/0000:00:0d.2/domain0/0-0/usb4_port1/0-0:1.1/nvm_non_active1 (nvmem)
KERNEL[855.487442] remove   /devices/pci0000:00/0000:00:0d.2/domain0/0-0/usb4_port1/0-0:1.1/nvm_non_active1 (nvmem)
KERNEL[855.487450] remove   /devices/pci0000:00/0000:00:0d.2/domain0/0-0/usb4_port1/0-0:1.1/nvm_active1 (nvmem)
UDEV  [855.487456] remove   /devices/pci0000:00/0000:00:0d.2/domain0/0-0/usb4_port1/0-0:1.1/nvm_non_active1 (nvmem)
KERNEL[855.487460] remove   /devices/pci0000:00/0000:00:0d.2/domain0/0-0/usb4_port1/0-0:1.1 (thunderbolt)
UDEV  [855.487579] remove   /devices/pci0000:00/0000:00:0d.2/domain0/0-0/usb4_port1/0-0:1.1/nvm_active1 (nvmem)
UDEV  [855.487608] remove   /devices/pci0000:00/0000:00:0d.2/domain0/0-0/usb4_port1/0-0:1.1 (thunderbolt)

In this section I took the cable out of one port and plugged it into the other.
I have tested this with multiple different cables and it seems as if I might have a bad port on this unit. I was just wondering if there is anything else I should be looking at before attempting to return this unit?

@DarkPhyber-hg
Copy link

Can anyone else confirm as a sanity check that the thunderbolt connections are half duplex? in other words 25gbps is only in one direction, but if you do a bidirection iperf3 test, each direction gets cut in half?

@debanyw
Copy link

debanyw commented Mar 8, 2024

I seem to have a similar problem to @markverg from a few months ago, where the short PCI IDs of the two USB4 ports are identical but the full paths are unique. The PCs I'm using are GEEKOM Mini IT13 units with the 13500H, so admittedly they're not official NUCs with Thunderbolt but I'm hoping they're close enough. I'm also using the latest Proxmox VE 8.1, with kernel 6.5.13-1-pve.

The interesting part is I created the systemd service files with the full path specified on all 3 nodes, but when I connect two nodes (with a USB-IF certified Thunderbolt 4 cable) I get no output from dmesg, udevadm, nothing. However, if I connect a node to my M3 macbook udevadm monitor shows the following events and it automatically creates a thunderbolt0 interface:

KERNEL[131.234763] add /devices/pci0000:00/0000:00:0d.3/domain1/1-0/usb4_port1/1-0:1.1 (thunderbolt)
UDEV [131.237647] add /devices/pci0000:00/0000:00:0d.3/domain1/1-0/usb4_port1/1-0:1.1 (thunderbolt)
KERNEL[131.246678] add /devices/pci0000:00/0000:00:0d.3/domain1/1-0/usb4_port1/1-0:1.1/nvm_active0 (nvmem)
KERNEL[131.246686] add /devices/pci0000:00/0000:00:0d.3/domain1/1-0/usb4_port1/1-0:1.1/nvm_non_active0 (nvmem)
UDEV [131.247007] add /devices/pci0000:00/0000:00:0d.3/domain1/1-0/usb4_port1/1-0:1.1/nvm_active0 (nvmem)
UDEV [131.247322] add /devices/pci0000:00/0000:00:0d.3/domain1/1-0/usb4_port1/1-0:1.1/nvm_non_active0 (nvmem)
KERNEL[133.843309] change /1-1 (thunderbolt)
UDEV [133.843605] change /1-1 (thunderbolt)
KERNEL[134.860067] add /devices/pci0000:00/0000:00:0d.3/domain1/1-0/1-1 (thunderbolt)
KERNEL[134.860086] add /devices/pci0000:00/0000:00:0d.3/domain1/1-0/1-1/1-1.0 (thunderbolt)
KERNEL[134.860091] add /devices/pci0000:00/0000:00:0d.3/domain1/1-0/1-1/1-1.0/net/thunderbolt0 (net)
KERNEL[134.860095] add /devices/pci0000:00/0000:00:0d.3/domain1/1-0/1-1/1-1.0/net/thunderbolt0/queues/rx-0 (queues)
KERNEL[134.860098] add /devices/pci0000:00/0000:00:0d.3/domain1/1-0/1-1/1-1.0/net/thunderbolt0/queues/tx-0 (queues)
KERNEL[134.860223] bind /devices/pci0000:00/0000:00:0d.3/domain1/1-0/1-1/1-1.0 (thunderbolt)
UDEV [134.863026] add /devices/pci0000:00/0000:00:0d.3/domain1/1-0/1-1 (thunderbolt)
UDEV [134.863319] add /devices/pci0000:00/0000:00:0d.3/domain1/1-0/1-1/1-1.0 (thunderbolt)
UDEV [134.869495] add /devices/pci0000:00/0000:00:0d.3/domain1/1-0/1-1/1-1.0/net/thunderbolt0 (net)
UDEV [134.869801] add /devices/pci0000:00/0000:00:0d.3/domain1/1-0/1-1/1-1.0/net/thunderbolt0/queues/rx-0 (queues)
UDEV [134.870098] add /devices/pci0000:00/0000:00:0d.3/domain1/1-0/1-1/1-1.0/net/thunderbolt0/queues/tx-0 (queues)
UDEV [134.870399] bind /devices/pci0000:00/0000:00:0d.3/domain1/1-0/1-1/1-1.0 (thunderbolt)
KERNEL[180.904358] remove /devices/pci0000:00/0000:00:0d.3/domain1/1-0/usb4_port1/1-0:1.1/nvm_non_active0 (nvmem)
KERNEL[180.904375] remove /devices/pci0000:00/0000:00:0d.3/domain1/1-0/usb4_port1/1-0:1.1/nvm_active0 (nvmem)
KERNEL[180.904382] remove /devices/pci0000:00/0000:00:0d.3/domain1/1-0/usb4_port1/1-0:1.1 (thunderbolt)
KERNEL[180.904519] remove /devices/pci0000:00/0000:00:0d.3/domain1/1-0/1-1/1-1.0/net/thunderbolt0/queues/rx-0 (queues)
KERNEL[180.904533] remove /devices/pci0000:00/0000:00:0d.3/domain1/1-0/1-1/1-1.0/net/thunderbolt0/queues/tx-0 (queues)
KERNEL[180.904541] remove /devices/pci0000:00/0000:00:0d.3/domain1/1-0/1-1/1-1.0/net/thunderbolt0 (net)
UDEV [180.907119] remove /devices/pci0000:00/0000:00:0d.3/domain1/1-0/usb4_port1/1-0:1.1/nvm_non_active0 (nvmem)
UDEV [180.907213] remove /devices/pci0000:00/0000:00:0d.3/domain1/1-0/usb4_port1/1-0:1.1/nvm_active0 (nvmem)
UDEV [133.843605] change /1-1 (thunderbolt)
KERNEL[134.860067] add /devices/pci0000:00/0000:00:0d.3/domain1/1-0/1-1 (thunderbolt)
KERNEL[134.860086] add /devices/pci0000:00/0000:00:0d.3/domain1/1-0/1-1/1-1.0 (thunderbolt)
KERNEL[134.860091] add /devices/pci0000:00/0000:00:0d.3/domain1/1-0/1-1/1-1.0/net/thunderbolt0 (net)
KERNEL[134.860095] add /devices/pci0000:00/0000:00:0d.3/domain1/1-0/1-1/1-1.0/net/thunderbolt0/queues/rx-0 (queues)
KERNEL[134.860098] add /devices/pci0000:00/0000:00:0d.3/domain1/1-0/1-1/1-1.0/net/thunderbolt0/queues/tx-0 (queues)
KERNEL[134.860223] bind /devices/pci0000:00/0000:00:0d.3/domain1/1-0/1-1/1-1.0 (thunderbolt)
UDEV [134.863026] add /devices/pci0000:00/0000:00:0d.3/domain1/1-0/1-1 (thunderbolt)
UDEV [134.863319] add /devices/pci0000:00/0000:00:0d.3/domain1/1-0/1-1/1-1.0 (thunderbolt)
UDEV [134.869495] add /devices/pci0000:00/0000:00:0d.3/domain1/1-0/1-1/1-1.0/net/thunderbolt0 (net)
UDEV [134.869801] add /devices/pci0000:00/0000:00:0d.3/domain1/1-0/1-1/1-1.0/net/thunderbolt0/queues/rx-0 (queues)
UDEV [134.870098] add /devices/pci0000:00/0000:00:0d.3/domain1/1-0/1-1/1-1.0/net/thunderbolt0/queues/tx-0 (queues)
UDEV [134.870399] bind /devices/pci0000:00/0000:00:0d.3/domain1/1-0/1-1/1-1.0 (thunderbolt)

I'm honestly stumped here, I have no idea why the nodes won't pick each other up but they will pick up some other device. It's baffling. If anyone has any ideas I'd greatly appreciate it.

@logiota
Copy link

logiota commented Apr 10, 2024

is it technically possible to use an intel i5 system as a thunderbolt switch with full lan access with proxmox?
cheaper than a 10gbe switch, you don't need a 10gbe card and you kind of get "PoE"

@scyto
Copy link
Author

scyto commented Apr 10, 2024

the TB mesh is effectively a router comprised of 3 nodes (not a switch) - you can absolutely access the mesh from the LAN so long as nodes on your LAN know how to reach the mesh next hop.

so for example on my router i have this, it lets any node on my LAN access any of the mesh interfaces
(i note my unifi router just added OSPF so one option would be to setup OSPF in FRR too so i don't need to maintain the static routes)

image

@scyto
Copy link
Author

scyto commented Apr 10, 2024

Can anyone else confirm as a sanity check that the thunderbolt connections are half duplex? in other words 25gbps is only in one direction, but if you do a bidirection iperf3 test, each direction gets cut in half?

correct half duplex is my understanding

also with one iperf if you are seeing more than ~27gbps i would be very surprised and would lilke to know your hardware!

@scyto
Copy link
Author

scyto commented Apr 10, 2024

changed auto to allow-hotplug
maybe needed on later kernels for reliability

@rlabusiness
Copy link

rlabusiness commented Apr 10, 2024

@scyto Is there a reason you don't have the following lines in the interfaces modifications above? You have one for en05, but not en06.

iface en06 inet6 manual
mtu 65520

@scyto
Copy link
Author

scyto commented Apr 11, 2024

@scyto Is there a reason you don't have the following lines in the interfaces modifications above? You have one for en05, but not en06.

iface en06 inet6 manual mtu 65520

fixed, i need to be more careful cutting and pasting ;-)

@jackzjh001
Copy link

@scyto Are you getting normal speed of thunderbolt network connection? I'm using the latest PVE8.1 with linux kernel 6.5, but the iperf3 shows the speed between it and a windows pc at only 40-60Mbps.

@scyto
Copy link
Author

scyto commented Apr 14, 2024

Are you getting normal speed of thunderbolt network connection?

on 6.5.13-3-pve yes i am seeing 26.7Gbps

Look at the spoiler section here https://forum.proxmox.com/threads/intel-nuc-13-pro-thunderbolt-ring-network-ceph-cluster.131107/post-652551, oddly i did see a drop to 18gbps in one direction and someone one saw a drop to 21gbps

@JamesTurland
Copy link

I have the same problem @debanyw and @markverg - same PCIe device except a minor difference in the full path. I'm unable to link with permanentMACAddress as it changes (go figure...). I'm not sure what to do.

/devices/pci0000:00/0000:00:0d.2/consumer:pci:0000:00:07.1

@Allistah
Copy link

Allistah commented May 15, 2024

I was able to get all of this networking done without much trouble. I only have a 2-node cluster right now on two NUC 13 Pro units. I'll be adding the third one in a couple months. I did all of mine using IPv4 and removed all of the IPv6 stuff. Shutting the cluster fully off and restarting node 1, then node 2 after 1 was up and running was no problem. The interfaces all came back up. Unplugging and re-plugging the cables in also recover without any trouble. I did use a fix in the comments in the next gist to get that recovery to work which is here: https://gist.github.com/scyto/4c664734535da122f4ab2951b22b2085?permalink_comment_id=5021706#gistcomment-5021706

While implementing this specific gist/section, I noticed that the PCI port addresses on mine seemed to be backwards from what this gist was saying which I thought was interesting since we both have NUCs. Node 1, Port 1, en05 had a PCI address of "pci-0000:00:0d.3" instead of .2. Node 1, Port 2, en06 had the address ending in .2. This is opposite of what is detailed in this gist. So for those of you following this gist, make sure you look at what your machine is showing you for these addresses and don't copy exactly what is shown on this page. Each machine can be different from those of the author or myself.

I made sure to use the right kernel that gives 26Gb speeds (v6.5.13-5) and I have had no problems so far. Apparently the latest kernels available as of today (May 15th, 2024) have some issues with degraded speeds. Looks like there must be a regression in the kernel somewhere. Rolling back to 6.5.13-5 works great. Not sure how we would go about reporting this to get it fixed but it would probably be a good idea. (@scyto, how do we do this?)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment