3 source topologies/2_node_topo.sh
5 ODL_CONFIG_FILE1="vpp1.json"
6 ODL_CONFIG_FILE2="vpp2.json"
8 if [ "$1" == "clean" ] ; then
13 if [[ $(id -u) != 0 ]]; then
14 echo "Error: run this as root."
25 cat << EOF > scripts/lisp_nsh
26 create packet-generator interface pg0
28 packet-generator new {
31 node lisp-cp-lookup-nsh
36 pcap ${ONE_ROOT}/tests/data_plane/vpp_lite_topo/scripts/nsh.pcap
40 echo "trace add af-packet-input 100" | nc 0 5002
41 echo "trace add af-packet-input 100" | nc 0 5003
42 echo "exec ${ONE_ROOT}/tests/data_plane/vpp_lite_topo/scripts/lisp_nsh" | nc 0 5002
43 echo "packet-generator enable-stream nsh1" | nc 0 5002
45 # add dummy node to ETR
46 echo "test one nsh add-dummy-decap-node" | nc 0 5003
48 # inject NSH packet to ITR
49 echo "test one nsh pcap ${ONE_ROOT}/tests/data_plane/vpp_lite_topo/scripts/nsh.pcap" | nc 0 5002
52 decap_stats="`echo "show errors" | nc 0 5003 | grep "lisp gpe dummy nsh decap" | awk '{print $1}'`"
54 if [ "$decap_stats" == "1" ] ; then
60 print_status $rc "NSH test failed!"