CSIT-604: Bootstrap file for vpp-csit-verify-master-centos7-nightly
[csit.git] / tests / vpp / func / ip4_tunnels / 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/shared/default.robot
16 | Resource | resources/libraries/robot/shared/testing_path.robot
17 | Resource | resources/libraries/robot/ip/ip4.robot
18 | Resource | resources/libraries/robot/shared/traffic.robot
19 | Resource | resources/libraries/robot/overlay/lisp_static_adjacency.robot
20 | Resource | resources/libraries/robot/l2/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 | ...
26 | Force Tags | 3_NODE_SINGLE_LINK_TOPO | 3_NODE_DOUBLE_LINK_TOPO
27 | ... | VM_ENV | HW_ENV
28 | ...
29 | Test Setup | Set up functional test
30 | ...
31 | Test Teardown | Tear down functional test
32 | ...
33 | Documentation | *IP AFI independent functional tests.*
34 | ...
35 | ... | *[Top] Network Topologies:* TG-DUT1-DUT2-TG 3-node circular topology\
36 | ... | with single links between nodes.
37 | ... | *[Enc] Packet Encapsulations:* Eth-IPv4-LISP-IPv4-ICMPv4 on DUT1-DUT2,\
38 | ... | Eth-IPv4-ICMPv4 on TG-DUTn for IPv4 routing over LISPoIPv4 tunnel.
39 | ... | *[Cfg] DUT configuration:* DUT1 and DUT2 are configured with IPv4\
40 | ... | routing and static routes. LISPoIPv4 tunnel is\
41 | ... | configured between DUT1 and DUT2.
42 | ... | *[Ver] TG verification:* Test ICMPv4 Echo Request packets\
43 | ... | are sent in both directions by TG on links to DUT1 and DUT2; on receive\
44 | ... | TG verifies packets for correctness and their IPv4 src-addr,\
45 | ... | dst-addr and MAC addresses.
46 | ... | *[Ref] Applicable standard specifications:* RFC6830.
47
48 *** Test Cases ***
49 | TC01: DUT1 and DUT2 route IPv4 over LISPoIPv4 tunnel after disable-enable
50 | | [Documentation]
51 | | ... | [Top] TG-DUT1-DUT2-TG.
52 | | ... | [Enc] Eth-IPv4-LISP-IPv4-ICMPv4 on DUT1-DUT2, Eth-IPv4-ICMPv4 on\
53 | | ... | TG-DUTn.
54 | | ... | [Cfg1] On DUT1 and DUT2 configure IPv4 LISP static adjacencies.
55 | | ... | [Ver1] Make TG send ICMPv4 Echo Req between its interfaces across\
56 | | ... | both DUTs and LISP tunnel between them; verify IPv4 headers on\
57 | | ... | received packets are correct.
58 | | ... | [Cfg2] Disable LISP.
59 | | ... | [Ver2] Verify packets are not received via LISP tunnel.
60 | | ... | [Cfg3] Re-enable LISP.
61 | | ... | [Ver3] Verify packets are received again via LISP tunnel.
62 | | ... | [Ref] RFC6830.
63 | | Given Configure path in 3-node circular topology
64 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']}
65 | | And Set interfaces in 3-node circular topology up
66 | | And Configure IP addresses on interfaces
67 | | ... | ${dut1_node} | ${dut1_to_dut2}
68 | | ... | ${dut1_to_dut2_ip4} | ${prefix4}
69 | | ... | ${dut1_node} | ${dut1_to_tg}
70 | | ... | ${dut1_to_tg_ip4} | ${prefix4}
71 | | ... | ${dut2_node} | ${dut2_to_dut1}
72 | | ... | ${dut2_to_dut1_ip4} | ${prefix4}
73 | | ... | ${dut2_node} | ${dut2_to_tg}
74 | | ... | ${dut2_to_tg_ip4} | ${prefix4}
75 | | And VPP IP Probe | ${dut1_node} | ${dut1_to_dut2} | ${dut2_to_dut1_ip4}
76 | | And VPP IP Probe | ${dut2_node} | ${dut2_to_dut1} | ${dut1_to_dut2_ip4}
77 | | And Add Arp On Dut | ${dut2_node} | ${dut2_to_tg} | ${tg2_ip4}
78 | | ... | ${tg_to_dut2_mac}
79 | | And Add Arp On Dut | ${dut1_node} | ${dut1_to_tg} | ${tg1_ip4}
80 | | ... | ${tg_to_dut1_mac}
81 | | When Configure LISP topology in 3-node circular topology
82 | | ... | ${dut1_node} | ${dut1_to_dut2} | ${NONE}
83 | | ... | ${dut2_node} | ${dut2_to_dut1} | ${NONE}
84 | | ... | ${duts_locator_set} | ${dut1_ip4_eid} | ${dut2_ip4_eid}
85 | | ... | ${dut1_to_dut2_ip4_static_adjacency}
86 | | ... | ${dut2_to_dut1_ip4_static_adjacency}
87 | | Then Send packet and verify headers
88 | | ... | ${tg_node} | ${tg1_ip4} | ${tg2_ip4}
89 | | ... | ${tg_to_dut1} | ${tg_to_dut1_mac} | ${dut1_to_tg_mac}
90 | | ... | ${tg_to_dut2} | ${dut2_to_tg_mac} | ${tg_to_dut2_mac}
91 | | And Send packet and verify headers
92 | | ... | ${tg_node} | ${tg2_ip4} | ${tg1_ip4}
93 | | ... | ${tg_to_dut2} | ${tg_to_dut2_mac} | ${dut2_to_tg_mac}
94 | | ... | ${tg_to_dut1} | ${dut1_to_tg_mac} | ${tg_to_dut1_mac}
95 | | When Disable Lisp | ${dut1_node}
96 | | Then Packet transmission from port to port should fail
97 | | ... | ${tg_node} | ${tg1_ip4} | ${tg2_ip4}
98 | | ... | ${tg_to_dut1} | ${tg_to_dut1_mac} | ${dut1_to_tg_mac}
99 | | ... | ${tg_to_dut2} | ${dut2_to_tg_mac} | ${tg_to_dut2_mac}
100 | | And Packet transmission from port to port should fail
101 | | ... | ${tg_node} | ${tg2_ip4} | ${tg1_ip4}
102 | | ... | ${tg_to_dut2} | ${tg_to_dut2_mac} | ${dut2_to_tg_mac}
103 | | ... | ${tg_to_dut1} | ${dut1_to_tg_mac} | ${tg_to_dut1_mac}
104 | | When Enable Lisp | ${dut1_node}
105 | | And Vpp Add Lisp Adjacency | ${dut1_node}
106 | | ... | ${dut1_to_dut2_ip4_static_adjacency['vni']}
107 | | ... | ${dut1_to_dut2_ip4_static_adjacency['deid']}
108 | | ... | ${dut1_to_dut2_ip4_static_adjacency['prefix']}
109 | | ... | ${dut1_to_dut2_ip4_static_adjacency['seid']}
110 | | ... | ${dut1_to_dut2_ip4_static_adjacency['prefix']}
111 | | And Vpp Add Lisp Adjacency | ${dut2_node}
112 | | ... | ${dut2_to_dut1_ip4_static_adjacency['vni']}
113 | | ... | ${dut2_to_dut1_ip4_static_adjacency['deid']}
114 | | ... | ${dut2_to_dut1_ip4_static_adjacency['prefix']}
115 | | ... | ${dut2_to_dut1_ip4_static_adjacency['seid']}
116 | | ... | ${dut2_to_dut1_ip4_static_adjacency['prefix']}
117 | | Then Wait Until Keyword Succeeds | 2x | 5s | Send packet and verify headers
118 | | ... | ${tg_node} | ${tg1_ip4} | ${tg2_ip4}
119 | | ... | ${tg_to_dut1} | ${tg_to_dut1_mac} | ${dut1_to_tg_mac}
120 | | ... | ${tg_to_dut2} | ${dut2_to_tg_mac} | ${tg_to_dut2_mac}
121 | | And Wait Until Keyword Succeeds | 2x | 5s | Send packet and verify headers
122 | | ... | ${tg_node} | ${tg2_ip4} | ${tg1_ip4}
123 | | ... | ${tg_to_dut2} | ${tg_to_dut2_mac} | ${dut2_to_tg_mac}
124 | | ... | ${tg_to_dut1} | ${dut1_to_tg_mac} | ${tg_to_dut1_mac}