echo "*****************************"
echo "***** VIRTUAL NETWORK 1 *****"
echo "*****************************"
echo ""
echo ""
./ovxctl.py -n createNetwork tcp 192.168.255.1 10000 192.168.0.0 16
./ovxctl.py -n createSwitch 1 fc00:db20:35b:7399::5,fd00:a516:7c1b:17cd:6d81:2137:bd2a:2c5b,fd00:c2b6:b24b:be67:2827:688d:e6a1:6a3b,fd00:c2b6:b24b:be67:2827:688d:e6a1:6a3b
./ovxctl.py -n createSwitch 1 fc00:e968:6179::de52:7100,fdf8:f53e:61e4::18,fdf8:f53e:61e4::18,fc00:e968:6179::de52:7100
./ovxctl.py -n createSwitch 1 fc00:db20:35b:7399::5,fdf8:f53e:61e4::18,fd00:a516:7c1b:17cd:6d81:2137:bd2a:2c5b,fd00:c2b6:b24b:be67:2827:688d:e6a1:6a3b,fc00:db20:35b:7399::5,fdf8:f53e:61e4::18,fdf8:f53e:61e4::18,fdf8:f53e:61e4::18
./ovxctl.py -n createPort 1 fd00:c2b6:b24b:be67:2827:688d:e6a1:6a3b 1
./ovxctl.py -n createPort 1 fd00:c2b6:b24b:be67:2827:688d:e6a1:6a3b 2
./ovxctl.py -n createPort 1 fd00:c2b6:b24b:be67:2827:688d:e6a1:6a3b 1
./ovxctl.py -n createPort 1 fd00:c2b6:b24b:be67:2827:688d:e6a1:6a3b 2
./ovxctl.py -n createPort 1 fdf8:f53e:61e4::18 1
./ovxctl.py -n createPort 1 fdf8:f53e:61e4::18 2
./ovxctl.py -n createPort 1 fc00:e968:6179::de52:7100 1
./ovxctl.py -n createPort 1 fc00:e968:6179::de52:7100 2
./ovxctl.py -n createPort 1 fc00:db20:35b:7399::5 1
./ovxctl.py -n createPort 1 fc00:db20:35b:7399::5 2
./ovxctl.py -n createPort 1 fdf8:f53e:61e4::18 1
./ovxctl.py -n createPort 1 fdf8:f53e:61e4::18 2
./ovxctl.py -n createPort 1 fd00:a516:7c1b:17cd:6d81:2137:bd2a:2c5b9 1
./ovxctl.py -n createPort 1 fdf8:f53e:61e4::18 2
./ovxctl.py -n createPort 1 fdf8:f53e:61e4::18 1
./ovxctl.py -n createPort 1 fdf8:f53e:61e4::18 2
./ovxctl.py -n createPort 1 fd00:a516:7c1b:17cd:6d81:2137:bd2a:2c5b 1
./ovxctl.py -n createPort 1 fdf8:f53e:61e4::18 2
./ovxctl.py -n createPort 1 fc00:db20:35b:7399::5 1
./ovxctl.py -n createPort 1 fdf8:f53e:61e4::18 2
./ovxctl.py -n connectHost 1 fd00:c2b6:b24b:be67:2827:688d:e6a1:6a3b 1 00:00:00:00:00:01
./ovxctl.py -n connectHost 1 fd00:c2b6:b24b:be67:2827:688d:e6a1:6a3b 2 00:00:00:00:00:02
./ovxctl.py -n connectHost 1 fd00:c2b6:b24b:be67:2827:688d:e6a1:6a3b 3 00:00:00:00:00:03
./ovxctl.py -n connectHost 1 fd00:c2b6:b24b:be67:2827:688d:e6a1:6a3b 4 00:00:00:00:00:04
./ovxctl.py -n connectHost 1 fd00:c2b6:b24b:be67:2827:688d:e6a1:6a3b 1 00:00:00:00:00:05
./ovxctl.py -n connectHost 1 fd00:c2b6:b24b:be67:2827:688d:e6a1:6a3b 2 00:00:00:00:00:06
./ovxctl.py -n connectHost 1 fd00:c2b6:b24b:be67:2827:688d:e6a1:6a3b 3 00:00:00:00:00:07
./ovxctl.py -n connectHost 1 fd00:c2b6:b24b:be67:2827:688d:e6a1:6a3b 4 00:00:00:00:00:08
./ovxctl.py -n connectHost 1 fd00:a516:7c1b:17cd:6d81:2137:bd2a:2c5b 1 00:00:00:00:00:09
./ovxctl.py -n connectHost 1 fd00:a516:7c1b:17cd:6d81:2137:bd2a:2c5b 2 00:00:00:00:00:0a
./ovxctl.py -n connectHost 1 fd00:a516:7c1b:17cd:6d81:2137:bd2a:2c5b 3 00:00:00:00:00:0b
./ovxctl.py -n connectHost 1 fd00:a516:7c1b:17cd:6d81:2137:bd2a:2c5b 4 00:00:00:00:00:0c
./ovxctl.py -n connectHost 1 fd00:a516:7c1b:17cd:6d81:2137:bd2a:2c5b 5 00:00:00:00:00:0d
./ovxctl.py -n connectHost 1 fd00:a516:7c1b:17cd:6d81:2137:bd2a:2c5b 6 00:00:00:00:00:0e
./ovxctl.py -n connectHost 1 fd00:a516:7c1b:17cd:6d81:2137:bd2a:2c5b 7 00:00:00:00:00:0f
./ovxctl.py -n connectHost 1 fd00:a516:7c1b:17cd:6d81:2137:bd2a:2c5b 8 00:00:00:00:00:10
./ovxctl.py -n connectLink 1 fd00:c2b6:b24b:be67:2827:688d:e6a1:6a3b 5 fd00:a516:7c1b:17cd:6d81:2137:bd2a:2c5b 9 0fd00:a516:7c1b:17cd:6d81:2137:bd2a:2c5b/1-0fc00:db20:35b:7399::5/4,00:00:00:00:00:00:00:67/1-00:00:00:00:00:00:00:65/1,00:00:00:00:00:00:00:65/3-0fc00:db20:35b:7399::5/1,fd00:c2b6:b24b:be67:2827:688d:e6a1:6a3b/3-fdf8:f53e:61e4::18f/1 128
./ovxctl.py -n connectLink 1 fd00:c2b6:b24b:be67:2827:688d:e6a1:6a3b 5 fd00:a516:7c1b:17cd:6d81:2137:bd2a:2c5b 10 00:00:00:00:00:00:00:6e/2-00:00:00:00:00:00:00:68/6,fdf8:f53e:61e4::188/2-fdf8:f53e:61e4::18/2,00:00:00:00:00:00:00:66/4-00:00:00:00:00:00:00:6a/2,0fc00:e968:6179::de52:7100/4-00:00:00:00:00:00:00:70/2 128
./ovxctl.py -n startNetwork 1

read a
echo "*****************************"
echo "**** DYNAMIC CONFIG VN 1 ****"
echo "*****************************"
echo ""
echo ""
echo ">>>>> Stop the network <<<<<"
echo ""
./ovxctl.py -n stopNetwork 1
read a
echo ""
echo "(Ping should NOT work: h2 ping h10)"
echo ""
read a
echo ">>>>> Start the network <<<<<"
echo ""
./ovxctl.py -n startNetwork 1
read a
echo ""
echo "(Now ping should work again: h2 ping h10)"
echo "(Before proceed, STOP ping!!!)"
echo ""
read a

echo ""
echo ">>>>> Stop the virtual switch 1 <<<<<"
echo ""
./ovxctl.py -n stopSwitch 1 fd00:c2b6:b24b:be67:2827:688d:e6a1:6a3b
read a
echo ""
echo "(Ping should work only partially: h6 ping h10 YES, h2 ping h10 NO)"
echo ""
read a
echo ">>>>> Start the virtual switch again <<<<<"
echo ""
./ovxctl.py -n startSwitch 1 fd00:c2b6:b24b:be67:2827:688d:e6a1:6a3b
read a
echo ""
echo "(Now ping should work again: h2 ping h10)"
echo "(Before proceed, STOP ping!!!)"
echo ""
read a
echo ""
echo ">>>>> Stop the virtual port 1 in virtual switch 1 <<<<<"
echo ""
./ovxctl.py -n stopPort 1 fd00:c2b6:b24b:be67:2827:688d:e6a1:6a3b 1
read a
echo ""
echo "(Ping should work only partially: h2 ping h10 YES, h1 ping h10 NO)"
echo ""
read a
echo ">>>>> Start the virtual port again <<<<<"
echo ""
./ovxctl.py -n startPort 1 fd00:c2b6:b24b:be67:2827:688d:e6a1:6a3b 1
read a
echo ""
echo "(Now ping should work again: h2 ping h10)"
echo "(Before proceed, STOP ping!!!)"
echo ""
read a
echo ">>>>> Remove Virtual Link 1 <<<<<"
echo ""
./ovxctl.py -n disconnectLink 1 1
read a
echo ""
echo "(Ping should work only partially: h6 ping h10 YES, h2 ping h10 NO)"
echo ""
read a
echo ">>>>> Re-add the previously removed Virtual Link <<<<<"
echo ""
./ovxctl.py -n connectLink 1 fd00:c2b6:b24b:be67:2827:688d:e6a1:6a3b 5 fd00:a516:7c1b:17cd:6d81:2137:bd2a:2c5b 9 fdf8:f53e:61e4::18c/1-fdf8:f53e:61e4::187/4,00:00:00:00:00:00:00:67/1-00:00:00:00:00:00:00:65/1,00:00:00:00:00:00:00:65/3-fdf8:f53e:61e4::189/1,00:00:00:00:00:00:00:69/3-00:00:00:00:00:00:00:6f/1 128
read a
echo ""
echo "(Now ping should work again: h2 ping h10)"
echo "(Before proceed, STOP ping!!!)"
echo ""
read a
echo ">>>>> Remove Virtual Switch 1 <<<<<"
echo ""
./ovxctl.py -n removeSwitch 1 fd00:c2b6:b24b:be67:2827:688d:e6a1:6a3b
read a
echo ""
echo "(Ping should work only partially: h6 ping h10 YES, h2 ping h10 NO)"
echo ""
read a
echo ">>>>> Re-add the previously removed Virtual Switch <<<<<"
echo ""
./ovxctl.py -n createSwitch 1 fc00:db20:35b:7399::5,fd00:a516:7c1b:17cd:6d81:2137:bd2a:2c5b,fd00:c2b6:b24b:be67:2827:688d:e6a1:6a3b,fd00:c2b6:b24b:be67:2827:688d:e6a1:6a3b
./ovxctl.py -n createPort 1 fd00:c2b6:b24b:be67:2827:688d:e6a1:6a3b 1
./ovxctl.py -n createPort 1 fd00:c2b6:b24b:be67:2827:688d:e6a1:6a3b 2
./ovxctl.py -n createPort 1 fd00:c2b6:b24b:be67:2827:688d:e6a1:6a3b 1
./ovxctl.py -n createPort 1 fd00:c2b6:b24b:be67:2827:688d:e6a1:6a3b 2
./ovxctl.py -n createPort 1 fd00:a516:7c1b:17cd:6d81:2137:bd2a:2c5b 1
./ovxctl.py -n connectHost 1 fd00:c2b6:b24b:be67:2827:688d:e6a1:6a3b 1 00:00:00:00:00:01
./ovxctl.py -n connectHost 1 fd00:c2b6:b24b:be67:2827:688d:e6a1:6a3b 2 00:00:00:00:00:02
./ovxctl.py -n connectHost 1 fd00:c2b6:b24b:be67:2827:688d:e6a1:6a3b 3 00:00:00:00:00:03
./ovxctl.py -n connectHost 1 fd00:c2b6:b24b:be67:2827:688d:e6a1:6a3b 4 00:00:00:00:00:04
./ovxctl.py -n connectLink 1 fd00:c2b6:b24b:be67:2827:688d:e6a1:6a3b 5 fd00:a516:7c1b:17cd:6d81:2137:bd2a:2c5b 9 00:00:00:00:00:00:00:6c/1-00:00:00:00:00:00:00:67/4,00:00:00:00:00:00:00:67/1-00:00:00:00:00:00:00:65/1,00:00:00:00:00:00:00:65/3-00:00:00:00:00:00:00:69/1,00:00:00:00:00:00:00:69/3-00:00:00:00:00:00:00:6f/1 128
read a
echo ""
echo "(Now ping should work again: h17 ping h22)"
echo ""
