PapiExecutor always verifies
[csit.git] / tests / vpp / func / ip6 / eth2p-ethip6-ip6base-copblklistbase-func.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 | Library | resources.libraries.python.Cop
16 | Library | resources.libraries.python.IPUtil
17 | Library | resources.libraries.python.Trace
18 | ...
19 | Resource | resources/libraries/robot/ip/ip6.robot
20 | Resource | resources/libraries/robot/l2/l2_xconnect.robot
21 | Resource | resources/libraries/robot/shared/default.robot
22 | Resource | resources/libraries/robot/shared/interfaces.robot
23 | Resource | resources/libraries/robot/shared/testing_path.robot
24 | Resource | resources/libraries/robot/shared/traffic.robot
25 | ...
26 | Force Tags | HW_ENV | VM_ENV | 3_NODE_SINGLE_LINK_TOPO
27 | ...
28 | Test Setup | Set up functional test
29 | ...
30 | Test Teardown | Tear down functional test
31 | ...
32 | Documentation | *COP Security IPv6 Blacklist Tests*
33 | ...
34 | ... | *[Top] Network Topologies:* TG-DUT1-DUT2-TG 3-node circular topology
35 | ... | with single links between nodes.
36 | ... | *[Enc] Packet Encapsulations:* Eth-IPv6-ICMPv6 on all links.
37 | ... | *[Cfg] DUT configuration:* DUT1 is configured with IPv6 routing and
38 | ... | static routes. COP security black-lists are applied on DUT1 ingress
39 | ... | interface from TG. DUT2 is configured with L2XC.
40 | ... | *[Ver] TG verification:* Test ICMPv6 Echo Request packets are sent in
41 | ... | one direction by TG on link to DUT1; on receive TG verifies packets for
42 | ... | correctness and drops as applicable.
43 | ... | *[Ref] Applicable standard specifications:*
44
45 *** Variables ***
46 | ${tg_node}= | ${nodes['TG']}
47 | ${dut1_node}= | ${nodes['DUT1']}
48 | ${dut2_node}= | ${nodes['DUT2']}
49
50 | ${dut1_if1_ip}= | 3ffe:62::1
51 | ${dut1_if2_ip}= | 3ffe:63::1
52 | ${dut1_if1_ip_GW}= | 3ffe:62::2
53 | ${dut1_if2_ip_GW}= | 3ffe:63::2
54
55 | ${dut2_if1_ip}= | 3ffe:72::1
56 | ${dut2_if2_ip}= | 3ffe:73::1
57
58 | ${test_dst_ip}= | 3ffe:64::1
59 | ${test_src_ip}= | 3ffe:61::1
60
61 | ${cop_dut_ip}= | 3ffe:61::
62
63 | ${ip_prefix}= | 64
64
65 | ${fib_table_number}= | 1
66
67 *** Test Cases ***
68 | TC01: DUT drops IPv6 pkts with COP blacklist set with IPv6 src-addr
69 | | [Documentation]
70 | | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-IPv6-ICMPv6. [Cfg] On DUT1 \
71 | | ... | configure interface IPv6 addresses and routes in the main
72 | | ... | routing domain, add COP blacklist on interface to TG with IPv6
73 | | ... | src-addr matching packets generated by TG; on DUT2 configure L2
74 | | ... | xconnect. [Ver] Make TG send ICMPv6 Echo Req on its interface to
75 | | ... | DUT1; verify no ICMPv6 Echo Req pkts are received. [Ref]
76 | | Given Configure path in 3-node circular topology
77 | | ... | ${tg_node} | ${dut1_node} | ${dut2_node} | ${tg_node}
78 | | And Set interfaces in 3-node circular topology up
79 | | And Configure L2XC
80 | | ... | ${dut2_node} | ${dut2_to_dut1} | ${dut2_to_tg}
81 | | And VPP Interface Set IP Address
82 | | ... | ${dut1_node} | ${dut1_to_tg} | ${dut1_if1_ip} | ${ip_prefix}
83 | | And VPP Interface Set IP Address
84 | | ... | ${dut1_node} | ${dut1_to_dut2} | ${dut1_if2_ip} | ${ip_prefix}
85 | | And VPP Interface Set IP Address
86 | | ... | ${dut2_node} | ${dut2_to_dut1} | ${dut2_if1_ip} | ${ip_prefix}
87 | | And VPP Interface Set IP Address
88 | | ... | ${dut2_node} | ${dut2_to_tg} | ${dut2_if2_ip} | ${ip_prefix}
89 | | And VPP Add IP Neighbor
90 | | ... | ${dut1_node} | ${dut1_to_tg} | ${dut1_if1_ip_GW} | ${tg_to_dut1_mac}
91 | | And VPP Add IP Neighbor
92 | | ... | ${dut1_node} | ${dut1_to_dut2} | ${dut1_if2_ip_GW} | ${tg_to_dut2_mac}
93 | | And Vpp Route Add | ${dut1_node} | ${test_dst_ip} | ${ip_prefix}
94 | | ... | gateway=${dut1_if2_ip_GW} | interface=${dut1_to_dut2}
95 | | And Vpp All Ra Suppress Link Layer | ${nodes}
96 | | And Add fib table | ${dut1_node} | ${fib_table_number} | ipv6=${TRUE}
97 | | When COP Add whitelist Entry
98 | | ... | ${dut1_node} | ${dut1_to_tg} | ip6 | ${fib_table_number}
99 | | And COP interface enable or disable | ${dut1_node} | ${dut1_to_tg} | enable
100 | | Then Packet transmission from port to port should fail | ${tg_node}
101 | | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac}
102 | | ... | ${dut1_to_tg_mac} | ${tg_to_dut2} | ${dut1_to_dut2_mac}
103 | | ... | ${tg_to_dut2_mac}