CSIT-662: KWI - KW renaming
[csit.git] / tests / func / lisp / eth2p-ethip4lisp-ip4base-func.robot
1 # Copyright (c) 2016 Cisco and/or its affiliates.
2 # Licensed under the Apache License, Version 2.0 (the "License");
3 # you may not use this file except in compliance with the License.
4 # You may obtain a copy of the License at:
5 #
6 #     http://www.apache.org/licenses/LICENSE-2.0
7 #
8 # Unless required by applicable law or agreed to in writing, software
9 # distributed under the License is distributed on an "AS IS" BASIS,
10 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11 # See the License for the specific language governing permissions and
12 # limitations under the License.
13
14 *** Settings ***
15 | Resource | resources/libraries/robot/default.robot
16 | Resource | resources/libraries/robot/testing_path.robot
17 | Resource | resources/libraries/robot/ipv4.robot
18 | Resource | resources/libraries/robot/traffic.robot
19 | Resource | resources/libraries/robot/lisp/lisp_static_adjacency.robot
20 | Resource | resources/libraries/robot/l2_traffic.robot
21 | Library  | resources.libraries.python.IPUtil
22 | Library  | resources.libraries.python.Trace
23 # import additional Lisp settings from resource file
24 | Variables | resources/test_data/lisp/static_adjacency/lisp_static_adjacency.py
25 | Force Tags | 3_NODE_SINGLE_LINK_TOPO | 3_NODE_DOUBLE_LINK_TOPO
26 | ... | VM_ENV | HW_ENV
27 | Test Setup | Set up functional test
28 | Test Teardown | Tear down functional test
29 | Documentation | *IP AFI independent functional tests.*
30 | ...
31 | ... | *[Top] Network Topologies:* TG-DUT1-DUT2-TG 3-node circular topology\
32 | ... | with single links between nodes.
33 | ... | *[Enc] Packet Encapsulations:* Eth-IPv4-LISP-IPv4-ICMPv4 on DUT1-DUT2,\
34 | ... | Eth-IPv4-ICMPv4 on TG-DUTn for IPv4 routing over LISPoIPv4 tunnel.
35 | ... | *[Cfg] DUT configuration:* DUT1 and DUT2 are configured with IPv4\
36 | ... | routing and static routes. LISPoIPv4 tunnel is\
37 | ... | configured between DUT1 and DUT2.
38 | ... | *[Ver] TG verification:* Test ICMPv4 Echo Request packets\
39 | ... | are sent in both directions by TG on links to DUT1 and DUT2; on receive\
40 | ... | TG verifies packets for correctness and their IPv4 src-addr,\
41 | ... | dst-addr and MAC addresses.
42 | ... | *[Ref] Applicable standard specifications:* RFC6830.
43
44 *** Test Cases ***
45 | TC01: DUT1 and DUT2 route IPv4 over LISPoIPv4 tunnel after disable-enable
46 | | [Documentation]
47 | | ... | [Top] TG-DUT1-DUT2-TG.
48 | | ... | [Enc] Eth-IPv4-LISP-IPv4-ICMPv4 on DUT1-DUT2, Eth-IPv4-ICMPv4 on\
49 | | ... | TG-DUTn.
50 | | ... | [Cfg1] On DUT1 and DUT2 configure IPv4 LISP static adjacencies.
51 | | ... | [Ver1] Make TG send ICMPv4 Echo Req between its interfaces across\
52 | | ... | both DUTs and LISP tunnel between them; verify IPv4 headers on\
53 | | ... | received packets are correct.
54 | | ... | [Cfg2] Disable LISP.
55 | | ... | [Ver2] Verify packets are not received via LISP tunnel.
56 | | ... | [Cfg3] Re-enable LISP.
57 | | ... | [Ver3] Verify packets are received again via LISP tunnel.
58 | | ... | [Ref] RFC6830.
59 | | Given Configure path in 3-node circular topology
60 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']}
61 | | And   Set interfaces in 3-node circular topology up
62 | | And   Configure IP addresses on interfaces
63 | |       ... | ${dut1_node} | ${dut1_to_dut2}
64 | |       ... | ${dut1_to_dut2_ip4} | ${prefix4}
65 | |       ... | ${dut1_node} | ${dut1_to_tg}
66 | |       ... | ${dut1_to_tg_ip4} | ${prefix4}
67 | |       ... | ${dut2_node} | ${dut2_to_dut1}
68 | |       ... | ${dut2_to_dut1_ip4} | ${prefix4}
69 | |       ... | ${dut2_node} | ${dut2_to_tg}
70 | |       ... | ${dut2_to_tg_ip4} | ${prefix4}
71 | | And   VPP IP Probe | ${dut1_node} | ${dut1_to_dut2} | ${dut2_to_dut1_ip4}
72 | | And   VPP IP Probe | ${dut2_node} | ${dut2_to_dut1} | ${dut1_to_dut2_ip4}
73 | | And   Add Arp On Dut | ${dut2_node} | ${dut2_to_tg} | ${tg2_ip4}
74 | |       ... | ${tg_to_dut2_mac}
75 | | And   Add Arp On Dut | ${dut1_node} | ${dut1_to_tg} | ${tg1_ip4}
76 | |       ... | ${tg_to_dut1_mac}
77 | | When Configure LISP topology in 3-node circular topology
78 | |      ... | ${dut1_node} | ${dut1_to_dut2} | ${NONE}
79 | |      ... | ${dut2_node} | ${dut2_to_dut1} | ${NONE}
80 | |      ... | ${duts_locator_set} | ${dut1_ip4_eid} | ${dut2_ip4_eid}
81 | |      ... | ${dut1_to_dut2_ip4_static_adjacency}
82 | |      ... | ${dut2_to_dut1_ip4_static_adjacency}
83 | | Then Send packet and verify headers
84 | |      ... | ${tg_node} | ${tg1_ip4} | ${tg2_ip4}
85 | |      ... | ${tg_to_dut1} | ${tg_to_dut1_mac} | ${dut1_to_tg_mac}
86 | |      ... | ${tg_to_dut2} | ${dut2_to_tg_mac} | ${tg_to_dut2_mac}
87 | | And Send packet and verify headers
88 | |      ... | ${tg_node} | ${tg2_ip4} | ${tg1_ip4}
89 | |      ... | ${tg_to_dut2} | ${tg_to_dut2_mac} | ${dut2_to_tg_mac}
90 | |      ... | ${tg_to_dut1} | ${dut1_to_tg_mac} | ${tg_to_dut1_mac}
91 | | When Disable Lisp | ${dut1_node}
92 | | Then Packet transmission from port to port should fail
93 | |      ... | ${tg_node} | ${tg1_ip4} | ${tg2_ip4}
94 | |      ... | ${tg_to_dut1} | ${tg_to_dut1_mac} | ${dut1_to_tg_mac}
95 | |      ... | ${tg_to_dut2} | ${dut2_to_tg_mac} | ${tg_to_dut2_mac}
96 | | And Packet transmission from port to port should fail
97 | |      ... | ${tg_node} | ${tg2_ip4} | ${tg1_ip4}
98 | |      ... | ${tg_to_dut2} | ${tg_to_dut2_mac} | ${dut2_to_tg_mac}
99 | |      ... | ${tg_to_dut1} | ${dut1_to_tg_mac} | ${tg_to_dut1_mac}
100 | | When Enable Lisp | ${dut1_node}
101 | | And Vpp Add Lisp Adjacency | ${dut1_node}
102 | |     ... | ${dut1_to_dut2_ip4_static_adjacency['vni']}
103 | |     ... | ${dut1_to_dut2_ip4_static_adjacency['deid']}
104 | |     ... | ${dut1_to_dut2_ip4_static_adjacency['prefix']}
105 | |     ... | ${dut1_to_dut2_ip4_static_adjacency['seid']}
106 | |     ... | ${dut1_to_dut2_ip4_static_adjacency['prefix']}
107 | | And Vpp Add Lisp Adjacency | ${dut2_node}
108 | |     ... | ${dut2_to_dut1_ip4_static_adjacency['vni']}
109 | |     ... | ${dut2_to_dut1_ip4_static_adjacency['deid']}
110 | |     ... | ${dut2_to_dut1_ip4_static_adjacency['prefix']}
111 | |     ... | ${dut2_to_dut1_ip4_static_adjacency['seid']}
112 | |     ... | ${dut2_to_dut1_ip4_static_adjacency['prefix']}
113 | | Then Wait Until Keyword Succeeds | 2x | 5s | Send packet and verify headers
114 | |      ... | ${tg_node} | ${tg1_ip4} | ${tg2_ip4}
115 | |      ... | ${tg_to_dut1} | ${tg_to_dut1_mac} | ${dut1_to_tg_mac}
116 | |      ... | ${tg_to_dut2} | ${dut2_to_tg_mac} | ${tg_to_dut2_mac}
117 | | And Wait Until Keyword Succeeds | 2x | 5s | Send packet and verify headers
118 | |      ... | ${tg_node} | ${tg2_ip4} | ${tg1_ip4}
119 | |      ... | ${tg_to_dut2} | ${tg_to_dut2_mac} | ${dut2_to_tg_mac}
120 | |      ... | ${tg_to_dut1} | ${dut1_to_tg_mac} | ${tg_to_dut1_mac}