aboutsummaryrefslogtreecommitdiffstats
path: root/resources
diff options
context:
space:
mode:
authorNidhy <nidhyanandhan.a@hcl.com>2019-08-31 12:53:12 +0000
committerPeter Mikus <pmikus@cisco.com>2019-09-19 13:38:58 +0000
commitaafa2efa63b891e85ff13255691aae4909bc503c (patch)
tree9ea9e6d57a25148009a84661fff7a0e30907c529 /resources
parenta295b175cd410e63829a71eb4565f4bc0f6965a4 (diff)
LISP: 3-node (func) to 2-node (dev) converstion
Change-Id: I0fbe4d9ef1b30a1ac1382ea43b5b52aeb8a7d39f Signed-off-by: Nidhy <nidhyanandhan.a@hcl.com>
Diffstat (limited to 'resources')
-rw-r--r--resources/libraries/robot/overlay/lisp.robot153
-rw-r--r--resources/libraries/robot/overlay/lispgpe.robot2
-rw-r--r--resources/libraries/robot/shared/default.robot8
-rw-r--r--resources/libraries/robot/shared/traffic.robot138
-rw-r--r--resources/test_data/lisp/lisp.py93
-rwxr-xr-xresources/traffic_scripts/lisp/lisp_check.py18
-rwxr-xr-xresources/traffic_scripts/lisp/lispgpe_check.py18
7 files changed, 421 insertions, 9 deletions
diff --git a/resources/libraries/robot/overlay/lisp.robot b/resources/libraries/robot/overlay/lisp.robot
new file mode 100644
index 0000000000..826cc3a7b1
--- /dev/null
+++ b/resources/libraries/robot/overlay/lisp.robot
@@ -0,0 +1,153 @@
+# Copyright (c) 2019 Cisco and/or its affiliates.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at:
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+*** Settings ***
+| Library | resources.libraries.python.LispSetup.LispAdjacency
+| Library | resources.libraries.python.LispSetup.LispEidTableMap
+| Library | resources.libraries.python.LispSetup.LispLocalEid
+| Library | resources.libraries.python.LispSetup.LispLocator
+| Library | resources.libraries.python.LispSetup.LispLocatorSet
+| Library | resources.libraries.python.LispSetup.LispRemoteMapping
+| Resource | resources/libraries/robot/shared/default.robot
+
+*** Keywords ***
+| Configure topology for IPv4 LISP testing
+| | [Documentation] | Setup topology for IPv4 LISP testing.
+| | ...
+| | ... | *Example:*
+| | ... | \| Configure topology for IPv4 LISP testing \|
+| | ...
+| | Set interfaces in path up
+| | VPP Interface Set IP Address
+| | ... | ${dut1} | ${dut1_if1} | ${dut_if1_ip4} | ${ip4_plen}
+| | VPP Interface Set IP Address
+| | ... | ${dut1} | ${dut1_if2} | ${dut_if2_ip4} | ${ip4_plen}
+| | VPP Add IP Neighbor
+| | ... | ${dut1} | ${dut1_if1} | ${src_ip4} | ${tg_if1_mac}
+| | VPP Add IP Neighbor
+| | ... | ${dut1} | ${dut1_if2} | ${dst_ip4} | ${tg_if2_mac}
+| | VPP Add IP Neighbor
+| | ... | ${dut1} | ${dut1_if2} | ${tg_if2_ip4} | ${tg_if2_mac}
+
+| Configure topology for IPv6 LISP testing
+| | [Documentation] | Setup topology fo IPv6 LISP testing.
+| | ...
+| | ... | *Example:*
+| | ... | \| Configure topology for IPv6 LISP testing \|
+| | ...
+| | Set interfaces in path up
+| | VPP Interface Set IP Address
+| | ... | ${dut1} | ${dut1_if1} | ${dut_if1_ip6} | ${ip6_plen}
+| | VPP Interface Set IP Address
+| | ... | ${dut1} | ${dut1_if2} | ${dut_if2_ip6} | ${ip6_plen}
+| | VPP Add IP Neighbor
+| | ... | ${dut1} | ${dut1_if1} | ${src_ip6} | ${tg_if1_mac}
+| | VPP Add IP Neighbor
+| | ... | ${dut1} | ${dut1_if2} | ${dst_ip6} | ${tg_if2_mac}
+| | VPP Add IP Neighbor
+| | ... | ${dut1} | ${dut1_if2} | ${tg_if2_ip6} | ${tg_if2_mac}
+
+| Configure LISP in 2-node circular topology
+| | [Documentation] | Configure LISP topology in 2-node circular topology.
+| | ...
+| | ... | *Arguments:*
+| | ... | - dut1 - DUT1 node. Type: dictionary
+| | ... | - dut1_if - DUT1 node interface. Type: string
+| | ... | - dut1_int_index - DUT1 node interface index. Type: integer
+| | ... | - locator_set - Locator set values. Type: dictionary
+| | ... | - dut1_eid - DUT1 node eid address. Type: dictionary
+| | ... | - dut1_static_adjacency - DUT1 static adjacency. Type: dictionary
+| | ... | - is_gpe - To enable GPE. Other than zero to enable Type: integer
+| | ... | - vni_table - vni table Eid Table Mapping Type: integer
+| | ... | - vrf_table - vrf table Eid Table Mapping Type: integer
+| | ...
+| | ... | *Return:*
+| | ... | - No value returned
+| | ...
+| | ... | *Example:*
+| | ... | \| Configure LISP in 2-node circular topology \
+| | ... | \| ${dut1} \| ${interface_name} \
+| | ... | \| None \| ${locator_set} \| ${dut1_eid} \
+| | ... | \| ${dut1_static_adjacency} \|
+| | ...
+| | [Arguments]
+| | ... | ${dut1} | ${dut1_if} | ${dut1_int_index}
+| | ... | ${locator_set} | ${dut1_eid}
+| | ... | ${dut1_static_adjacency}
+| | ... | ${is_gpe}=0
+| | ... | ${vni_table}=0 | ${vrf_table}=0
+| | ...
+# DUT1 settings:
+| | ${dut1_int_index}= | Run Keyword If | ${dut1_int_index} is None
+| | ... | Get Interface Sw Index | ${dut1} | ${dut1_if}
+| | ... | ELSE | Set Variable | ${dut1_int_index}
+| | Enable Lisp | ${dut1}
+| | Run keyword if | ${is_gpe} != 0
+| | ... | Enable Lisp GPE | ${dut1}
+| | Vpp Add Lisp Locator Set | ${dut1} | ${locator_set['locator_name']}
+| | Vpp Add Lisp Locator | ${dut1} | ${locator_set['locator_name']}
+| | ... | ${dut1_int_index} | ${locator_set['priority']}
+| | ... | ${locator_set['weight']}
+| | Run keyword if | ${is_gpe} != 0
+| | ... | Vpp Lisp Eid Table Mapping | ${dut1}
+| | ... | ${vni_table}
+| | ... | vrf=${vrf_table}
+| | Vpp Add Lisp Local Eid | ${dut1} | ${dut1_eid['locator_name']}
+| | ... | ${dut1_eid['vni']} | ${dut1_eid['eid']} | ${dut1_eid['prefix']}
+| | Vpp Add Lisp Remote Mapping | ${dut1} | ${dut1_static_adjacency['vni']}
+| | ... | ${dut1_static_adjacency['deid']}
+| | ... | ${dut1_static_adjacency['prefix']}
+| | ... | ${dut1_static_adjacency['seid']}
+| | ... | ${dut1_static_adjacency['prefix']}
+| | ... | ${dut1_static_adjacency['rloc']}
+| | Vpp Add Lisp Adjacency | ${dut1} | ${dut1_static_adjacency['vni']}
+| | ... | ${dut1_static_adjacency['deid']}
+| | ... | ${dut1_static_adjacency['prefix']}
+| | ... | ${dut1_static_adjacency['seid']}
+| | ... | ${dut1_static_adjacency['prefix']}
+
+| Configure topology for IPv6 LISPoIP4 testing
+| | [Documentation] | Setup topology fo IPv6 LISPoIPV4 testing.
+| | ...
+| | ... | *Example:*
+| | ... | \| Configure topology for IPv6 LISPoIP4 testing \|
+| | ...
+| | Set interfaces in path up
+| | VPP Interface Set IP Address
+| | ... | ${dut1} | ${dut1_if1} | ${dut_if1_ip6} | ${ip6_plen}
+| | VPP Interface Set IP Address
+| | ... | ${dut1} | ${dut1_if2} | ${dut_if2_ip4} | ${ip4_plen}
+| | VPP Add IP Neighbor
+| | ... | ${dut1} | ${dut1_if1} | ${src_ip6} | ${tg_if1_mac}
+| | VPP Add IP Neighbor
+| | ... | ${dut1} | ${dut1_if2} | ${dst_ip6} | ${tg_if2_mac}
+| | VPP Add IP Neighbor
+| | ... | ${dut1} | ${dut1_if2} | ${tg_if2_ip4} | ${tg_if2_mac}
+
+| Configure topology for IPv4 LISPoIP6 testing
+| | [Documentation] | Setup topology fo IPv4 LISPoIPV6 testing.
+| | ...
+| | ... | *Example:*
+| | ... | \| Configure topology for IPv4 LISPoIP6 testing \|
+| | ...
+| | Set interfaces in path up
+| | VPP Interface Set IP Address
+| | ... | ${dut1} | ${dut1_if1} | ${dut_if1_ip4} | ${ip4_plen}
+| | VPP Interface Set IP Address
+| | ... | ${dut1} | ${dut1_if2} | ${dut_if2_ip6} | ${ip6_plen}
+| | VPP Add IP Neighbor
+| | ... | ${dut1} | ${dut1_if1} | ${src_ip4} | ${tg_if1_mac}
+| | VPP Add IP Neighbor
+| | ... | ${dut1} | ${dut1_if2} | ${dst_ip4} | ${tg_if2_mac}
+| | VPP Add IP Neighbor
+| | ... | ${dut1} | ${dut1_if2} | ${tg_if2_ip6} | ${tg_if2_mac}
diff --git a/resources/libraries/robot/overlay/lispgpe.robot b/resources/libraries/robot/overlay/lispgpe.robot
index d5115d8242..5c611a56a9 100644
--- a/resources/libraries/robot/overlay/lispgpe.robot
+++ b/resources/libraries/robot/overlay/lispgpe.robot
@@ -1,4 +1,4 @@
-# Copyright (c) 2016 Cisco and/or its affiliates.
+# Copyright (c) 2019 Cisco and/or its affiliates.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at:
diff --git a/resources/libraries/robot/shared/default.robot b/resources/libraries/robot/shared/default.robot
index 3da2026ba6..8985bd2434 100644
--- a/resources/libraries/robot/shared/default.robot
+++ b/resources/libraries/robot/shared/default.robot
@@ -26,6 +26,10 @@
| Library | resources.libraries.python.Cop
| Library | resources.libraries.python.DUTSetup
| Library | resources.libraries.python.L2Util
+| Library | resources.libraries.python.InterfaceUtil
+| Library | resources.libraries.python.IPUtil
+| Library | resources.libraries.python.IPv6Util
+| Library | resources.libraries.python.NodePath
| Library | resources.libraries.python.Namespaces
| Library | resources.libraries.python.PapiHistory
| Library | resources.libraries.python.SchedUtils
@@ -49,6 +53,9 @@
| Resource | resources/libraries/robot/l2/l2_xconnect.robot
| Resource | resources/libraries/robot/l2/tagging.robot
| Resource | resources/libraries/robot/overlay/srv6.robot
+| Resource | resources/libraries/robot/overlay/lisp.robot
+| Resource | resources/libraries/robot/overlay/lispgpe.robot
+| Resource | resources/libraries/robot/overlay/lisp_api.robot
| Resource | resources/libraries/robot/performance/performance_configuration.robot
| Resource | resources/libraries/robot/performance/performance_limits.robot
| Resource | resources/libraries/robot/performance/performance_utils.robot
@@ -59,6 +66,7 @@
| Resource | resources/libraries/robot/shared/suite_setup.robot
| Resource | resources/libraries/robot/shared/test_teardown.robot
| Resource | resources/libraries/robot/shared/test_setup.robot
+| Resource | resources/libraries/robot/shared/testing_path.robot
| Resource | resources/libraries/robot/shared/traffic.robot
| Resource | resources/libraries/robot/shared/vm.robot
diff --git a/resources/libraries/robot/shared/traffic.robot b/resources/libraries/robot/shared/traffic.robot
index dc3cc054b2..294d0a7deb 100644
--- a/resources/libraries/robot/shared/traffic.robot
+++ b/resources/libraries/robot/shared/traffic.robot
@@ -886,3 +886,141 @@
| | ${args}= | Set Variable If | "${r_tunnel}" == "${None}" | ${args}
| | ... | ${args} --dst_tun ${r_tunnel}
| | Run Traffic Script On Node | ipsec.py | ${node} | ${args}
+
+| Send packet and verify LISP encap
+| | [Documentation] | Send ICMP packet to DUT out one interface and receive\
+| | ... | a LISP encapsulated packet on the other interface.
+| | ...
+| | ... | *Arguments:*
+| | ...
+| | ... | _NOTE:_ Arguments are based on topology:
+| | ... | TG(if1)->(if1)DUT(if2)->TG(if2)
+| | ...
+| | ... | - tg_node - Node to execute scripts on (TG). Type: dictionary
+| | ... | - src_ip - IP of source interface (TG-if1). Type: string
+| | ... | - dst_ip - IP of destination interface (TG-if2). Type: string
+| | ... | - tx_src_port - Interface of TG-if1. Type: string
+| | ... | - tx_src_mac - MAC address of TG-if1. Type: string
+| | ... | - tx_dst_mac - MAC address of DUT-if1. Type: string
+| | ... | - rx_port - Interface of TG-if1. Type: string
+| | ... | - rx_src_mac - MAC address of DUT1-if2. Type: string
+| | ... | - rx_dst_mac - MAC address of TG-if2. Type: string
+| | ... | - src_rloc - configured RLOC source address. Type: string
+| | ... | - dst_rloc - configured RLOC destination address. Type: string
+| | ...
+| | ... | *Return:*
+| | ... | - No value returned
+| | ...
+| | ... | *Example:*
+| | ...
+| | ... | \| Send packet and verify LISP encap \| ${nodes['TG']} \| 10.0.0.1 \
+| | ... | \| 32.0.0.1 \| eth2 \| 08:00:27:ee:fd:b3 \| 08:00:27:a2:52:5b \
+| | ... | \| eth3 \| 08:00:27:4d:ca:7a \| 08:00:27:7d:fd:10 \| 10.0.1.1 \
+| | ... | \| 10.0.1.2 \|
+| | ...
+| | [Arguments] | ${tg_node} | ${src_ip} | ${dst_ip} | ${tx_src_port}
+| | ... | ${tx_src_mac} | ${tx_dst_mac} | ${rx_port} | ${rx_src_mac}
+| | ... | ${rx_dst_mac} | ${src_rloc} | ${dst_rloc}
+| | ...
+| | ${tx_port_name}= | Get interface name | ${tg_node} | ${tx_src_port}
+| | ${rx_port_name}= | Get interface name | ${tg_node} | ${rx_port}
+| | ${args}= | Catenate | --tg_src_mac | ${tx_src_mac} | --tg_dst_mac
+| | ... | ${rx_dst_mac} | --dut_if1_mac | ${tx_dst_mac} | --dut_if2_mac
+| | ... | ${rx_src_mac} | --src_ip | ${src_ip} | --dst_ip | ${dst_ip}
+| | ... | --tx_if | ${tx_port_name} | --rx_if | ${rx_port_name}
+| | ... | --src_rloc | ${src_rloc} | --dst_rloc | ${dst_rloc}
+| | Run Traffic Script On Node | lisp/lisp_check.py | ${tg_node}
+| | ... | ${args}
+
+| Send packet and verify LISP GPE encap
+| | [Documentation] | Send ICMP packet to DUT out one interface and receive\
+| | ... | a LISP-GPE encapsulated packet on the other interface.
+| | ...
+| | ... | *Arguments:*
+| | ...
+| | ... | _NOTE:_ Arguments are based on topology:
+| | ... | TG(if1)->(if1)DUT(if2)->TG(if2)
+| | ...
+| | ... | - tg_node - Node to execute scripts on (TG). Type: dictionary
+| | ... | - src_ip - IP of source interface (TG-if1). Type: string
+| | ... | - dst_ip - IP of destination interface (TG-if2). Type: string
+| | ... | - tx_src_port - Interface of TG-if1. Type: string
+| | ... | - tx_src_mac - MAC address of TG-if1. Type: string
+| | ... | - tx_dst_mac - MAC address of DUT-if1. Type: string
+| | ... | - rx_port - Interface of TG-if1. Type: string
+| | ... | - rx_src_mac - MAC address of DUT1-if2. Type: string
+| | ... | - rx_dst_mac - MAC address of TG-if2. Type: string
+| | ... | - src_rloc - configured RLOC source address. Type: string
+| | ... | - dst_rloc - configured RLOC destination address. Type: string
+| | ...
+| | ... | *Return:*
+| | ... | - No value returned
+| | ...
+| | ... | *Example:*
+| | ...
+| | ... | \| Send packet and verify LISP GPE encap \| ${nodes['TG']} \
+| | ... | \| 10.0.0.1 \| 32.0.0.1 \
+| | ... | \| eth2 \| 08:00:27:ee:fd:b3 \| 08:00:27:a2:52:5b \
+| | ... | \| eth3 \| 08:00:27:4d:ca:7a \| 08:00:27:7d:fd:10 \
+| | ... | \| 10.0.1.1 \| 10.0.1.2 \|
+| | ...
+| | [Arguments] | ${tg_node} | ${src_ip} | ${dst_ip} | ${tx_src_port} |
+| | ... | ${tx_src_mac} | ${tx_dst_mac} | ${rx_port} | ${rx_src_mac}
+| | ... | ${rx_dst_mac} | ${src_rloc} | ${dst_rloc}
+| | ...
+| | ${tx_port_name}= | Get interface name | ${tg_node} | ${tx_src_port}
+| | ${rx_port_name}= | Get interface name | ${tg_node} | ${rx_port}
+| | ${args}= | Catenate | --tg_src_mac | ${tx_src_mac} | --tg_dst_mac
+| | ... | ${rx_dst_mac} | --dut_if1_mac | ${tx_dst_mac} | --dut_if2_mac
+| | ... | ${rx_src_mac} | --src_ip | ${src_ip} | --dst_ip | ${dst_ip}
+| | ... | --tx_if | ${tx_port_name} | --rx_if | ${rx_port_name}
+| | ... | --src_rloc | ${src_rloc} | --dst_rloc | ${dst_rloc}
+| | Run Traffic Script On Node | lisp/lispgpe_check.py | ${tg_node}
+| | ... | ${args}
+
+| Send packet and verify LISPoTunnel encap
+| | [Documentation] | Send ICMP packet to DUT out one interface and receive\
+| | ... | a LISP encapsulated packet on the other interface.
+| | ...
+| | ... | *Arguments:*
+| | ...
+| | ... | _NOTE:_ Arguments are based on topology:
+| | ... | TG(if1)->(if1)DUT(if2)->TG(if2)
+| | ...
+| | ... | - tg_node - Node to execute scripts on (TG). Type: dictionary
+| | ... | - src_ip - IP of source interface (TG-if1). Type: string
+| | ... | - dst_ip - IP of destination interface (TG-if2). Type: string
+| | ... | - tx_src_port - Interface of TG-if1. Type: string
+| | ... | - tx_src_mac - MAC address of TG-if1. Type: string
+| | ... | - tx_dst_mac - MAC address of DUT-if1. Type: string
+| | ... | - rx_port - Interface of TG-if1. Type: string
+| | ... | - rx_src_mac - MAC address of DUT1-if2. Type: string
+| | ... | - rx_dst_mac - MAC address of TG-if2. Type: string
+| | ... | - src_rloc - configured RLOC source address. Type: string
+| | ... | - dst_rloc - configured RLOC destination address. Type: string
+| | ... | - ot_mode - overlay tunnel mode. Type: string
+| | ...
+| | ... | *Return:*
+| | ... | - No value returned
+| | ...
+| | ... | *Example:*
+| | ...
+| | ... | \| Send packet and verify LISP encap \| ${nodes['TG']} \| 10.0.0.1 \
+| | ... | \| 32.0.0.1 \| eth2 \| 08:00:27:ee:fd:b3 \| 08:00:27:a2:52:5b \
+| | ... | \| eth3 \| 08:00:27:4d:ca:7a \| 08:00:27:7d:fd:10 \| 10.0.1.1 \
+| | ... | \| 10.0.1.2 \|
+| | ...
+| | [Arguments] | ${tg_node} | ${src_ip} | ${dst_ip} | ${tx_src_port}
+| | ... | ${tx_src_mac} | ${tx_dst_mac} | ${rx_port} | ${rx_src_mac}
+| | ... | ${rx_dst_mac} | ${src_rloc} | ${dst_rloc} | ${ot_mode}
+| | ...
+| | ${tx_port_name}= | Get interface name | ${tg_node} | ${tx_src_port}
+| | ${rx_port_name}= | Get interface name | ${tg_node} | ${rx_port}
+| | ${args}= | Catenate | --tg_src_mac | ${tx_src_mac} | --tg_dst_mac
+| | ... | ${rx_dst_mac} | --dut_if1_mac | ${tx_dst_mac} | --dut_if2_mac
+| | ... | ${rx_src_mac} | --src_ip | ${src_ip} | --dst_ip | ${dst_ip}
+| | ... | --tx_if | ${tx_port_name} | --rx_if | ${rx_port_name}
+| | ... | --src_rloc | ${src_rloc} | --dst_rloc | ${dst_rloc}
+| | ... | --ot_mode | ${ot_mode}
+| | Run Traffic Script On Node | lisp/lispgpe_check.py | ${tg_node}
+| | ... | ${args}
diff --git a/resources/test_data/lisp/lisp.py b/resources/test_data/lisp/lisp.py
new file mode 100644
index 0000000000..4539f8208d
--- /dev/null
+++ b/resources/test_data/lisp/lisp.py
@@ -0,0 +1,93 @@
+# Copyright (c) 2019 Cisco and/or its affiliates.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at:
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+"""Test variables of lisp and lispgpe (ip4/ip6) encapsulation test suite."""
+
+# Lisp default global value
+locator_name = 'tst_locator'
+
+# Test configuration data
+tg_if1_ip4= '6.0.0.2'
+tg_if2_ip4= '6.0.1.2'
+dut_if1_ip4= '6.0.0.1'
+dut_if2_ip4= '6.0.1.1'
+tg_if2_ip6= '6:0:1::2'
+dut_if2_ip6= '6:0:1::1'
+ip4_plen= 24
+src_ip4= '6.0.0.2'
+dst_ip4= '6.0.2.2'
+src_rloc4= dut_if2_ip4
+dst_rloc4= tg_if2_ip4
+src_rloc6= dut_if2_ip6
+dst_rloc6= tg_if2_ip6
+
+#IP6 over IP4 LISP configuration data
+tg_if1_ip6= '6::2'
+dut_if1_ip6= '6:0:0::1'
+src_ip6= '6::2'
+dst_ip6= '6:0:2::2'
+ip6_plen=64
+
+# Lisp default locator_set value
+duts_locator_set = {'locator_name': locator_name,
+ 'priority': 1,
+ 'weight': 1}
+
+# IPv4 Lisp static mapping configuration
+
+dut1_to_tg_ip4_static_adjacency = {'vni': 0,
+ 'deid': '6.0.2.0',
+ 'seid': '6.0.0.0',
+ 'rloc': '6.0.1.2',
+ 'prefix': 24}
+
+dut1_ip4_eid = {'locator_name': locator_name,
+ 'vni': 0,
+ 'eid': '6.0.0.0',
+ 'prefix': 24}
+
+# IPv6 Lisp static mapping configuration
+
+dut1_to_tg_ip6_static_adjacency = {'vni': 0,
+ 'deid': '6:0:2::0',
+ 'seid': '6:0:0::0',
+ 'rloc': '6:0:1::2',
+ 'prefix': 64}
+
+dut1_ip6_eid = {'locator_name': locator_name,
+ 'vni': 0,
+ 'eid': '6:0:0::0',
+ 'prefix': 64}
+
+
+#IPv6 over IPv4 LISP mapping
+dut1_ip6o4_static_adjacency = {'vni': 0,
+ 'deid': '6:0:2::0',
+ 'seid': '6:0:0::0',
+ 'rloc': '6.0.1.2',
+ 'prefix': 64}
+dut1_ip6o4_eid = {'locator_name': locator_name,
+ 'vni': 0,
+ 'eid': '6:0:0::0',
+ 'prefix': 64}
+
+#IPv4 over IPv6 LISP mapping
+dut1_ip4o6_static_adjacency = {'vni': 0,
+ 'deid': '6.0.2.0',
+ 'seid': '6.0.0.0',
+ 'rloc': '6:0:1::2',
+ 'prefix': 24}
+dut1_ip4o6_eid = {'locator_name': locator_name,
+ 'vni': 0,
+ 'eid': '6.0.0.0',
+ 'prefix': 24}
diff --git a/resources/traffic_scripts/lisp/lisp_check.py b/resources/traffic_scripts/lisp/lisp_check.py
index 5e1a835b74..9937de8077 100755
--- a/resources/traffic_scripts/lisp/lisp_check.py
+++ b/resources/traffic_scripts/lisp/lisp_check.py
@@ -72,7 +72,8 @@ def main():
args = TrafficScriptArg(
['tg_src_mac', 'tg_dst_mac', 'src_ip', 'dst_ip', 'dut_if1_mac',
- 'dut_if2_mac', 'src_rloc', 'dst_rloc'])
+ 'dut_if2_mac', 'src_rloc', 'dst_rloc'],
+ ['ot_mode'])
tx_src_mac = args.get_arg('tg_src_mac')
tx_dst_mac = args.get_arg('dut_if1_mac')
@@ -84,6 +85,7 @@ def main():
dst_rloc = args.get_arg("dst_rloc")
tx_if = args.get_arg('tx_if')
rx_if = args.get_arg('rx_if')
+ ot_mode = args.get_arg('ot_mode')
rxq = RxQueue(rx_if)
txq = TxQueue(tx_if)
@@ -124,9 +126,17 @@ def main():
ip = ether.payload
- if not isinstance(ip, ip_format):
- raise RuntimeError(
- "Not an IP packet received {0}".format(ip.__repr__()))
+ if ot_mode == '6to4':
+ if not isinstance(ip, IP):
+ raise RuntimeError(
+ "Not an IP packet received {0}".format(ip.__repr__()))
+ elif ot_mode == '4to6':
+ if not isinstance(ip, IP6):
+ raise RuntimeError(
+ "Not an IP packet received {0}".format(ip.__repr__()))
+ elif not isinstance(ip, ip_format):
+ raise RuntimeError(
+ "Not an IP packet received {0}".format(ip.__repr__()))
lisp = ether.getlayer(lisp_layer)
if not lisp:
diff --git a/resources/traffic_scripts/lisp/lispgpe_check.py b/resources/traffic_scripts/lisp/lispgpe_check.py
index 7979b6ced9..d4de8635d7 100755
--- a/resources/traffic_scripts/lisp/lispgpe_check.py
+++ b/resources/traffic_scripts/lisp/lispgpe_check.py
@@ -96,7 +96,8 @@ def main():
args = TrafficScriptArg(
['tg_src_mac', 'tg_dst_mac', 'src_ip', 'dst_ip', 'dut_if1_mac',
- 'dut_if2_mac', 'src_rloc', 'dst_rloc'])
+ 'dut_if2_mac', 'src_rloc', 'dst_rloc'],
+ ['ot_mode'])
tx_src_mac = args.get_arg('tg_src_mac')
tx_dst_mac = args.get_arg('dut_if1_mac')
@@ -108,6 +109,7 @@ def main():
dst_rloc = args.get_arg("dst_rloc")
tx_if = args.get_arg('tx_if')
rx_if = args.get_arg('rx_if')
+ ot_mode = args.get_arg('ot_mode')
rxq = RxQueue(rx_if)
txq = TxQueue(tx_if)
@@ -146,9 +148,17 @@ def main():
ip = ether.payload
- if not isinstance(ip, ip_format):
- raise RuntimeError(
- "Not an IP packet received {0}".format(ip.__repr__()))
+ if ot_mode == '6to4':
+ if not isinstance(ip, IP):
+ raise RuntimeError(
+ "Not an IP packet received {0}".format(ip.__repr__()))
+ elif ot_mode == '4to6':
+ if not isinstance(ip, IPv6):
+ raise RuntimeError(
+ "Not an IP packet received {0}".format(ip.__repr__()))
+ elif not isinstance(ip, ip_format):
+ raise RuntimeError(
+ "Not an IP packet received {0}".format(ip.__repr__()))
lisp = ether.getlayer(LispGPEHeader).underlayer
if not lisp: