aboutsummaryrefslogtreecommitdiffstats
path: root/vnfs/vCPE/scripts/v_bng_init.sh
diff options
context:
space:
mode:
Diffstat (limited to 'vnfs/vCPE/scripts/v_bng_init.sh')
-rw-r--r--vnfs/vCPE/scripts/v_bng_init.sh10
1 files changed, 10 insertions, 0 deletions
diff --git a/vnfs/vCPE/scripts/v_bng_init.sh b/vnfs/vCPE/scripts/v_bng_init.sh
index 6fb2eadc..ce20dc57 100644
--- a/vnfs/vCPE/scripts/v_bng_init.sh
+++ b/vnfs/vCPE/scripts/v_bng_init.sh
@@ -2,3 +2,13 @@
systemctl start vpp
+# wait for TAP_DEV to become active before setting a route
+TAP_DEV=tap0
+STATUS=$(ip link show $TAP_DEV 2> /dev/null)
+while [ -z "$STATUS" ]; do
+ echo "$(date) v_bng_init.sh: $TAP_DEV is not yet ready..."
+ sleep 1
+ STATUS=$(ip link show $TAP_DEV 2> /dev/null)
+done
+ip route add 10.3.0.0/24 via 192.168.40.41 dev $TAP_DEV
+