CSIT-357 Improve perf documentation for 1609
[csit.git] / tests / func / ipsec / ipsec_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 | Resource | resources/libraries/robot/ipsec.robot
16 | Library | resources.libraries.python.Trace
17 | Force Tags | 3_NODE_SINGLE_LINK_TOPO | 3_NODE_DOUBLE_LINK_TOPO
18 | ...        | VM_ENV | HW_ENV
19 | Test Setup | Run Keywords | Setup all DUTs before test
20 | ...        | AND          | Setup all TGs before traffic script
21 | ...        | AND          | Setup Topology for IPv4 IPsec testing
22 | Test Teardown | Run Keywords | VPP IPsec Show | ${dut_node}
23 | ...           | AND          | Show Packet Trace on All DUTs | ${nodes}
24 | ...           | AND          | Show vpp trace dump on all DUTs
25 | Documentation | *IPv4 IPsec test suite.*
26 | ...
27 | ... | *[Top] Network topologies:* TG-DUT1 2-node topology with one link\
28 | ... | between nodes.
29 | ... | *[Cfg] DUT configuration:* On DUT1 create loopback interface, configure\
30 | ... | loopback an physical interface IPv4 addresses, static ARP record, route\
31 | ... | and IPsec manual keyed connection.
32 | ... | *[Ver] TG verification:* ESP packet is sent from TG to DUT1. ESP packet\
33 | ... | is received on TG from DUT1.
34 | ... | *[Ref] Applicable standard specifications:* RFC4303.
35
36 *** Variables ***
37 | ${tg_spi}= | ${1000}
38 | ${dut_spi}= | ${1001}
39 | ${ESP_PROTO}= | ${50}
40 | ${tg_if_ip4}= | 192.168.100.2
41 | ${dut_if_ip4}= | 192.168.100.3
42 | ${tg_lo_ip4}= | 192.168.3.3
43 | ${dut_lo_ip4}= | 192.168.4.4
44 | ${ip4_plen}= | ${24}
45
46 *** Test Cases ***
47 | TC01: VPP process ESP packet in Tunnel Mode with AES-CBC encrytion and SHA1-96 integrity
48 | | [Documentation]
49 | | ... | [Top] TG-DUT1.
50 | | ... | [Ref] RFC4303.
51 | | ... | [Cfg] On DUT1 configure IPsec manual keyed connection with AES-CBC\
52 | | ... | encrytion and SHA1-96 integrity in tunnel mode.
53 | | ... | [Ver] Send and receive ESP packet between TG and VPP node.
54 | | ${encr_alg}= | Crypto Alg AES CBC 128
55 | | ${auth_alg}= | Integ Alg SHA1 96
56 | | Given IPsec Generate Keys | ${encr_alg} | ${auth_alg}
57 | | When VPP Setup IPsec Manual Keyed Connection
58 | | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg}
59 | | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_src_ip} | ${tg_src_ip}
60 | | ... | ${dut_tun_ip} | ${tg_tun_ip}
61 | | Then Send and Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac}
62 | | ... | ${encr_alg} | ${encr_key} | ${auth_alg} | ${auth_key} | ${tg_spi}
63 | | ... | ${dut_spi} | ${tg_src_ip} | ${dut_src_ip} | ${tg_tun_ip}
64 | | ... | ${dut_tun_ip}
65
66 | TC02: VPP process ESP packet in Transport Mode with AES-CBC encrytion and SHA1-96 integrity
67 | | [Documentation]
68 | | ... | [Top] TG-DUT1.
69 | | ... | [Ref] RFC4303.
70 | | ... | [Cfg] On DUT1 configure IPsec manual keyed connection with AES-CBC\
71 | | ... | encrytion and SHA1-96 integrity in transport mode.
72 | | ... | [Ver] Send and receive ESP packet between TG and VPP node.
73 | | ${encr_alg}= | Crypto Alg AES CBC 128
74 | | ${auth_alg}= | Integ Alg SHA1 96
75 | | Given IPsec Generate Keys | ${encr_alg} | ${auth_alg}
76 | | When VPP Setup IPsec Manual Keyed Connection
77 | | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg}
78 | | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_tun_ip} | ${tg_tun_ip}
79 | | Then Send and Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac}
80 | | ... | ${encr_alg} | ${encr_key} | ${auth_alg} | ${auth_key} | ${tg_spi}
81 | | ... | ${dut_spi} | ${tg_tun_ip} | ${dut_tun_ip}