From 65ef59c61213f723dad421be357808606e693c72 Mon Sep 17 00:00:00 2001 From: Pim van Pelt Date: Tue, 18 Oct 2022 22:53:07 +0200 Subject: [PATCH] Add OVS configs for bird overlay --- overlays/bird/ovs-config.sh | 25 +++++++++++++++++++++++++ overlays/default/ovs-config.sh | 1 + 2 files changed, 26 insertions(+) create mode 100755 overlays/bird/ovs-config.sh create mode 120000 overlays/default/ovs-config.sh diff --git a/overlays/bird/ovs-config.sh b/overlays/bird/ovs-config.sh new file mode 100755 index 0000000..86265c4 --- /dev/null +++ b/overlays/bird/ovs-config.sh @@ -0,0 +1,25 @@ +#!/bin/sh +# +# OVS configuration for the `bird` overlay + +LAB=${LAB:=0} +for node in 0 1 2 3; do + for int in 0 1 2 3; do + ovs-vsctl set port vpp${LAB}-${node}-${int} vlan_mode=native-untagged + done +done + +# Uplink is VLAN 10 +ovs-vsctl add port vpp${LAB}-0-0 tag 10 + +# Link vpp${LAB}-0 <-> vpp${LAB}-1 in VLAN 20 +ovs-vsctl add port vpp${LAB}-0-1 tag 20 +ovs-vsctl add port vpp${LAB}-1-0 tag 20 + +# Link vpp${LAB}-1 <-> vpp${LAB}-2 in VLAN 21 +ovs-vsctl add port vpp${LAB}-1-1 tag 21 +ovs-vsctl add port vpp${LAB}-2-0 tag 21 + +# Link vpp${LAB}-2 <-> vpp${LAB}-3 in VLAN 22 +ovs-vsctl add port vpp${LAB}-2-1 tag 22 +ovs-vsctl add port vpp${LAB}-3-0 tag 22 diff --git a/overlays/default/ovs-config.sh b/overlays/default/ovs-config.sh new file mode 120000 index 0000000..810b9d7 --- /dev/null +++ b/overlays/default/ovs-config.sh @@ -0,0 +1 @@ +../bird/ovs-config.sh \ No newline at end of file