summaryrefslogtreecommitdiffstats
path: root/tests/data_plane/vpp_lite_topo/topologies/rtr_two_iface.sh
diff options
context:
space:
mode:
authorFilip Tehlar <ftehlar@cisco.com>2017-04-19 12:00:24 +0200
committerFilip Tehlar <ftehlar@cisco.com>2017-04-19 12:00:24 +0200
commit9325071dfe6f832c5be80e1206bc6338335cf977 (patch)
tree855058529ddb0d8b954e123fd4c92f5f6636803e /tests/data_plane/vpp_lite_topo/topologies/rtr_two_iface.sh
parentb3025777172c12f7a55fb4dd8345ccef0cb1dcb0 (diff)
Improve test runtime
Change-Id: I77366de42ac07b65c6fa71bd21034913d1d9b4b1 Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
Diffstat (limited to 'tests/data_plane/vpp_lite_topo/topologies/rtr_two_iface.sh')
-rw-r--r--tests/data_plane/vpp_lite_topo/topologies/rtr_two_iface.sh17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/data_plane/vpp_lite_topo/topologies/rtr_two_iface.sh b/tests/data_plane/vpp_lite_topo/topologies/rtr_two_iface.sh
index f4210fe..e46354d 100644
--- a/tests/data_plane/vpp_lite_topo/topologies/rtr_two_iface.sh
+++ b/tests/data_plane/vpp_lite_topo/topologies/rtr_two_iface.sh
@@ -1,5 +1,20 @@
#!/usr/bin/env bash
+function set_arp
+{
+ odl_mac1=`ip a show dev odl_vpp1 | grep "link/ether" | awk '{print $2}'`
+ echo "set ip arp host-vpp1_rtr 6.0.3.100 $odl_mac1" | nc 0 5002
+
+ odl_mac2=`ip a show dev odl_vpp2 | grep "link/ether" | awk '{print $2}'`
+ echo "set ip arp host-vpp2_rtr 6.0.3.100 $odl_mac1" | nc 0 5003
+
+ mac=`echo "sh hard host-rtr_vpp1" | nc 0 5004 | grep 'Ethernet address' | awk '{print $3}'`
+ echo "set ip arp host-vpp1_rtr 6.0.3.2 $mac" | nc 0 5002
+
+ mac=`echo "sh hard host-vpp2_rtr" | nc 0 5003 | grep 'Ethernet address' | awk '{print $3}'`
+ echo "set ip arp host-rtr_vpp2 6.0.5.1 $mac" | nc 0 5004
+}
+
function rtr_two_iface_clean {
echo "Clearing all VPP instances.."
pkill vpp --signal 9
@@ -136,4 +151,6 @@ function rtr_two_iface_setup {
fi
post_curl "add-mapping" ${ODL_CONFIG_FILE1}
post_curl "add-mapping" ${ODL_CONFIG_FILE2}
+
+ set_arp
}