summaryrefslogtreecommitdiffstats
path: root/vnfs/vCPE
diff options
context:
space:
mode:
authorEric Multanen <eric.w.multanen@intel.com>2017-10-26 17:55:07 -0700
committerEric Multanen <eric.w.multanen@intel.com>2017-10-26 18:01:05 -0700
commite6b4787233b549b730e1bc4a8b099b7cf131adb1 (patch)
tree3174775eeee967799d930cda332754271bc13f38 /vnfs/vCPE
parentd4d0d9fa55382eadfe759baccfaf6408f6338d28 (diff)
vCPE vG-MUX - fixup default vpp configuration
Instead of hard coding VPP interface names, derive them from the PCI addresses of the network devices when setting up the default vpp configuration in /etc/vpp/setup.gate. Also, remove the vxlan tunnel configuration from the default vpp configuration - this will be created by SDNC. Change-Id: Ife48ac19b8d3869c7d65e83bdf8ab9a5a2c3301c Issue-ID: INT-63 Signed-off-by: Eric Multanen <eric.w.multanen@intel.com>
Diffstat (limited to 'vnfs/vCPE')
-rw-r--r--vnfs/vCPE/scripts/v_gmux_install.sh25
1 files changed, 19 insertions, 6 deletions
diff --git a/vnfs/vCPE/scripts/v_gmux_install.sh b/vnfs/vCPE/scripts/v_gmux_install.sh
index 23372c49..1907a5f1 100644
--- a/vnfs/vCPE/scripts/v_gmux_install.sh
+++ b/vnfs/vCPE/scripts/v_gmux_install.sh
@@ -217,14 +217,27 @@ cpu {
EOF
- cat > /etc/vpp/setup.gate << EOF
-set int state GigabitEthernet0/4/0 up
-set int ip address GigabitEthernet0/4/0 ${BNG_MUX_IP}/${BNG_MUX_CIDR#*/}
+ # Get list of network device PCI bus addresses
+ get_nic_pci_list() {
+ while read -r line ; do
+ if [ "$line" != "${line#*network device}" ]; then
+ echo -n "${line%% *} "
+ fi
+ done < <(lspci)
+ }
+
+ NICS=$(get_nic_pci_list)
+ NICS=`echo ${NICS} | sed 's/[0]\+\([0-9]\)/\1/g' | sed 's/[.:]/\//g'`
-set int state GigabitEthernet0/6/0 up
-set int ip address GigabitEthernet0/6/0 ${MUX_GW_IP}/${MUX_GW_CIDR#*/}
+ BNG_MUX_NIC=GigabitEthernet`echo ${NICS} | cut -d " " -f 2` # second interface in list
+ MUX_GW_NIC=GigabitEthernet`echo ${NICS} | cut -d " " -f 4` # fourth interface in list
+
+ cat > /etc/vpp/setup.gate << EOF
+set int state ${BNG_MUX_NIC} up
+set int ip address ${BNG_MUX_NIC} ${BNG_MUX_IP}/${BNG_MUX_CIDR#*/}
-create vxlan tunnel src ${MUX_GW_IP} dst 10.5.0.21 vni 100
+set int state ${MUX_GW_NIC} up
+set int ip address ${MUX_GW_NIC} ${MUX_GW_IP}/${MUX_GW_CIDR#*/}
EOF
fi # endif BUILD_STATE != "build"