718ac0438388afec1908759f8f5e812587d9a878
[csit.git] / tests / vpp / func / crypto / default / eth2p-ethip4ipsectptlispgpe-ip6basevrf-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 | 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.L2Util
20 | Library | resources.libraries.python.LispUtil
21 | Library | resources.libraries.python.IPsecUtil
22 | Library | resources.libraries.python.VatJsonUtil
23 | Library | resources.libraries.python.IPv6Setup
24 | Library | resources.libraries.python.VPPUtil
25 | Library | String
26 | Resource | resources/libraries/robot/shared/traffic.robot
27 | Resource | resources/libraries/robot/shared/default.robot
28 | Resource | resources/libraries/robot/shared/interfaces.robot
29 | Resource | resources/libraries/robot/shared/testing_path.robot
30 | Resource | resources/libraries/robot/ip/ip6.robot
31 | Resource | resources/libraries/robot/crypto/ipsec.robot
32 | Resource | resources/libraries/robot/overlay/lispgpe.robot
33 | Resource | resources/libraries/robot/l2/l2_bridge_domain.robot
34 # Import configuration and test data:
35 | Variables | resources/test_data/lisp/ipv6_lispgpe_ipv4/ipv6_lispgpe_ipsec_ipv4.py
36 | ...
37 | Force Tags | 3_NODE_SINGLE_LINK_TOPO | VM_ENV | LISP | SKIP_VPP_PATCH
38 | ...
39 | Test Setup | Set up functional test
40 | ...
41 | Test Teardown | Tear down LISP functional test
42 | ...
43 | Documentation | *IPv6 - ip4-ipsec-lispgpe-ip6 - main fib, vrf, virt2lisp,\
44 | ... | phy2lisp*
45 | ...
46 | ... | *[Top] Network Topologies:* TG-DUT1-DUT2-TG 3-node circular topology\
47 | ... | with single links between nodes.
48 | ... | *[Enc] Packet Encapsulations:* Eth-IPv4-LISPGPE-IPSec-IPv6-ICMP,\
49 | ... | Eth-IPv4-IPSec-LISPGPE-IPv6-ICMP
50 | ... | *[Cfg] DUT configuration:* Each DUT is configured with LISP and IPsec.\
51 | ... | IPsec is in transport mode. Tests cases are for IPsec configured both\
52 | ... | on RLOC interface or lisp_gpe0 interface.
53 | ... | *[Ver] TG verification:* Packet is send from TG(if1) across the DUT1 to\
54 | ... | DUT2 where it is forwarded to TG(if2).
55 | ... | *[Ref] Applicable standard specifications:* RFC6830, RFC4303.
56
57 *** Test Cases ***
58 | TC01: DUT1 and DUT2 route IPv6 bidirectionally over LISP GPE tunnel using physical interfaces and VRF is enabled
59 | | [Documentation]
60 | | ... | [Top] TG-DUT1-DUT2-TG.
61 | | ... | [Enc] Eth-IPv4-IPSec-LISPGPE-IPv6-ICMPv6 on DUT1-DUT2,\
62 | | ... | Eth-IPv6-ICMPv6, on TG-DUTn.
63 | | ... | [Cfg] Configure IPv4 LISP static adjacencies on DUT1 and DUT2 with\
64 | | ... | IPsec in between DUTS.
65 | | ... | [Ver] Case: ip4-ipsec-lispgpe-ip6 - vrf, phy2lisp
66 | | ... | Make TG send ICMPv6 Echo Req between its interfaces across both\
67 | | ... | DUTs and LISP GPE tunnel between them; verify IPv6 headers on\
68 | | ... | received packets are correct.
69 | | ... | [Ref] RFC6830, RFC4303.
70 | | ...
71 | | ${encr_alg}= | Crypto Alg AES CBC 128
72 | | ${auth_alg}= | Integ Alg SHA1 96
73 | | Given Configure path in 3-node circular topology
74 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']}
75 | | And Set interfaces in 3-node circular topology up
76 | | And Add Fib Table | ${dut1_node} | ${fib_table_1} | ip6=${TRUE}
77 | | And Add Fib Table | ${dut2_node} | ${fib_table_1} | ip6=${TRUE}
78 | | Assign Interface To Fib Table | ${dut1_node}
79 | | ... | ${dut1_to_tg} | ${fib_table_1} | ip6=${TRUE}
80 | | Assign Interface To Fib Table | ${dut2_node}
81 | | ... | ${dut2_to_tg} | ${fib_table_1} | ip6=${TRUE}
82 | | And Generate keys for IPSec | ${encr_alg} | ${auth_alg}
83 | | When Configure manual keyed connection for IPSec
84 | | ... | ${dut1_node} | ${dut1_to_dut2} | ${encr_alg} | ${encr_key}
85 | | ... | ${auth_alg} | ${auth_key} | ${dut1_spi} | ${dut2_spi}
86 | | ... | ${dut1_to_dut2_ip4} | ${dut2_to_dut1_ip4}
87 | | And Configure manual keyed connection for IPSec
88 | | ... | ${dut2_node} | ${dut2_to_dut1} | ${encr_alg} | ${encr_key}
89 | | ... | ${auth_alg} | ${auth_key} | ${dut2_spi} | ${dut1_spi}
90 | | ... | ${dut2_to_dut1_ip4} | ${dut1_to_dut2_ip4}
91 | | Setup Topology And Lisp | ${fib_table_1} | ${dut1_dut2_vni}
92 | | Then Send packet and verify headers
93 | | ... | ${tg_node} | ${tg1_ip6} | ${tg2_ip6}
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 Send packet and verify headers
97 | | ... | ${tg_node} | ${tg2_ip6} | ${tg1_ip6}
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
101 *** Keywords ***
102 | Setup Topology And Lisp
103 | | [Documentation] | Setup IPs and neighbors for interfaces on DUT1 and DUT2\
104 | | ... | and then setup LISP.
105 | | [Arguments] | ${fib_table}=0 | ${vni_table}=0 | ${ip6}=${FALSE}
106 | | Configure path in 3-node circular topology
107 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']}
108 | | Set interfaces in 3-node circular topology up
109 | | Vpp Set If IPv6 Addr | ${dut1_node} | ${dut1_to_dut2} | ${dut1_to_dut2_ip4}
110 | | ... | ${prefix4}
111 | | Vpp Set If IPv6 Addr | ${dut1_node} | ${dut1_to_tg} | ${dut1_to_tg_ip6}
112 | | ... | ${prefix6}
113 | | Vpp Set If IPv6 Addr | ${dut2_node} | ${dut2_to_dut1} | ${dut2_to_dut1_ip4}
114 | | ... | ${prefix4}
115 | | Vpp Set If IPv6 Addr | ${dut2_node} | ${dut2_to_tg} | ${dut2_to_tg_ip6}
116 | | ... | ${prefix6}
117 | | Add IP Neighbor | ${dut2_node} | ${dut2_to_tg} | ${tg2_ip6}
118 | | ... | ${tg_to_dut2_mac}
119 | | Add IP Neighbor | ${dut1_node} | ${dut1_to_dut2} | ${dut2_to_dut1_ip4}
120 | | ... | ${dut2_to_dut1_mac}
121 | | Add IP Neighbor | ${dut2_node} | ${dut2_to_dut1} | ${dut1_to_dut2_ip4}
122 | | ... | ${dut1_to_dut2_mac}
123 | | Add IP Neighbor | ${dut1_node} | ${dut1_to_tg} | ${tg1_ip6}
124 | | ... | ${tg_to_dut1_mac}
125 | | Vpp All RA Suppress Link Layer | ${nodes}
126 | | Configure LISP GPE topology in 3-node circular topology
127 | | ... | ${dut1_node} | ${dut1_to_dut2} | ${NONE}
128 | | ... | ${dut2_node} | ${dut2_to_dut1} | ${NONE}
129 | | ... | ${duts_locator_set} | ${dut1_ip6_eid} | ${dut2_ip6_eid}
130 | | ... | ${dut1_to_dut2_ip_static_adjacency}
131 | | ... | ${dut2_to_dut1_ip_static_adjacency}
132 | | ... | ${vni_table} | ${fib_table}