1.7 KiB
1.7 KiB
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.
on all Nodes
Optional package to track which node can see which other one.
apt install -y lldpd
Add kernel modules.
# remove empty lines
sed '/^$/d' /etc/modules > temp.txt && mv temp.txt /etc/modules
# add modules
tee -a /etc/modules <<EOF
thunderbolt
thunderbolt-net
EOF
Adjust the /etc/network/interfaces. Remove any section that belongs to any auto added thunderbolt0 or thunderbolt1 interface.
nano /etc/network/interfaces
allow-hotplug en05
iface en05 inet manual
mtu 65520
allow-hotplug en06
iface en06 inet manual
mtu 65520
Add the thunderbolt links.
tee -a /etc/systemd/network/00-thunderbolt0.link <<EOF
[Match]
Path=pci-0000:00:0d.2
Driver=thunderbolt-net
[Link]
MACAddressPolicy=none
Name=en05
EOF
tee -a /etc/systemd/network/00-thunderbolt1.link <<EOF
[Match]
Path=pci-0000:00:0d.3
Driver=thunderbolt-net
[Link]
MACAddressPolicy=none
Name=en06
EOF
Automatic setup of interface to be up after reboot or cable insertion.
tee -a /etc/udev/rules.d/10-tb-en.rules <<EOF
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"
EOF
tee -a /usr/local/bin/pve-en05.sh <<EOF
#!/bin/bash
/usr/sbin/ifup en05
EOF
tee -a /usr/local/bin/pve-en06.sh <<EOF
#!/bin/bash
/usr/sbin/ifup en06
EOF
chmod +x /usr/local/bin/pve-en05.sh
chmod +x /usr/local/bin/pve-en06.sh
Time for the first reboot.
/sbin/reboot