DNS fix for testcase 3
[sdnvpn.git] / sdnvpn / artifacts / quagga_setup.sh
index d52cbed..96d7374 100644 (file)
@@ -5,6 +5,11 @@ set -xe
 # change the password because this script is run on a passwordless cloud-image
 echo 'ubuntu:opnfv' | chpasswd
 
+# dns fix
+
+echo "8.8.8.8" > /etc/resolvconf/resolv.conf.d/head
+resolvconf -u
+
 # Wait for a floating IP
 # as a workaround to NAT breakage
 sleep 20
@@ -12,6 +17,11 @@ sleep 20
 # Variables to be filled in with python
 NEIGHBOR_IP=%s
 OWN_IP=%s
+# directly access the instance from the external net without NAT
+EXT_NET_MASK=%s
+
+ip link set ens7 up
+ip addr add $OWN_IP/$EXT_NET_MASK dev ens7
 
 ZEBRA_CONFIG_LOCATION="/etc/quagga/zebra.conf"
 DAEMONS_FILE_LOCATION="/etc/quagga/daemons"
@@ -63,6 +73,6 @@ log file ${BGPD_LOG_FILE}
 end
 CATEOF
 chown quagga:quagga $BGPD_CONFIG_LOCATION
-
+service quagga restart
 pgrep bgpd
 pgrep zebra