From 43a90805ef7f561f348fa486acdfa7d6e0c50455 Mon Sep 17 00:00:00 2001 From: Damien Date: Sat, 29 Nov 2025 19:59:06 +0000 Subject: [PATCH] Configure interfaces for bonding and VLANs Adds bonding and VLAN configuration to host interfaces files and configures the clab yaml to load the modules. --- evpn-lab.clab.yml | 10 ++++++---- hosts/host1_interfaces | 9 ++++++++- hosts/host2_interfaces | 3 ++- hosts/host3_interfaces | 3 ++- hosts/host4_interfaces | 3 ++- 5 files changed, 20 insertions(+), 8 deletions(-) diff --git a/evpn-lab.clab.yml b/evpn-lab.clab.yml index 83b70f8..075da54 100644 --- a/evpn-lab.clab.yml +++ b/evpn-lab.clab.yml @@ -93,7 +93,9 @@ topology: binds: - hosts/host2_interfaces:/etc/network/interfaces exec: - - apk add --no-cache ifupdown bonding vlan + - apk add --no-cache ifupdown + - apk add --no-cache vlan + - apk add --no-cache bonding - modprobe bonding - modprobe 8021q - ifup -a @@ -162,15 +164,15 @@ topology: # host1 dual-homed to leaf1 + leaf2 - endpoints: ["leaf1:eth1", "host1:eth1"] - endpoints: ["leaf2:eth1", "host1:eth2"] - + # host2 dual-homed to leaf3 + leaf4 - endpoints: ["leaf3:eth1", "host2:eth1"] - endpoints: ["leaf4:eth1", "host2:eth2"] - + # host3 dual-homed to leaf5 + leaf6 - endpoints: ["leaf5:eth1", "host3:eth1"] - endpoints: ["leaf6:eth1", "host3:eth2"] - + # host4 dual-homed to leaf7 + leaf8 - endpoints: ["leaf7:eth1", "host4:eth1"] - endpoints: ["leaf8:eth1", "host4:eth2"] diff --git a/hosts/host1_interfaces b/hosts/host1_interfaces index 3306787..5999095 100644 --- a/hosts/host1_interfaces +++ b/hosts/host1_interfaces @@ -2,10 +2,17 @@ auto lo iface lo inet loopback auto bond0 -iface bond0 + iface bond0 inet manual use bond bond-slaves eth1 eth2 bond-mode 802.3ad bond-miimon 100 bond-lacp-rate fast up ip link set $IFACE up + +auto bond0.40 + iface bond0.40 inet static + address 10.34.34.102 + netmask 255.255.255.0 + vlan-raw-device bond0 + up ip link set $IFACE up diff --git a/hosts/host2_interfaces b/hosts/host2_interfaces index 6deabf5..a3fa941 100644 --- a/hosts/host2_interfaces +++ b/hosts/host2_interfaces @@ -2,9 +2,10 @@ auto lo iface lo inet loopback auto bond0 -iface bond0 + iface bond0 inet manual use bond bond-slaves eth1 eth2 bond-mode 802.3ad bond-miimon 100 bond-lacp-rate fast + up ip link set $IFACE up diff --git a/hosts/host3_interfaces b/hosts/host3_interfaces index 6deabf5..a3fa941 100644 --- a/hosts/host3_interfaces +++ b/hosts/host3_interfaces @@ -2,9 +2,10 @@ auto lo iface lo inet loopback auto bond0 -iface bond0 + iface bond0 inet manual use bond bond-slaves eth1 eth2 bond-mode 802.3ad bond-miimon 100 bond-lacp-rate fast + up ip link set $IFACE up diff --git a/hosts/host4_interfaces b/hosts/host4_interfaces index 6deabf5..a3fa941 100644 --- a/hosts/host4_interfaces +++ b/hosts/host4_interfaces @@ -2,9 +2,10 @@ auto lo iface lo inet loopback auto bond0 -iface bond0 + iface bond0 inet manual use bond bond-slaves eth1 eth2 bond-mode 802.3ad bond-miimon 100 bond-lacp-rate fast + up ip link set $IFACE up