Skip to content

Instantly share code, notes, and snippets.

@Allistah
Last active August 21, 2024 01:58
Show Gist options
  • Save Allistah/9455cf967f551326aa215fa0f7abe434 to your computer and use it in GitHub Desktop.
Save Allistah/9455cf967f551326aa215fa0f7abe434 to your computer and use it in GitHub Desktop.
Proxmox Thunderbolt Mesh Configs (3x Intel NUC 13 Pro)
pmx-node01, pmx-node02, pmx-node03:
nano /etc/udev/rules.d/10-tb-en.rules
====================================
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"
pmx-node01:
nano /etc/frr/frr.conf
====================================
frr version 8.5.2
frr defaults traditional
hostname pve-node01
log syslog informational
no ipv6 forwarding
service integrated-vtysh-config
!
interface en05
ip router openfabric 1
exit
!
interface en06
ip router openfabric 1
exit
!
interface lo
ip router openfabric 1
openfabric passive
exit
!
router openfabric 1
net 49.0000.0000.0001.00
exit
!
pmx-node02:
nano /etc/frr/frr.conf
====================================
frr version 8.5.2
frr defaults traditional
hostname pve-node02
log syslog informational
no ipv6 forwarding
service integrated-vtysh-config
!
interface en05
ip router openfabric 1
exit
!
interface en06
ip router openfabric 1
exit
!
interface lo
ip router openfabric 1
openfabric passive
exit
!
router openfabric 1
net 49.0000.0000.0002.00
exit
!
pmx-node03:
nano /etc/frr/frr.conf
====================================
frr version 8.5.2
frr defaults traditional
hostname pve-node03
log syslog informational
no ipv6 forwarding
service integrated-vtysh-config
!
interface en05
ip router openfabric 1
exit
!
interface en06
ip router openfabric 1
exit
!
interface lo
ip router openfabric 1
openfabric passive
exit
!
router openfabric 1
net 49.0000.0000.0003.00
exit
!
pmx-node01:
nano /etc/network/interfaces
====================================
auto lo
iface lo inet loopback
### Added for Thunderbolt Networking ###
auto lo:0
iface lo:0 inet static
address 10.0.0.81/32
iface enp86s0 inet manual
iface wlo1 inet manual
allow-hotplug en05
iface en05 inet manual
mtu 65520
allow-hotplug en06
iface en06 inet manual
mtu 65520
###########################
auto vmbr0
iface vmbr0 inet static
address 10.16.30.21/24
gateway 10.16.30.1
bridge-ports enp86s0
bridge-stp off
bridge-fd 0
bridge-vlan-aware yes
bridge-vids 10,20,35
source /etc/network/interfaces.d/*
pmx-node02:
nano /etc/network/interfaces
====================================
auto lo
iface lo inet loopback
auto lo:0
iface lo:0 inet static
address 10.0.0.82/32
iface enp86s0 inet manual
iface wlo1 inet manual
allow-hotplug en05
iface en05 inet manual
mtu 65520
allow-hotplug en06
iface en06 inet manual
mtu 65520
##########################
auto vmbr0
iface vmbr0 inet static
address 10.16.30.22/24
gateway 10.16.30.1
bridge-ports enp86s0
bridge-stp off
bridge-fd 0
bridge-vlan-aware yes
bridge-vids 10,20,35
source /etc/network/interfaces.d/*
pmx-node03:
nano /etc/network/interfaces
====================================
auto lo:0
iface lo:0 inet static
address 10.0.0.83/32
iface enp86s0 inet manual
iface wlo1 inet manual
allow-hotplug en05
iface en05 inet manual
mtu 65520
allow-hotplug en06
iface en06 inet manual
mtu 65520
###########################
auto vmbr0
iface vmbr0 inet static
address 10.16.30.23/24
gateway 10.16.30.1
bridge-ports enp86s0
bridge-stp off
bridge-fd 0
bridge-vlan-aware yes
bridge-vids 10,20,35
source /etc/network/interfaces.d/*
pmx-node01, pmx-node02, pmx-node03:
nano /etc/modules
------------------------------------
thunderbolt-net
pmx-node01, pmx-node02, pmx-node03:
nano /usr/local/bin/pve-en05.sh
====================================
#!/bin/bash
# this brings the renamed interface up and reprocesses any settings in /etc/network/interfaces
/usr/sbin/ifup en05
pmx-node01, pmx-node02, pmx-node03:
nano /usr/local/bin/pve-en06.sh
====================================
#!/bin/bash
# this brings the renamed interface up and reprocesses any settings in /etc/network/interfaces
/usr/sbin/ifup en06
pmx-node01, pmx-node02, pmx-node03:
nano /etc/network/if-up.d/restart-frr
====================================
#!/bin/sh
# Check if the interface is either en05 or en06
if [ "$IFACE" = "en05" ] || [ "$IFACE" = "en06" ]; then
# Restart the frr service
/usr/bin/systemctl restart frr.service
fi
pmx-node01, pmx-node02, pmx-node03:
nano /etc/sysctl.conf
====================================
net.ipv4.ip_forward=1
pmx-node01, pmx-node02, pmx-node03:
nano /etc/init.d/thunderbolt-affinity
====================================
chmod +x /etc/init.d/thunderbolt-affinity
update-rc.d thunderbolt-affinity defaults (Run once after creating this file)
systemctl start thunderbolt-affinity.service (Run after the above line is done)
File Contents:
-----------------
#!/bin/bash
for id in $(grep 'thunderbolt' /proc/interrupts | awk '{print $1}' | cut -d ':' -f1); do
echo 0f > /proc/irq/$id/smp_affinity
done
pmx-node01, pmx-node02, pmx-node03:
nano /etc/network/if-up.d/thunderbolt-affinity
====================================
chmod +x /etc/network/if-up.d/thunderbolt-affinity
File Contents:
-----------------
#!/bin/bash
for id in $(grep 'thunderbolt' /proc/interrupts | awk '{print $1}' | cut -d ':' -f1); do
echo 0f > /proc/irq/$id/smp_affinity
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment