f3114723cc085e230d5bb77c89e7f68c1782f4af
[csit.git] / tests / vpp / func / ip4_tunnels / lisp / eth2p-ethip4lispgpe-ip6base-func.robot
1 # Copyright (c) 2019 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.IPUtil
16 | Library  | resources.libraries.python.Trace
17 | Library | resources.libraries.python.VhostUser
18 | Library  | resources.libraries.python.VPPUtil
19 | ...
20 | Resource | resources/libraries/robot/ip/ip4.robot
21 | Resource | resources/libraries/robot/l2/l2_bridge_domain.robot
22 | Resource | resources/libraries/robot/l2/l2_traffic.robot
23 | Resource | resources/libraries/robot/overlay/lispgpe.robot
24 | Resource | resources/libraries/robot/overlay/lisp_static_adjacency.robot
25 | Resource | resources/libraries/robot/shared/default.robot
26 | Resource | resources/libraries/robot/shared/testing_path.robot
27 | Resource | resources/libraries/robot/shared/traffic.robot
28 | Resource | resources/libraries/robot/vm/qemu.robot
29 | ...
30 # import additional Lisp settings from resource file
31 | Variables | resources/test_data/lisp/static_adjacency/lisp_static_adjacency.py
32 | ...
33 | Force Tags | 3_NODE_SINGLE_LINK_TOPO | 3_NODE_DOUBLE_LINK_TOPO
34 | ... | VM_ENV | HW_ENV
35 | ...
36 | Test Setup | Set up functional test
37 | ...
38 | Test Teardown | Tear down functional test
39 | ...
40 | Documentation | *LISP static adjacency test cases*
41 | ...
42 | ... | *[Top] Network Topologies:* TG-DUT1-DUT2-TG 3-node circular topology\
43 | ... | with single links between nodes.
44 | ... | *[Enc] Packet Encapsulations:* Eth-IPv4-LISP-IPv6-ICMPv6 on DUT1-DUT2,\
45 | ... | Eth-IPv6-ICMPv6 on TG-DUTn for IPv6 routing over LISPoIPv4 tunnel.
46 | ... | *[Cfg] DUT configuration:* DUT1 and DUT2 are configured with IPv6\
47 | ... | routing and static routes. LISPoIPv4 tunnel is configured\
48 | ... | between DUT1 and DUT2.
49 | ... | *[Ver] TG verification:* Test ICMPv6 Echo Request packets\
50 | ... | are sent in both directions by TG on links to DUT1 and DUT2; on receive\
51 | ... | TG verifies packets for correctness and their IPv6 src-addr,\
52 | ... | dst-addr and MAC addresses.
53 | ... | *[Ref] Applicable standard specifications:* RFC6830.
54
55 *** Test Cases ***
56 | TC01: DUT1 and DUT2 route IPv6 bidirectionally over LISPoIPv4 tunnel
57 | | [Documentation]
58 | | ... | [Top] TG-DUT1-DUT2-TG.
59 | | ... | [Enc] Eth-IPv4-LISP-IPv6-ICMPv6 on DUT1-DUT2, Eth-IPv6-ICMPv6 on\
60 | | ... | TG-DUTn.
61 | | ... | [Cfg] On DUT1 and DUT2 configure IPv4 LISP static adjacencies.
62 | | ... | [Ver] Make TG send ICMPv6 Echo Req between its interfaces across both\
63 | | ... | DUTs and LISP tunnel between them; verify IPv6 headers on received\
64 | | ... | packets are correct.
65 | | ... | [Cfg2] Reconf LISP.
66 | | ... | [Ver2] Verify packets are received again via LISP tunnel.
67 | | ... | [Ref] RFC6830.
68 | | Given Configure path in 3-node circular topology
69 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']}
70 | | And Set interfaces in 3-node circular topology up
71 | | And Configure IP addresses on interfaces
72 | | ... | ${dut1_node} | ${dut1_to_dut2}
73 | | ... | ${dut1_to_dut2_ip6o4} | ${dut_prefix6o4}
74 | | ... | ${dut1_node} | ${dut1_to_tg}
75 | | ... | ${dut1_to_tg_ip6o4} | ${tg_prefix6o4}
76 | | ... | ${dut2_node} | ${dut2_to_dut1}
77 | | ... | ${dut2_to_dut1_ip6o4} | ${dut_prefix6o4}
78 | | ... | ${dut2_node} | ${dut2_to_tg}
79 | | ... | ${dut2_to_tg_ip6o4} | ${tg_prefix6o4}
80 | | And Add IP Neighbors
81 | | And Vpp All RA Suppress Link Layer | ${nodes}
82 | | When Configure LISP topology in 3-node circular topology
83 | | ... | ${dut1_node} | ${dut1_to_dut2} | ${NONE}
84 | | ... | ${dut2_node} | ${dut2_to_dut1} | ${NONE}
85 | | ... | ${duts_locator_set} | ${dut1_ip6o4_eid} | ${dut2_ip6o4_eid}
86 | | ... | ${dut1_ip6o4_static_adjacency} | ${dut2_ip6o4_static_adjacency}
87 | | Then Send packet and verify headers
88 | | ... | ${tg_node} | ${tg1_ip6o4} | ${tg2_ip6o4}
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_ip6o4} | ${tg1_ip6o4}
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 Change LISP Configuration | ${dut1_node} | ${dut2_node}
96 | | ... | ${dut1_to_dut2} | ${dut2_to_dut1} | ${dut1_to_dut2_mac}
97 | | ... | ${dut2_to_dut1_mac} | ${dut1_to_dut2_ip6o4}
98 | | ... | ${dut2_to_dut1_ip6o4_reconf} | ${dut_prefix6o4}
99 | | ... | ${dut1_ip6o4_static_adjacency}
100 | | ... | ${dut1_ip6o4_static_adjacency_reconf}
101 | | Then Send packet and verify headers
102 | | ... | ${tg_node} | ${tg1_ip6o4} | ${tg2_ip6o4}
103 | | ... | ${tg_to_dut1} | ${tg_to_dut1_mac} | ${dut1_to_tg_mac}
104 | | ... | ${tg_to_dut2} | ${dut2_to_tg_mac} | ${tg_to_dut2_mac}
105 | | And Send packet and verify headers
106 | | ... | ${tg_node} | ${tg2_ip6o4} | ${tg1_ip6o4}
107 | | ... | ${tg_to_dut2} | ${tg_to_dut2_mac} | ${dut2_to_tg_mac}
108 | | ... | ${tg_to_dut1} | ${dut1_to_tg_mac} | ${tg_to_dut1_mac}
109
110 *** Keywords ***
111 | Add IP Neighbors
112 | | [Documentation]
113 | | ... | Add IP neighbors to physical interfaces on DUTs.
114 | | ...
115 | | VPP Add IP Neighbor
116 | | ... | ${dut1_node} | ${dut1_to_tg} | ${tg1_ip6o4} | ${tg_to_dut1_mac}
117 | | VPP Add IP Neighbor
118 | | ... | ${dut2_node} | ${dut2_to_tg} | ${tg2_ip6o4} | ${tg_to_dut2_mac}
119 | | VPP Add IP Neighbor | ${dut1_node}
120 | | ... | ${dut1_to_dut2} | ${dut2_to_dut1_ip6o4} | ${dut2_to_dut1_mac}
121 | | VPP Add IP Neighbor | ${dut2_node}
122 | | ... | ${dut2_to_dut1} | ${dut1_to_dut2_ip6o4} | ${dut1_to_dut2_mac}