this gist is part of this series
This fixes issues i bugged with the thunderbolt / thunderbolt-net maintainers (i will take everyones thanks now, lol)
- install lldpctl with
apt install lldpd
- add
thunderbolt
andthunderbolt-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 ;-)nano /etc/modules
add modules at bottom of file, one on each line- save using
x
theny
thenenter
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.
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
-
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 thanthe syslog
orlspci command
for troublehsooting thunderbolt issues and behavious. In my case my two pci paths are0000:00:0d.2
and0000: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. -
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
- 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
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).
- 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"
-
save the file
-
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
- 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
- make both scripts executable with
chmod +x /usr/local/bin/*.sh
- Reboot (restarting networking, init 1 and init 3 are not good enough, so reboot)
@scyto
Tip
today I figured out what is the best way to make sure everything is getting up and working again. (because I didn't know how to troubleshoot in the past I made about 4-5 reinstalls of my whole NUC Cluster.... that leads me to my own private gitea repo where I can copy paste most of the commands in a more easy way than here).
If you mind using this or even change parts of your commands, I want to post it here. Some parts are taken from other users ideas here.
Caution
This is done with the Intel NUCs that @scyto is using! I took the same IP-addresses/interface names.
It is all done with ONLY IPv4. No need for IPv6.
How to get Thunderbolt Network up and running
Main idea is from here, but I like to be able to copy paste a bit more comfortable.
Assumptions
This manual was used on Intel NUC 13th generation with 2 TB4 Ports.
On all Nodes
Optional package to track which node can see which other one.
Mandatory packages.
Add kernel modules.
Add the thunderbolt links.
Automatic setup of interface to be up after reboot or cable insertion.
Enable IPv4 forwarding.
Presetup and configuration of FRR.
Make sure interface is coming up!
Idea coming from here => https://gist.github.com/scyto/67fdc9a517faefa68f730f82d7fa3570?permalink_comment_id=5077802#gistcomment-5077802
Different settings per Node!
Adjust the
/etc/network/interfaces
. Remove any section that belongs to any auto added thunderbolt0 or thunderbolt1 interface.Node 1
Node 2
Node 3
Open VTYSH CLI.
vtysh
Enter config mode.
configure
Node 1
Node 2
Node 3
Time for the reboot.
Debugging