--- /dev/null
+{
+ "input": {
+ "eid": {
+ "address-type": "ietf-lisp-address-types:ipv4-prefix-afi",
+ "ipv4-prefix": "6.0.1.0/24"
+ },
+ "mapping-authkey": {
+ "key-string": "password",
+ "key-type": 1
+ }
+ }
+}
--- /dev/null
+{
+ "input": {
+ "eid": {
+ "address-type": "ietf-lisp-address-types:ipv4-prefix-afi",
+ "ipv4-prefix": "6.0.2.0/24"
+ },
+ "mapping-authkey": {
+ "key-string": "password2",
+ "key-type": 2
+ }
+ }
+}
--- /dev/null
+create_host_iface vpp1 6.0.1.1/24
+create_host_iface intervpp1 6.0.3.1/24
+
+lisp_state enable
+lisp_locator_set_with_locator ls1 host-intervpp1 1 1
+lisp_local_eid eid 6.0.1.0/24 locator-set ls1 secret-key password key-id sha1
+lisp_map_resolver 6.0.3.100
+lisp_map_server 6.0.3.100
+lisp_map_register_state enable
--- /dev/null
+create_host_iface vpp2 6.0.2.1/24
+create_host_iface intervpp2 6.0.3.2/24
+
+lisp_state enable
+lisp_locator_set_with_locator ls1 host-intervpp2 1 1
+lisp_local_eid eid 6.0.2.0/24 locator-set ls1 secret-key password2 key-id sha256
+lisp_map_server 6.0.3.100
+lisp_map_resolver 6.0.3.100
+lisp_map_register_state enable
--- /dev/null
+create_host_iface vpp1 6.0.1.1/24
+create_host_iface intervpp1 6.0.3.1/24
+
+lisp_state enable
+lisp_locator_set_with_locator ls1 host-intervpp1 1 1
+lisp_local_eid eid 6.0.1.0/24 locator-set ls1
+lisp_map_resolver 6.0.3.100
+lisp_rloc_probe_state enable
--- /dev/null
+create_host_iface vpp2 6.0.2.1/24
+create_host_iface intervpp2 6.0.3.2/24
+
+lisp_state enable
+lisp_locator_set_with_locator ls1 host-intervpp2 1 1
+lisp_local_eid eid 6.0.2.0/24 locator-set ls1
+lisp_map_resolver 6.0.3.100
echo "Deleting all ODL mappings.."
curl -X DELETE "http://${ODL_IP}:${ODL_PORT}/restconf/config/odl-mappingservice:mapping-database" \
-u ${ODL_USER}:${ODL_PASSWD}
+ # TODO how to delete operational mappings?
}
function check_odl_running {
SimpleMapping('lisp_state', 'lisp', 'lisp_enable_disable')
SimpleMapping('lisp_map_resolver', 'lisp map-resolver', 'lisp_add_del_map_resolver')
+SimpleMapping('lisp_map_server', 'lisp map-server', 'lisp_add_del_map_server')
SimpleMapping('lisp_local_eid', 'lisp eid-table', 'lisp_add_del_local_eid')
SimpleMapping('lisp_remote_mapping', 'lisp remote-mapping', 'lisp_add_del_remote_mapping')
SimpleMapping('lisp_pitr', 'lisp pitr ls', 'lisp_pitr_set_locator_set locator-set')
SimpleMapping('lisp_adjacency', 'lisp adjacency', 'lisp_add_del_adjacency')
SimpleMapping('lisp_map_request_mode', 'lisp map-request mode', 'lisp_map_request_mode')
SimpleMapping('set_if_ip', 'set int ip address', 'sw_interface_add_del_address')
+SimpleMapping('lisp_rloc_probe_state', 'lisp rloc-probe', 'lisp_rloc_probe_enable_disable')
+SimpleMapping('lisp_map_register_state', 'lisp map-register', 'lisp_map_register_enable_disable')
CustomMapping('lisp_eid_map_bd',
'lisp eid-table map vni {0} bd {1}',
print_status $rc "No ICMP response!"
exit $test_result
}
+
+function test_basic_map_register
+{
+ 2_node_topo_setup no_odl
+ post_curl "add-key" ${ODL_CONFIG_FILE1}
+ post_curl "add-key" ${ODL_CONFIG_FILE2}
+
+ maybe_pause
+
+ test_result=1
+
+ wait_for_map_register=10
+ echo "Waiting for map registration $wait_for_map_register seconds .."
+ sleep $wait_for_map_register
+
+ ip netns exec vppns1 "${1}" -w 15 -c 1 "${2}"
+ rc=$?
+
+ maybe_pause
+
+ # test done
+ 2_node_topo_clean
+ print_status $rc "No ICMP response!"
+ exit $test_result
+}
+
+function test_rloc_probe
+{
+ 2_node_topo_setup
+
+ maybe_pause
+ test_result=1
+
+ ip netns exec vppns1 "${1}" -w 15 -c 1 "${2}"
+ rc=$?
+ assert_rc_ok $rc 2_node_topo_clean "No ICMP response!"
+
+ read -p "Please check RLOC probe messages manually .." -n1
+
+ # test done
+
+ maybe_pause
+ 2_node_topo_clean
+ print_status $rc "No ICMP response!"
+ exit $test_result
+}
--- /dev/null
+#!/usr/bin/env bash
+
+# Manual test for LISP RLOC probe
+#
+# Test procedure:
+# 1) run the test
+# 2) the test stops its execution after few seconds.
+# At that moment there should be a LISP tunnel configured
+# 3) Attach wireshark to intervpp1 or intervpp2 interface and check if there
+# are map-requests and map-replies coming forth and back with RLOC probe
+# bit set in the LISP header.
+
+VPP_LITE_CONF=`pwd`/../configs/vpp_lite_config/basic/4o4_rloc_probe
+ODL_CONFIG_DIR=`pwd`/../configs/odl/basic/4o4
+
+source test_driver/basic.sh
+
+test_rloc_probe ping "6.0.2.2"
--- /dev/null
+#!/usr/bin/env bash
+
+# Test LISP map register feature (ip4 over ip4)
+
+VPP_LITE_CONF=`pwd`/../configs/vpp_lite_config/basic/4o4_map_register
+ODL_CONFIG_DIR=`pwd`/../configs/odl/basic/4o4_map_register
+
+source test_driver/basic.sh
+
+test_basic_map_register ping "6.0.2.2"