From 24a364bfcb7419acb8cde20913558be7525ffc7b Mon Sep 17 00:00:00 2001 From: Lyanis Souidi Date: Thu, 19 Sep 2024 01:25:09 +0200 Subject: [PATCH] scripts --- gatekeeper/rohannet.service | 10 ---------- rohan-net/rohan-net.service | 11 +++++++++++ .../rohan-net_setup_gatekeeper.sh | 9 +++++---- rohan-net/rohan-net_setup_yavanna.sh | 13 +++++++++++++ 4 files changed, 29 insertions(+), 14 deletions(-) delete mode 100644 gatekeeper/rohannet.service create mode 100644 rohan-net/rohan-net.service rename gatekeeper/rohannet_setup.sh => rohan-net/rohan-net_setup_gatekeeper.sh (74%) create mode 100644 rohan-net/rohan-net_setup_yavanna.sh diff --git a/gatekeeper/rohannet.service b/gatekeeper/rohannet.service deleted file mode 100644 index dbb8cb1..0000000 --- a/gatekeeper/rohannet.service +++ /dev/null @@ -1,10 +0,0 @@ -[Unit] -Description=Connexion à RohanNet - -[Service] -Type=oneshot -RemainAfterExit=yes -ExecStart=/bin/bash /usr/lib/systemd/scripts/rohannet_setup.sh - -[Install] -WantedBy=multi-user.target diff --git a/rohan-net/rohan-net.service b/rohan-net/rohan-net.service new file mode 100644 index 0000000..bd4c653 --- /dev/null +++ b/rohan-net/rohan-net.service @@ -0,0 +1,11 @@ +[Unit] +Description=Connexion à Rohan-Net + +[Service] +Type=oneshot +RemainAfterExit=yes +#ExecStart=/bin/bash /usr/lib/systemd/scripts/rohan-net_setup_gatekeeper.sh +#ExecStart=/bin/bash /usr/lib/systemd/scripts/rohan-net_setup_yavanna.sh + +[Install] +WantedBy=multi-user.target diff --git a/gatekeeper/rohannet_setup.sh b/rohan-net/rohan-net_setup_gatekeeper.sh similarity index 74% rename from gatekeeper/rohannet_setup.sh rename to rohan-net/rohan-net_setup_gatekeeper.sh index c37bb9c..888e928 100644 --- a/gatekeeper/rohannet_setup.sh +++ b/rohan-net/rohan-net_setup_gatekeeper.sh @@ -2,20 +2,21 @@ # Script créant la connexion entre gatekeeper et les réseaux virtuels sur le cluster Proxmox Rohan -ip link add ethRohanNetArda type vxlan id 18 dev ethInfoInt dstport 4789 +ip link add ethRohanNetArda type vxlan id 20 dev ethInfoInt dstport 4789 +bridge fdb append to 00:00:00:00:00:00 dst 172.16.1.21 dev ethRohanNetArda bridge fdb append to 00:00:00:00:00:00 dst 172.16.1.70 dev ethRohanNetArda bridge fdb append to 00:00:00:00:00:00 dst 172.16.1.71 dev ethRohanNetArda bridge fdb append to 00:00:00:00:00:00 dst 172.16.1.72 dev ethRohanNetArda bridge fdb append to 00:00:00:00:00:00 dst 172.16.1.73 dev ethRohanNetArda -ip addr add 172.18.1.254/16 dev ethRohanNetArda +ip addr add 172.20.1.254/16 dev ethRohanNetArda ip link set mtu 1450 dev ethRohanNetArda ip link set up dev ethRohanNetArda -ip link add ethRohanNetSAE type vxlan id 19 dev ethInfoInt dstport 4789 +ip link add ethRohanNetSAE type vxlan id 21 dev ethInfoInt dstport 4789 bridge fdb append to 00:00:00:00:00:00 dst 172.16.1.70 dev ethRohanNetSAE bridge fdb append to 00:00:00:00:00:00 dst 172.16.1.71 dev ethRohanNetSAE bridge fdb append to 00:00:00:00:00:00 dst 172.16.1.72 dev ethRohanNetSAE bridge fdb append to 00:00:00:00:00:00 dst 172.16.1.73 dev ethRohanNetSAE -ip addr add 172.19.1.254/16 dev ethRohanNetSAE +ip addr add 172.21.1.254/16 dev ethRohanNetSAE ip link set mtu 1450 dev ethRohanNetSAE ip link set up dev ethRohanNetSAE diff --git a/rohan-net/rohan-net_setup_yavanna.sh b/rohan-net/rohan-net_setup_yavanna.sh new file mode 100644 index 0000000..7ca4194 --- /dev/null +++ b/rohan-net/rohan-net_setup_yavanna.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +# Script créant la connexion entre yavanna et les réseaux virtuels sur le cluster Proxmox Rohan + +ip link add ethRohanNetArda type vxlan id 20 dev ethInfoInt dstport 4789 +bridge fdb append to 00:00:00:00:00:00 dst 172.16.1.70 dev ethRohanNetArda +bridge fdb append to 00:00:00:00:00:00 dst 172.16.1.71 dev ethRohanNetArda +bridge fdb append to 00:00:00:00:00:00 dst 172.16.1.72 dev ethRohanNetArda +bridge fdb append to 00:00:00:00:00:00 dst 172.16.1.73 dev ethRohanNetArda +bridge fdb append to 00:00:00:00:00:00 dst 172.16.1.254 dev ethRohanNetArda +ip addr add 172.20.1.21/16 dev ethRohanNetArda +ip link set mtu 1450 dev ethRohanNetArda +ip link set up dev ethRohanNetArda