Remove unused VRF paramter from IP neighbour Add/del
[csit.git] / tests / func / lisp / eth2p-ethip4ipsectptlispgpe-ip6base-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.VhostUser
25 | Library | resources.libraries.python.QemuUtils
26 | Library | resources.libraries.python.VPPUtil
27 | Library | String
28 | Resource | resources/libraries/robot/traffic.robot
29 | Resource | resources/libraries/robot/default.robot
30 | Resource | resources/libraries/robot/interfaces.robot
31 | Resource | resources/libraries/robot/testing_path.robot
32 | Resource | resources/libraries/robot/ipv6.robot
33 | Resource | resources/libraries/robot/ipsec.robot
34 | Resource | resources/libraries/robot/qemu.robot
35 | Resource | resources/libraries/robot/lisp/lispgpe.robot
36 | Resource | resources/libraries/robot/bridge_domain.robot
37 # Import configuration and test data:
38 | Variables | resources/test_data/lisp/ipv6_lispgpe_ipv4/ipv6_lispgpe_ipsec_ipv4.py
39 | Force Tags | 3_NODE_SINGLE_LINK_TOPO | VM_ENV | LISP
40 | ...
41 | Test Setup | Func Test Setup
42 | Test Teardown | Run Keywords | Show Packet Trace on All DUTs | ${nodes}
43 | ... | AND | Show VAT History On All DUTs | ${nodes}
44 | ... | AND | Show Vpp Settings | ${nodes['DUT1']}
45 | ... | AND | Show Vpp Settings | ${nodes['DUT2']}
46 | ... | AND | Check VPP PID in Teardown
47 | ...
48 | Documentation | *IPv6 - ip4-ipsec-lispgpe-ip6 - main fib, vrf, virt2lisp,\
49 | ... | phy2lisp*
50 | ...
51 | ... | *[Top] Network Topologies:* TG-DUT1-DUT2-TG 3-node circular topology\
52 | ... | with single links between nodes.
53 | ... | *[Enc] Packet Encapsulations:* Eth-IPv4-LISPGPE-IPSec-IPv6-ICMP,\
54 | ... | Eth-IPv4-IPSec-LISPGPE-IPv6-ICMP
55 | ... | *[Cfg] DUT configuration:* Each DUT is configured with LISP and IPsec.\
56 | ... | IPsec is in transport mode. Tests cases are for IPsec configured both\
57 | ... | on RLOC interface or lisp_gpe0 interface.
58 | ... | *[Ver] TG verification:* Packet is send from TG(if1) across the DUT1 to\
59 | ... | DUT2 where it is forwarded to TG(if2).
60 | ... | *[Ref] Applicable standard specifications:* RFC6830, RFC4303.
61
62 *** Test Cases ***
63 | TC01: DUT1 and DUT2 route IPv4 bidirectionally over LISP GPE tunnel using IPsec (transport) on RLOC Int.
64 | | [Documentation]
65 | | ... | [Top] TG-DUT1-DUT2-TG.
66 | | ... | [Enc] Eth-IPv4-LISPGPE-IPSec-IPv6-ICMP on DUT1-DUT2, Eth-IPv6-ICMP\
67 | | ... | on TG-DUTn.
68 | | ... | [Cfg] Configure IPv6 LISP static adjacencies on DUT1 and DUT2 with\
69 | | ... | IPsec in between DUTS.
70 | | ... | [Ver] Make TG send ICMPv6 Echo Req between its interfaces across\
71 | | ... | both DUTs and LISP GPE tunnel between them; verify IPv6 headers on\
72 | | ... | received packets are correct.
73 | | ... | [Ref] RFC6830, RFC4303.
74 | | ...
75 | | ${encr_alg}= | Crypto Alg AES CBC 128
76 | | ${auth_alg}= | Integ Alg SHA1 96
77 | | Given Setup Topology And Lisp
78 | | And IPsec Generate Keys | ${encr_alg} | ${auth_alg}
79 | | When VPP Setup IPsec Manual Keyed Connection
80 | | ... | ${dut1_node} | ${dut1_to_dut2} | ${encr_alg} | ${encr_key}
81 | | ... | ${auth_alg} | ${auth_key} | ${dut1_spi} | ${dut2_spi}
82 | | ... | ${dut1_to_dut2_ip4} | ${dut2_to_dut1_ip4}
83 | | And VPP Setup IPsec Manual Keyed Connection
84 | | ... | ${dut2_node} | ${dut2_to_dut1} | ${encr_alg} | ${encr_key}
85 | | ... | ${auth_alg} | ${auth_key} | ${dut2_spi} | ${dut1_spi}
86 | | ... | ${dut2_to_dut1_ip4} | ${dut1_to_dut2_ip4}
87 | | Then Send Packet And Check Headers
88 | | ... | ${tg_node} | ${tg1_ip6} | ${tg2_ip6}
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 Check Headers
92 | | ... | ${tg_node} | ${tg2_ip6} | ${tg1_ip6}
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
96 | TC02: DUT1 and DUT2 route IPv4 bidirectionally over LISP GPE tunnel using IPsec (transport) on lisp_gpe0 Int.
97 | | [Documentation]
98 | | ... | [Top] TG-DUT1-DUT2-TG.
99 | | ... | [Enc] Eth-IPv4-IPSec-LISPGPE-IPv6-ICMPv6 on DUT1-DUT2, Eth-IPv6-ICMP\
100 | | ... | on TG-DUTn.
101 | | ... | [Cfg] Configure IPv4 LISP static adjacencies on DUT1 and DUT2 with\
102 | | ... | IPsec in between DUTS.
103 | | ... | [Ver] Make TG send ICMPv6 Echo Req between its interfaces across\
104 | | ... | both DUTs and LISP GPE tunnel between them; verify IPv6 headers on\
105 | | ... | received packets are correct.
106 | | ... | [Ref] RFC6830, RFC4303.
107 | | ...
108 | | ${encr_alg}= | Crypto Alg AES CBC 128
109 | | ${auth_alg}= | Integ Alg SHA1 96
110 | | Given Setup Topology And Lisp
111 | | And IPsec Generate Keys | ${encr_alg} | ${auth_alg}
112 | | ${lisp_if_idx}= | resources.libraries.python.InterfaceUtil.get sw if index
113 | | ... | ${dut1_node} | ${lisp_gpe_int}
114 | | When VPP Setup IPsec Manual Keyed Connection
115 | | ... | ${dut1_node} | ${lisp_if_idx} | ${encr_alg} | ${encr_key}
116 | | ... | ${auth_alg} | ${auth_key} | ${dut1_spi} | ${dut2_spi}
117 | | ... | ${dut1_to_dut2_ip4} | ${dut2_to_dut1_ip4}
118 | | And VPP Setup IPsec Manual Keyed Connection
119 | | ... | ${dut2_node} | ${lisp_if_idx} | ${encr_alg} | ${encr_key}
120 | | ... | ${auth_alg} | ${auth_key} | ${dut2_spi} | ${dut1_spi}
121 | | ... | ${dut2_to_dut1_ip4} | ${dut1_to_dut2_ip4}
122 | | Then Send Packet And Check Headers
123 | | ... | ${tg_node} | ${tg1_ip6} | ${tg2_ip6}
124 | | ... | ${tg_to_dut1} | ${tg_to_dut1_mac} | ${dut1_to_tg_mac}
125 | | ... | ${tg_to_dut2} | ${dut2_to_tg_mac} | ${tg_to_dut2_mac}
126 | | And Send Packet And Check Headers
127 | | ... | ${tg_node} | ${tg2_ip6} | ${tg1_ip6}
128 | | ... | ${tg_to_dut2} | ${tg_to_dut2_mac} | ${dut2_to_tg_mac}
129 | | ... | ${tg_to_dut1} | ${dut1_to_tg_mac} | ${tg_to_dut1_mac}
130
131 *** Keywords ***
132 | Setup Topology And Lisp
133 | | [Documentation] | Setup IPs and neighbors for interfaces on DUT1 and DUT2\
134 | | ... | and then setup LISP.
135 | | [Arguments] | ${fib_table}=0 | ${vni_table}=0 | ${ip6}=${FALSE}
136 | | Path for 3-node testing is set
137 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']}
138 | | Interfaces in 3-node path are up
139 | | Vpp Set If IPv6 Addr | ${dut1_node} | ${dut1_to_dut2} | ${dut1_to_dut2_ip4}
140 | | ... | ${prefix4}
141 | | Vpp Set If IPv6 Addr | ${dut1_node} | ${dut1_to_tg} | ${dut1_to_tg_ip6}
142 | | ... | ${prefix6}
143 | | Vpp Set If IPv6 Addr | ${dut2_node} | ${dut2_to_dut1} | ${dut2_to_dut1_ip4}
144 | | ... | ${prefix4}
145 | | Vpp Set If IPv6 Addr | ${dut2_node} | ${dut2_to_tg} | ${dut2_to_tg_ip6}
146 | | ... | ${prefix6}
147 | | Add IP Neighbor | ${dut2_node} | ${dut2_to_tg} | ${tg2_ip6}
148 | | ... | ${tg_to_dut2_mac}
149 | | Add IP Neighbor | ${dut1_node} | ${dut1_to_dut2} | ${dut2_to_dut1_ip4}
150 | | ... | ${dut2_to_dut1_mac}
151 | | Add IP Neighbor | ${dut2_node} | ${dut2_to_dut1} | ${dut1_to_dut2_ip4}
152 | | ... | ${dut1_to_dut2_mac}
153 | | Add IP Neighbor | ${dut1_node} | ${dut1_to_tg} | ${tg1_ip6}
154 | | ... | ${tg_to_dut1_mac}
155 | | Set up LISP GPE topology
156 | | ... | ${dut1_node} | ${dut1_to_dut2} | ${NONE}
157 | | ... | ${dut2_node} | ${dut2_to_dut1} | ${NONE}
158 | | ... | ${duts_locator_set} | ${dut1_ip6_eid} | ${dut2_ip6_eid}
159 | | ... | ${dut1_to_dut2_ip_static_adjacency}
160 | | ... | ${dut2_to_dut1_ip_static_adjacency}
161 | | ... | ${vni_table} | ${fib_table}