Updated vhost2.in (replaced ConnectX-2 with ConnectX-3 Pro).
authorZoltán Felleg <zoltan.felleg@userrendszerhaz.hu>
Mon, 8 Jan 2024 14:03:41 +0000 (15:03 +0100)
committerZoltán Felleg <zoltan.felleg@userrendszerhaz.hu>
Mon, 8 Jan 2024 14:03:41 +0000 (15:03 +0100)
sources/vhost2.in/01_setupnetworking.sh

index 5dfecd8ee5c4bf37ec8858b42bb0bc715f5dd6a7..b276e9da01f33ea50250e59825257bdfab34f4f7 100755 (executable)
@@ -12,8 +12,8 @@ set -x
 #   ens2f3: port 3 of PCIe NetXtreme, unused
 #   enp0s29f0u2: IMM
 #   enp0s29f7u6: Huawei E3372H-320 LTE USB modem
-#   ibs4:   port 1 of Mellanox ConnectX-2, used for mlx1 network
-#   ibs4d1: port 2 of Mellanox ConnectX-2, used for mlx2 network
+#   ens4:   port 1 of Mellanox ConnectX-3 Pro, used for 10g network
+#   ens4d1: port 2 of Mellanox ConnectX-3 Pro, unused
 
 
 INTERNAL_HOST_BOND_NAME=bondhi
@@ -46,19 +46,21 @@ EXTERNAL_CONTAINER_BOND_SLAVE_2_DEVICE=ens2f2
 EXTERNAL_CONTAINER_BRIDGE_NAME=brce
 EXTERNAL_CONTAINER_BRIDGE_DEVICE=${EXTERNAL_CONTAINER_BRIDGE_NAME}-dev
 
-MLX1_CONNECTION_NAME=mlx1
-MLX1_CONNECTION_DEVICE=ibs4
-MLX2_CONNECTION_NAME=mlx2
-MLX2_CONNECTION_DEVICE=ibs4d1
+TENG_CONNECTION_NAME=10g
+TENG_CONNECTION_DEVICE=ens4
 
 HUAWEI_CONNECTION_NAME=huawei
 HUAWEI_CONNECTION_DEVICE=enp0s29f7u6
 
+IMM_CONNECTION_NAME=imm
+IMM_CONNECTION_DEVICE=enp0s29f0u2
+
 
 CONNECTIONS=$(nmcli --terse connection show | wc -l)
-while [ $CONNECTIONS -gt 0 ]
+while [ $CONNECTIONS -gt 1 ]
 do
-    CONNECTION_LINE=$(nmcli --terse connection show | head -n 1)
+    CONNECTION_LINE=$(nmcli --terse connection show \
+                          | grep --invert-match '^lo:' | head -n 1)
     CONNECTION_UUID=$(echo $CONNECTION_LINE | cut -f 2 -d ':')
     nmcli connection delete uuid "$CONNECTION_UUID"
     CONNECTIONS=$(nmcli --terse connection show | wc -l)
@@ -77,7 +79,12 @@ nmcli connection add \
     ipv4.gateway "10.228.109.254" \
     ipv4.method "manual" \
     ipv4.route-metric "100" \
-    ipv6.method "auto" \
+    ipv6.addresses "2001:1aa1:000a:7dae:e41f:13ff:febc:e0d0/64" \
+    ipv6.dns "2001:1aa1:000a:7dae:000c:18ff:fe03:5c9f, 2001:1aa1:000a:7dae:000c:18ff:fe03:6d9f" \
+    ipv6.dns-search "in.useribm.hu" \
+    ipv6.gateway "2001:1aa1:000a:7dae:000c:18ff:fe03:6dfe" \
+    ipv6.method "manual" \
+    ipv6.route-metric "100" \
     save yes
 
 nmcli connection add \
@@ -104,7 +111,7 @@ nmcli connection add \
     connection.interface-name $INTERNAL_CONTAINER_BRIDGE_DEVICE \
     connection.type bridge \
     ipv4.method "disabled" \
-    ipv6.method "ignore" \
+    ipv6.method "disabled" \
     bridge.stp no \
     save yes
 
@@ -142,7 +149,7 @@ nmcli connection add \
     connection.interface-name $HOST_ONLY_CONTAINER_BRIDGE_DEVICE \
     connection.type bridge \
     ipv4.method "disabled" \
-    ipv6.method "ignore" \
+    ipv6.method "disabled" \
     bridge.stp no \
     save yes
 
@@ -152,7 +159,7 @@ nmcli connection add \
     connection.interface-name $EXTERNAL_CONTAINER_BRIDGE_DEVICE \
     connection.type bridge \
     ipv4.method "disabled" \
-    ipv6.method "ignore" \
+    ipv6.method "disabled" \
     bridge.stp no \
     save yes
 
@@ -186,30 +193,33 @@ nmcli connection add \
 
 nmcli connection add \
     connection.autoconnect yes \
-    connection.id $MLX1_CONNECTION_NAME \
-    connection.interface-name $MLX1_CONNECTION_DEVICE \
-    connection.type infiniband \
-    ipv4.addresses "172.16.131.222/24" \
+    connection.id $TENG_CONNECTION_NAME \
+    connection.interface-name $TENG_CONNECTION_DEVICE \
+    connection.type 802-3-ethernet \
+    ipv4.addresses "172.24.107.2/24" \
     ipv4.method "manual" \
-    ipv6.method "auto" \
+    ipv6.addresses "2001:1aa1:000a:006b:e41d:2dff:feb9:7170/64" \
+    ipv6.dns "2001:1aa1:000a:7dae:000c:18ff:fe03:5c9f, 2001:1aa1:000a:7dae:000c:18ff:fe03:6d9f" \
+    ipv6.dns-search "in.useribm.hu" \
+    ipv6.method "manual" \
     save yes
 
 nmcli connection add \
     connection.autoconnect yes \
-    connection.id $MLX2_CONNECTION_NAME \
-    connection.interface-name $MLX2_CONNECTION_DEVICE \
-    connection.type infiniband \
-    ipv4.addresses "172.16.132.222/24" \
-    ipv4.method "manual" \
-    ipv6.method "auto" \
+    connection.id $HUAWEI_CONNECTION_NAME \
+    connection.interface-name $HUAWEI_CONNECTION_DEVICE \
+    connection.type 802-3-ethernet \
+    ipv4.method "auto" \
+    ipv4.route-metric "1000" \
+    ipv6.method "disabled" \
     save yes
 
 nmcli connection add \
     connection.autoconnect yes \
-    connection.id $HUAWEI_CONNECTION_NAME \
-    connection.interface-name $HUAWEI_CONNECTION_DEVICE \
+    connection.id $IMM_CONNECTION_NAME \
+    connection.interface-name $IMM_CONNECTION_DEVICE \
     connection.type 802-3-ethernet \
     ipv4.method "auto" \
-    ipv4.route-metric "1000" \
-    ipv6.method "auto" \
+    ipv4.route-metric "2000" \
+    ipv6.method "disabled" \
     save yes