c0a411cc4af9534bf6fd18ec630aa291a6c36e85
[csit.git] / tests / func / lisp / l2_lisp_ipv4.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 | Library | resources.libraries.python.topology.Topology
16 | Library | resources.libraries.python.NodePath
17 | Library | resources.libraries.python.Trace
18 | Library | resources.libraries.python.IPUtil
19 | Library | resources.libraries.python.LispUtil
20 | Library | resources.libraries.python.L2Util
21 | Resource | resources/libraries/robot/traffic.robot
22 | Resource | resources/libraries/robot/default.robot
23 | Resource | resources/libraries/robot/interfaces.robot
24 | Resource | resources/libraries/robot/testing_path.robot
25 | Resource | resources/libraries/robot/ipv4.robot
26 | Resource | resources/libraries/robot/lisp/l2lisp.robot
27 # Import configuration and test data:
28 | Variables | resources/test_data/lisp/l2/l2_ipv4.py
29 | ...
30 | Force Tags | 3_NODE_SINGLE_LINK_TOPO | VM_ENV | LISP
31 | ...
32 | Test Setup | Func Test Setup
33 | Test Teardown | Func Test Teardown
34 | ...
35 | Documentation | *ip4-lispgpe-ip4 encapsulation test cases*
36 | ...
37 | ... | *[Top] Network Topologies:* TG-DUT1-DUT2-TG 3-node circular topology\
38 | ... | with single links between nodes.
39 | ... | *[Enc] Packet Encapsulations:* Eth-IPv4-ICMPv4-LISPGpe-IP4
40 | ... | *[Cfg] DUT configuration:* DUT1 and DUT2 are configured with IPv4\
41 | ... | routing and static routes. LISPoIPv4 tunnel is configured between\
42 | ... | DUT1 and DUT2.
43 | ... | *[Ver] TG verification:* Test ICMPv4 Echo Request packets are sent in\
44 | ... | both directions by TG on links to DUT1 and DUT2; on receive\
45 | ... | TG verifies packets for correctness and their IPv4 src-addr, dst-addr\
46 | ... | and MAC addresses.
47 | ... | *[Ref] Applicable standard specifications:* RFC6830.
48
49 *** Test Cases ***
50 | TC01: Route IPv4 packet through LISP with Bridge Domain setup.
51 | | [Documentation]
52 | | ... | [Top] TG-DUT1-DUT2-TG.
53 | | ... | [Enc] Eth-IPv4-ICMPv4-LISPGpe-IP4
54 | | ... | [Cfg] Configure IPv4 LISP static adjacencies on DUT1 and DUT2. Also\
55 | | ... | configure BD and assign it to LISP VNI.
56 | | ... | [Ver] Make TG send ICMPv4 Echo Req between its interfaces across both\
57 | | ... | DUTs and LISP tunnel between them; verify IPv4, Ether headers on\
58 | | ... | received packets are correct.
59 | | ... | [Ref] RFC6830.
60 | | ...
61 | | Given Path for 3-node testing is set
62 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']}
63 | | And Interfaces in 3-node path are up
64 | | And IP addresses are set on interfaces
65 | | ... | ${dut1_node} | ${dut1_to_dut2} | ${dut1_to_dut2_ip4} | ${prefix4}
66 | | ... | ${dut1_node} | ${dut1_to_tg} | ${dut1_to_tg_ip4} | ${prefix4}
67 | | ... | ${dut2_node} | ${dut2_to_dut1} | ${dut2_to_dut1_ip4} | ${prefix4}
68 | | ... | ${dut2_node} | ${dut2_to_tg} | ${dut2_to_tg_ip4} | ${prefix4}
69 | | And Add Arp On Dut | ${dut2_node} | ${dut2_to_tg} | ${tg2_ip4}
70 | | ... | ${tg_to_dut2_mac}
71 | | And Add Arp On Dut | ${dut1_node} | ${dut1_to_tg} | ${tg1_ip4}
72 | | ... | ${tg_to_dut1_mac}
73 | | And Add Arp On Dut | ${dut1_node} | ${dut1_to_dut2} | ${dut2_to_dut1_ip4}
74 | | ... | ${dut2_to_dut1_mac}
75 | | And Add Arp On Dut | ${dut2_node} | ${dut2_to_dut1} | ${dut1_to_dut2_ip4}
76 | | ... | ${dut1_to_dut2_mac}
77 | | When Create L2 BD | ${dut1_node} | ${vpp_bd_id}
78 | | And Add Interface To L2 BD | ${dut1_node} | ${dut1_to_tg} | ${vpp_bd_id}
79 | | And Create L2 BD | ${dut2_node} | ${vpp_bd_id}
80 | | And Add Interface To L2 BD | ${dut2_node} | ${dut2_to_tg} | ${vpp_bd_id}
81 | | And Set up L2 Lisp on DUT | ${dut1_node}
82 | | ... | ${dut1_to_dut2_ip4_static_adjacency}
83 | | ... | ${lisp_dut_settings}
84 | | And Set up L2 Lisp on DUT | ${dut2_node}
85 | | ... | ${dut2_to_dut1_ip4_static_adjacency}
86 | | ... | ${lisp_dut_settings}
87 | | Then Send Packet And Check Headers
88 | | ... | ${tg_node} | ${tg1_ip4} | ${tg2_ip4}
89 | | ... | ${tg_to_dut1} | ${tg_if1_mac} | ${tg_if2_mac}
90 | | ... | ${tg_to_dut2} | ${tg_if1_mac} | ${tg_if2_mac}
91 | | And Send Packet And Check Headers
92 | | ... | ${tg_node} | ${tg2_ip4} | ${tg1_ip4}
93 | | ... | ${tg_to_dut2} | ${tg_if2_mac} | ${tg_if1_mac}
94 | | ... | ${tg_to_dut1} | ${tg_if2_mac} | ${tg_if1_mac}
95
96