a4623eda0d404879bfe8c2006f20618e9c4e7dcc
[csit.git] / tests / vpp / device / crypto / eth2p-ethip6ipsectpt-ip6base-dev.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 | Resource | resources/libraries/robot/shared/default.robot
16 | ...
17 | Force Tags | 2_NODE_SINGLE_LINK_TOPO | DEVICETEST | HW_ENV | DCR_ENV
18 | ... | FUNCTEST | IP6FWD | IPSEC | IPSEC_TPT | IP6BASE
19 | ...
20 | Suite Setup | Setup suite single link
21 | Test Setup | Setup test
22 | Test Teardown | Tear down test | packet_trace
23 | ...
24 | Documentation | *IPv6 IPsec transport mode test suite.*
25 | ...
26 | ... | *[Top] Network topologies:* TG-DUT1 2-node topology with one link\
27 | ... | between nodes.
28 | ... | *[Cfg] DUT configuration:* On DUT1 create loopback interface, configure
29 | ... | loopback an physical interface IPv6 addresses, static ARP record, route
30 | ... | and IPsec manual keyed connection in transport mode.
31 | ... | *[Ver] TG verification:* ESP packet is sent from TG to DUT1. ESP packet
32 | ... | is received on TG from DUT1.
33 | ... | *[Ref] Applicable standard specifications:* RFC4303.
34
35 *** Variables ***
36 | @{plugins_to_enable}= | dpdk_plugin.so | crypto_ia32_plugin.so
37 | ... | crypto_ipsecmb_plugin.so | crypto_openssl_plugin.so
38 | ${nic_name}= | virtual
39 | ${tg_spi}= | ${1000}
40 | ${dut_spi}= | ${1001}
41 | ${ESP_PROTO}= | ${50}
42 | ${tg_if_ip6}= | 3ffe:5f::1
43 | ${dut_if_ip6}= | 3ffe:5f::2
44 | ${tg_lo_ip6}= | 3ffe:60::3
45 | ${dut_lo_ip6}= | 3ffe:60::4
46 | ${ip6_plen}= | ${64}
47 | ${ip6_plen_rt}= | ${128}
48
49 *** Test Cases ***
50 | tc01-eth2p-ethip6ipsectpt-ip6base-device-aes-128-cbc-sha-256-128
51 | | [Documentation]
52 | | ... | [Cfg] On DUT1 configure IPsec manual keyed connection with encryption\
53 | | ... | algorithm AES-CBC-128 and integrity algorithm SHA-256-128 in transport
54 | | ... | mode.
55 | | ... | [Ver] Send and receive ESP packet between TG and VPP node.
56 | | ...
57 | | Given Add PCI devices to all DUTs
58 | | And Apply startup configuration on all VPP DUTs
59 | | And VPP Enable Traces On All Duts | ${nodes}
60 | | When Configure topology for IPv6 IPsec testing
61 | | ${encr_alg}= | Crypto Alg AES CBC 128
62 | | ${auth_alg}= | Integ Alg SHA 256 128
63 | | And Generate keys for IPSec | ${encr_alg} | ${auth_alg}
64 | | And Configure manual keyed connection for IPSec
65 | | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg}
66 | | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_tun_ip} | ${tg_tun_ip}
67 | | ... | is_ipv6=${TRUE}
68 | | Then Send IPsec Packet and verify ESP encapsulation in received packet
69 | | ... | ${tg_node} | ${tg_if} | ${dut_if_mac}
70 | | ... | ${encr_alg} | ${encr_key} | ${auth_alg} | ${auth_key} | ${tg_spi}
71 | | ... | ${dut_spi} | ${tg_tun_ip} | ${dut_tun_ip}
72
73 | tc02-eth2p-ethip6ipsectpt-ip6base-device-aes-128-cbc-sha-512-256
74 | | [Documentation]
75 | | ... | [Cfg] On DUT1 configure IPsec manual keyed connection with encryption\
76 | | ... | algorithm AES-CBC-128 and integrity algorithm SHA-512-256 in transport
77 | | ... | mode.
78 | | ... | [Ver] Send and receive ESP packet between TG and VPP node.
79 | | ...
80 | | Given Add PCI devices to all DUTs
81 | | And Apply startup configuration on all VPP DUTs
82 | | And VPP Enable Traces On All Duts | ${nodes}
83 | | When Configure topology for IPv6 IPsec testing
84 | | ${encr_alg}= | Crypto Alg AES CBC 128
85 | | ${auth_alg}= | Integ Alg SHA 512 256
86 | | And Generate keys for IPSec | ${encr_alg} | ${auth_alg}
87 | | And Configure manual keyed connection for IPSec
88 | | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg}
89 | | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_tun_ip} | ${tg_tun_ip}
90 | | ... | is_ipv6=${TRUE}
91 | | Then Send IPsec Packet and verify ESP encapsulation in received packet
92 | | ... | ${tg_node} | ${tg_if} | ${dut_if_mac}
93 | | ... | ${encr_alg} | ${encr_key} | ${auth_alg} | ${auth_key} | ${tg_spi}
94 | | ... | ${dut_spi} | ${tg_tun_ip} | ${dut_tun_ip}