1,760
edits
Changes
→Shell Script for adding custom routes on your gateway to other's VLSs
export MY_VLS_NO=2
</pre>
* set the shell variable OTHER_VLS_NOS to the list of VLS you want to have a route to their VLS network. The following example assign the list of network numbers 32, 33, 34, 35, 41, 42, and 1 to 43 that you want to create a custom route on your gateway:
<pre>
export OTHER_VLS_NOS="32 33 34 35 41 42 `seq 1 43"`
</pre>
<pre>
#! /bin/bash
X=${MY_VLS_NO}
echo "Your Network Number is $X"
echo "Route to be added for the network number(s) $Y"
echo -n "Press ENTER to continue ... "
if [ "$X" -ne "$y" ]
then
nmcli con modify ens192 +ipv4.routes "192.168.${y}.0 /24 172.20.${y}.1 100"
echo "Adding route to 192.168.${y}.0 network."
fi