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

©2016 FD.io a Linux Foundation Collaborative Project. All Rights Reserved.
Linux Foundation is a registered trademark of The Linux Foundation. Linux is a registered trademark of Linus Torvalds.
Please see our privacy policy and terms of use.