bdf290955e62c86ed9dac5c048aaf45f7f3fdc05
[csit.git] / tests / suites / lisp / lisp_dataplane_untagged.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 | Documentation | Test Lisp static remote mapping topology.
16 | Resource | resources/libraries/robot/default.robot
17 | Resource | resources/libraries/robot/testing_path.robot
18 | Resource | resources/libraries/robot/ipv4.robot
19 | Resource | resources/libraries/robot/traffic.robot
20 | Resource | resources/libraries/robot/lisp/lisp_static_mapping.robot
21 | Resource | resources/libraries/robot/l2_traffic.robot
22 | Library  | resources.libraries.python.IPUtil
23 | Library  | resources.libraries.python.Trace
24 | Library  | resources.libraries.python.IPv4Util.IPv4Util
25 # import additional Lisp settings from resource file
26 | Variables | tests/suites/lisp/resources/lisp_static_mapping.py
27 | Force Tags | 3_NODE_SINGLE_LINK_TOPO | 3_NODE_DOUBLE_LINK_TOPO
28 | ... | VM_ENV | HW_ENV
29 | Test Setup | Run Keywords | Setup all DUTs before test
30 | ...        | AND          | Setup all TGs before traffic script
31 | ...        | AND          | Update All Interface Data On All Nodes | ${nodes}
32 | Test Teardown | Show Packet Trace on All DUTs | ${nodes}
33
34 *** Test Cases ***
35 | VPP can pass IPv4 bidirectionally through LISP
36 | | [Documentation] | Test IP4 Lisp remote static mapping.
37 | | ...             | Set IP4 lisp topology and check if packet passes through
38 | | ...             | Lisp topology.
39 | | Given Path for 3-node testing is set
40 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']}
41 | | And   Interfaces in 3-node path are up
42 | | And   IP addresses are set on interfaces
43 | |       ... | ${dut1_node} | ${dut1_to_dut2}
44 | |       ... | ${dut1_to_dut2_ip4} | ${prefix4}
45 | |       ... | ${dut1_node} | ${dut1_to_tg}
46 | |       ... | ${dut1_to_tg_ip4} | ${prefix4}
47 | |       ... | ${dut2_node} | ${dut2_to_dut1}
48 | |       ... | ${dut2_to_dut1_ip4} | ${prefix4}
49 | |       ... | ${dut2_node} | ${dut2_to_tg}
50 | |       ... | ${dut2_to_tg_ip4} | ${prefix4}
51 | | And   VPP IP Probe | ${dut1_node} | ${dut1_to_dut2} | ${dut2_to_dut1_ip4}
52 | | And   VPP IP Probe | ${dut2_node} | ${dut2_to_dut1} | ${dut1_to_dut2_ip4}
53 | | And   Add Arp On Dut | ${dut2_node} | ${dut2_to_tg} | ${tg2_ip4}
54 | |       ... | ${tg_to_dut2_mac}
55 | | And   Add Arp On Dut | ${dut1_node} | ${dut1_to_tg} | ${tg1_ip4}
56 | |       ... | ${tg_to_dut1_mac}
57 | | When Set up Lisp topology
58 | |      ... | ${dut1_node} | ${dut1_to_dut2} | ${NONE}
59 | |      ... | ${dut2_node} | ${dut2_to_dut1} | ${NONE}
60 | |      ... | ${duts_locator_set} | ${dut1_ip4_eid} | ${dut2_ip4_eid}
61 | |      ... | ${dut1_ip4_static_mapping} | ${dut2_ip4_static_mapping}
62 | | Then Send Packet And Check Headers
63 | |      ... | ${tg_node} | ${tg1_ip4} | ${tg2_ip4}
64 | |      ... | ${tg_to_dut1} | ${tg_to_dut1_mac} | ${dut1_to_tg_mac}
65 | |      ... | ${tg_to_dut2} | ${dut2_to_tg_mac} | ${tg_to_dut2_mac}
66 | | And Send Packet And Check Headers
67 | |      ... | ${tg_node} | ${tg2_ip4} | ${tg1_ip4}
68 | |      ... | ${tg_to_dut2} | ${tg_to_dut2_mac} | ${dut2_to_tg_mac}
69 | |      ... | ${tg_to_dut1} | ${dut1_to_tg_mac} | ${tg_to_dut1_mac}
70
71 | VPP can pass IPv6 bidirectionally through LISP
72 | | [Documentation] | Test IP6 Lisp remote static mapping.
73 | | ...             | Set IP6 lisp topology and check if packet passes through
74 | | ...             | Lisp topology.
75 | | Given Path for 3-node testing is set
76 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']}
77 | | And   Interfaces in 3-node path are up
78 | | And   IP addresses are set on interfaces
79 | |       ... | ${dut1_node} | ${dut1_to_dut2}
80 | |       ... | ${dut1_to_dut2_ip6} | ${prefix6}
81 | |       ... | ${dut1_node} | ${dut1_to_tg}
82 | |       ... | ${dut1_to_tg_ip6} | ${prefix6}
83 | |       ... | ${dut2_node} | ${dut2_to_dut1}
84 | |       ... | ${dut2_to_dut1_ip6} | ${prefix6}
85 | |       ... | ${dut2_node} | ${dut2_to_tg}
86 | |       ... | ${dut2_to_tg_ip6} | ${prefix6}
87 | | And   VPP IP Probe | ${dut1_node} | ${dut1_to_dut2} | ${dut2_to_dut1_ip6}
88 | | And   VPP IP Probe | ${dut2_node} | ${dut2_to_dut1} | ${dut1_to_dut2_ip6}
89 | | And   Add Arp On Dut | ${dut2_node} | ${dut2_to_tg} | ${tg2_ip6}
90 | |       ... | ${tg_to_dut2_mac}
91 | | And   Add Arp On Dut | ${dut1_node} | ${dut1_to_tg} | ${tg1_ip6}
92 | |       ... | ${tg_to_dut1_mac}
93 | | When Set up Lisp topology
94 | |      ... | ${dut1_node} | ${dut1_to_dut2} | ${NONE}
95 | |      ... | ${dut2_node} | ${dut2_to_dut1} | ${NONE}
96 | |      ... | ${duts_locator_set} | ${dut1_ip6_eid} | ${dut2_ip6_eid}
97 | |      ... | ${dut1_ip6_static_mapping} | ${dut2_ip6_static_mapping}
98 | | Then Send Packet And Check Headers
99 | |      ... | ${tg_node} | ${tg1_ip6} | ${tg2_ip6}
100 | |      ... | ${tg_to_dut1} | ${tg_to_dut1_mac} | ${dut1_to_tg_mac}
101 | |      ... | ${tg_to_dut2} | ${dut2_to_tg_mac} | ${tg_to_dut2_mac}
102 | | And Send Packet And Check Headers
103 | |      ... | ${tg_node} | ${tg2_ip6} | ${tg1_ip6}
104 | |      ... | ${tg_to_dut2} | ${tg_to_dut2_mac} | ${dut2_to_tg_mac}
105 | |      ... | ${tg_to_dut1} | ${dut1_to_tg_mac} | ${tg_to_dut1_mac}
106
107 | VPP can pass IPv4 over IPv6 bidirectionally through LISP
108 | | [Documentation] | Test IP4 over IP6 in Lisp remote static mapping.
109 | | ...             | Set IP6 topology and check if the IP4 packet
110 | | ...             | passes through IP6 Lisp topology.
111 | | Given Path for 3-node testing is set
112 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']}
113 | | And   Interfaces in 3-node path are up
114 | | And   IP addresses are set on interfaces
115 | |       ... | ${dut1_node} | ${dut1_to_dut2}
116 | |       ... | ${dut1_to_dut2_ip4o6} | ${dut_prefix4o6}
117 | |       ... | ${dut1_node} | ${dut1_to_tg}
118 | |       ... | ${dut1_to_tg_ip4o6} | ${tg_prefix4o6}
119 | |       ... | ${dut2_node} | ${dut2_to_dut1}
120 | |       ... | ${dut2_to_dut1_ip4o6} | ${dut_prefix4o6}
121 | |       ... | ${dut2_node} | ${dut2_to_tg}
122 | |       ... | ${dut2_to_tg_ip4o6} | ${tg_prefix4o6}
123 | | And   VPP IP Probe | ${dut1_node} | ${dut1_to_dut2} | ${dut2_to_dut1_ip4o6}
124 | | And   VPP IP Probe | ${dut2_node} | ${dut2_to_dut1} | ${dut1_to_dut2_ip4o6}
125 | | And   Add Arp On Dut | ${dut2_node} | ${dut2_to_tg} | ${tg2_ip4o6}
126 | |       ... | ${tg_to_dut2_mac}
127 | | And   Add Arp On Dut | ${dut1_node} | ${dut1_to_tg} | ${tg1_ip4o6}
128 | |       ... | ${tg_to_dut1_mac}
129 | | When Set up Lisp topology
130 | |      ... | ${dut1_node} | ${dut1_to_dut2} | ${NONE}
131 | |      ... | ${dut2_node} | ${dut2_to_dut1} | ${NONE}
132 | |      ... | ${duts_locator_set} | ${dut1_ip4o6_eid} | ${dut2_ip4o6_eid}
133 | |      ... | ${dut1_ip4o6_static_mapping} | ${dut2_ip4o6_static_mapping}
134 | | Then Send Packet And Check Headers
135 | |      ... | ${tg_node} | ${tg1_ip4o6} | ${tg2_ip4o6}
136 | |      ... | ${tg_to_dut1} | ${tg_to_dut1_mac} | ${dut1_to_tg_mac}
137 | |      ... | ${tg_to_dut2} | ${dut2_to_tg_mac} | ${tg_to_dut2_mac}
138 | | And Send Packet And Check Headers
139 | |      ... | ${tg_node} | ${tg2_ip4o6} | ${tg1_ip4o6}
140 | |      ... | ${tg_to_dut2} | ${tg_to_dut2_mac} | ${dut2_to_tg_mac}
141 | |      ... | ${tg_to_dut1} | ${dut1_to_tg_mac} | ${tg_to_dut1_mac}
142
143 | VPP can pass IPv6 over IPv4 bidirectionally through LISP
144 | | [Documentation] | Test IP6 over IP4 in Lisp remote static mapping.
145 | | ...             | Set IP4 topology and check if the IP6 packet
146 | | ...             | passes through IP4 Lisp topology.
147 | | Given Path for 3-node testing is set
148 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']}
149 | | And   Interfaces in 3-node path are up
150 | | And   IP addresses are set on interfaces
151 | |       ... | ${dut1_node} | ${dut1_to_dut2}
152 | |       ... | ${dut1_to_dut2_ip6o4} | ${dut_prefix6o4}
153 | |       ... | ${dut1_node} | ${dut1_to_tg}
154 | |       ... | ${dut1_to_tg_ip6o4} | ${tg_prefix6o4}
155 | |       ... | ${dut2_node} | ${dut2_to_dut1}
156 | |       ... | ${dut2_to_dut1_ip6o4} | ${dut_prefix6o4}
157 | |       ... | ${dut2_node} | ${dut2_to_tg}
158 | |       ... | ${dut2_to_tg_ip6o4} | ${tg_prefix6o4}
159 | | And   VPP IP Probe | ${dut1_node} | ${dut1_to_dut2} | ${dut2_to_dut1_ip6o4}
160 | | And   VPP IP Probe | ${dut2_node} | ${dut2_to_dut1} | ${dut1_to_dut2_ip6o4}
161 | | And   Add Arp On Dut | ${dut2_node} | ${dut2_to_tg} | ${tg2_ip6o4}
162 | |       ... | ${tg_to_dut2_mac}
163 | | And   Add Arp On Dut | ${dut1_node} | ${dut1_to_tg} | ${tg1_ip6o4}
164 | |       ... | ${tg_to_dut1_mac}
165 | | When Set up Lisp topology
166 | |      ... | ${dut1_node} | ${dut1_to_dut2} | ${NONE}
167 | |      ... | ${dut2_node} | ${dut2_to_dut1} | ${NONE}
168 | |      ... | ${duts_locator_set} | ${dut1_ip6o4_eid} | ${dut2_ip6o4_eid}
169 | |      ... | ${dut1_ip6o4_static_mapping} | ${dut2_ip6o4_static_mapping}
170 | | Then Send Packet And Check Headers
171 | |      ... | ${tg_node} | ${tg1_ip6o4} | ${tg2_ip6o4}
172 | |      ... | ${tg_to_dut1} | ${tg_to_dut1_mac} | ${dut1_to_tg_mac}
173 | |      ... | ${tg_to_dut2} | ${dut2_to_tg_mac} | ${tg_to_dut2_mac}
174 | | And Send Packet And Check Headers
175 | |      ... | ${tg_node} | ${tg2_ip6o4} | ${tg1_ip6o4}
176 | |      ... | ${tg_to_dut2} | ${tg_to_dut2_mac} | ${dut2_to_tg_mac}
177 | |      ... | ${tg_to_dut1} | ${dut1_to_tg_mac} | ${tg_to_dut1_mac}