summaryrefslogtreecommitdiffstats
path: root/vnfs
diff options
context:
space:
mode:
authorMarco Platania <platania@research.att.com>2017-05-19 12:05:57 -0400
committerMarco Platania <platania@research.att.com>2017-05-19 12:05:57 -0400
commita4a8036f7481467739926c32567c16af2b1038f5 (patch)
tree37a2529346e696bfc60f1a3f5bb2d452a0fb12bb /vnfs
parentb6ce06ef2529d536fb5c73d1804296a8007f2ad3 (diff)
Assign public interface to vFW in OpenStack
Change-Id: I6a7c640edbca8a4d726d7bb2358924f07c004b9e Signed-off-by: Marco Platania <platania@research.att.com>
Diffstat (limited to 'vnfs')
-rw-r--r--vnfs/vFW/scripts/v_firewall_install.sh11
-rw-r--r--vnfs/vFW/scripts/v_packetgen_install.sh10
-rw-r--r--vnfs/vFW/scripts/v_sink_install.sh10
3 files changed, 31 insertions, 0 deletions
diff --git a/vnfs/vFW/scripts/v_firewall_install.sh b/vnfs/vFW/scripts/v_firewall_install.sh
index c2043574..cfa59a12 100644
--- a/vnfs/vFW/scripts/v_firewall_install.sh
+++ b/vnfs/vFW/scripts/v_firewall_install.sh
@@ -10,21 +10,32 @@ CLOUD_ENV=$(cat /opt/config/cloud_env.txt)
if [[ $CLOUD_ENV == "openstack" ]]
then
echo 127.0.0.1 $(hostname) >> /etc/hosts
+ MTU=$(/sbin/ifconfig | grep MTU | sed 's/.*MTU://' | sed 's/ .*//' | sort -n | head -1)
VFW_PRIVATE_IP_O=$(cat /opt/config/vfw_private_ip_0.txt)
echo "auto eth1" >> /etc/network/interfaces
echo "iface eth1 inet static" >> /etc/network/interfaces
echo " address $VFW_PRIVATE_IP_O" >> /etc/network/interfaces
echo " netmask 255.255.255.0" >> /etc/network/interfaces
+ echo " mtu $MTU" >> /etc/network/interfaces
VFW_PRIVATE_IP_1=$(cat /opt/config/vfw_private_ip_1.txt)
echo "auto eth2" >> /etc/network/interfaces
echo "iface eth2 inet static" >> /etc/network/interfaces
echo " address $VFW_PRIVATE_IP_1" >> /etc/network/interfaces
echo " netmask 255.255.255.0" >> /etc/network/interfaces
+ echo " mtu $MTU" >> /etc/network/interfaces
+
+ VFW_PRIVATE_IP_2=$(cat /opt/config/vfw_private_ip_2.txt)
+ echo "auto eth3" >> /etc/network/interfaces
+ echo "iface eth3 inet static" >> /etc/network/interfaces
+ echo " address $VFW_PRIVATE_IP_2" >> /etc/network/interfaces
+ echo " netmask 255.255.255.0" >> /etc/network/interfaces
+ echo " mtu $MTU" >> /etc/network/interfaces
ifup eth1
ifup eth2
+ ifup eth3
fi
# Download required dependencies
diff --git a/vnfs/vFW/scripts/v_packetgen_install.sh b/vnfs/vFW/scripts/v_packetgen_install.sh
index b141b584..913b5497 100644
--- a/vnfs/vFW/scripts/v_packetgen_install.sh
+++ b/vnfs/vFW/scripts/v_packetgen_install.sh
@@ -10,14 +10,24 @@ CLOUD_ENV=$(cat /opt/config/cloud_env.txt)
if [[ $CLOUD_ENV == "openstack" ]]
then
echo 127.0.0.1 $(hostname) >> /etc/hosts
+ MTU=$(/sbin/ifconfig | grep MTU | sed 's/.*MTU://' | sed 's/ .*//' | sort -n | head -1)
VPG_PRIVATE_IP_O=$(cat /opt/config/vpg_private_ip_0.txt)
echo "auto eth1" >> /etc/network/interfaces
echo "iface eth1 inet static" >> /etc/network/interfaces
echo " address $VPG_PRIVATE_IP_O" >> /etc/network/interfaces
echo " netmask 255.255.255.0" >> /etc/network/interfaces
+ echo " mtu $MTU" >> /etc/network/interfaces
+
+ VPG_PRIVATE_IP_1=$(cat /opt/config/vpg_private_ip_1.txt)
+ echo "auto eth2" >> /etc/network/interfaces
+ echo "iface eth2 inet static" >> /etc/network/interfaces
+ echo " address $VPG_PRIVATE_IP_1" >> /etc/network/interfaces
+ echo " netmask 255.255.255.0" >> /etc/network/interfaces
+ echo " mtu $MTU" >> /etc/network/interfaces
ifup eth1
+ ifup eth2
fi
# Download required dependencies
diff --git a/vnfs/vFW/scripts/v_sink_install.sh b/vnfs/vFW/scripts/v_sink_install.sh
index 686fd3ae..0e1a7ad7 100644
--- a/vnfs/vFW/scripts/v_sink_install.sh
+++ b/vnfs/vFW/scripts/v_sink_install.sh
@@ -8,14 +8,24 @@ CLOUD_ENV=$(cat /opt/config/cloud_env.txt)
if [[ $CLOUD_ENV == "openstack" ]]
then
echo 127.0.0.1 $(hostname) >> /etc/hosts
+ MTU=$(/sbin/ifconfig | grep MTU | sed 's/.*MTU://' | sed 's/ .*//' | sort -n | head -1)
VSN_PRIVATE_IP_O=$(cat /opt/config/vsn_private_ip_0.txt)
echo "auto eth1" >> /etc/network/interfaces
echo "iface eth1 inet static" >> /etc/network/interfaces
echo " address $VSN_PRIVATE_IP_O" >> /etc/network/interfaces
echo " netmask 255.255.255.0" >> /etc/network/interfaces
+ echo " mtu $MTU" >> /etc/network/interfaces
+
+ VSN_PRIVATE_IP_1=$(cat /opt/config/vsn_private_ip_1.txt)
+ echo "auto eth2" >> /etc/network/interfaces
+ echo "iface eth2 inet static" >> /etc/network/interfaces
+ echo " address $VSN_PRIVATE_IP_1" >> /etc/network/interfaces
+ echo " netmask 255.255.255.0" >> /etc/network/interfaces
+ echo " mtu $MTU" >> /etc/network/interfaces
ifup eth1
+ ifup eth2
fi
# Download required dependencies