CSIT-604: Bootstrap file for vpp-csit-verify-master-centos7-nightly
[csit.git] / tests / vpp / func / telemetry / eth2p-ethip4-ip4base-ip4ipfixscale-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 | Resource | resources/libraries/robot/shared/default.robot
16 | Resource | resources/libraries/robot/shared/interfaces.robot
17 | Resource | resources/libraries/robot/shared/testing_path.robot
18 | Resource | resources/libraries/robot/ip/ip4.robot
19 | Resource | resources/libraries/robot/telemetry/ipfix.robot
20 | Library | resources.libraries.python.Classify.Classify
21 | Library | resources.libraries.python.telemetry.IPFIXSetup
22 | Library | resources.libraries.python.Trace
23
24 | Force Tags | HW_ENV | VM_ENV | 3_NODE_SINGLE_LINK_TOPO | EXPECTED_FAILING
25 | ...        | SKIP_VPP_PATCH
26 | Test Setup | Set up functional test
27 | Test Teardown | Tear down functional test
28 | Documentation | *IPFIX ipv4 test cases*
29 | ...
30 | ... | IPFIX tests use 3-node topology TG - DUT1 - DUT2 - TG with
31 | ... | one link between the nodes. DUT1 is configured with IPv4
32 | ... | routing and static routes. IPFIX is configured on DUT1 with
33 | ... | DUT1->TG interface as collector. Test packets are
34 | ... | sent from TG to DUT1. TG listens for flow report packets
35 | ... | and verifies that they contains flow record of test packets sent.
36
37 *** Variables ***
38 | ${dut1_to_tg_ip}= | 192.168.1.1
39 | ${tg_to_dut1_ip}= | 192.168.1.2
40 | ${prefix_length}= | 24
41 | ${ip_version}= | ip4
42 | ${sessions}= | 80
43
44 *** Test Cases ***
45 | TC01: DUT reports packet flow with a large number of packets
46 | | [Documentation]
47 | | ... | [Top] TG-DUT1-DUT2-TG. [Cfg] On DUT1 configure IPFIX with TG interface
48 | | ... | address as collector and add classify session with TG source address.
49 | | ... | [Ver] Make TG send packets to DUT1, then listen for IPFIX template
50 | | ... | and data packets, verify that IPFIX reported the received packets.
51 | | ... | [Ref] RFC 7011
52 | | Given Configure path in 3-node circular topology
53 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']}
54 | | And Set interfaces in 3-node circular topology up
55 | | And Set Interface Address | ${dut1_node}
56 | | ... | ${dut1_to_tg} | ${dut1_to_tg_ip} | ${prefix_length}
57 | | And Add ARP on DUT | ${dut1_node} | ${dut1_to_tg} | ${tg_to_dut1_ip}
58 | | ... | ${tg_to_dut1_mac}
59 | | ${table_index} | ${skip_n} | ${match_n}=
60 | | ... | And VPP creates classify table L3 | ${dut1_node} | ${ip_version} | src
61 | | And VPP configures classify session L3 | ${dut1_node} | permit
62 | | ... | ${table_index} | ${skip_n} | ${match_n} | ${ip_version} | src
63 | | ... | ${tg_to_dut1_ip}
64 | | When Assign interface to flow table | ${dut1_node} | ${dut1_to_tg}
65 | | ... | ${table_index} | ip_version=${ip_version}
66 | | And setup IPFIX exporter | ${dut1_node} | ${tg_to_dut1_ip}
67 | | ... | ${dut1_to_tg_ip} | interval=5
68 | | And Set IPFIX stream | ${dut1_node} | ${1}
69 | | And Assign classify table to exporter | ${dut1_node} | ${table_index}
70 | | ... | ${ip_version}
71 | | Then Send packets and verify IPFIX | ${tg_node} | ${dut1_node}
72 | | ... | ${tg_to_dut1} | ${dut1_to_tg} | ${tg_to_dut1_ip} | ${dut1_to_tg_ip}
73 | | ... | count=20000 | timeout=10
74
75 | TC02: DUT reports packet flow when multiple sessions are configured
76 | | [Documentation]
77 | | ... | [Top] TG-DUT1-DUT2-TG. [Cfg] On DUT1 configure IPFIX with TG interface
78 | | ... | address as collector and add several classify sessions with different
79 | | ... | ports.
80 | | ... | [Ver] Make TG send packets to DUT1 using a range of ports matching
81 | | ... | configured sessions, then listen for IPFIX template and data packets,
82 | | ... | verify that IPFIX reported the received packets for each session.
83 | | ... | [Ref] RFC 7011
84 | | Given Configure path in 3-node circular topology
85 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']}
86 | | And Set interfaces in 3-node circular topology up
87 | | And Set Interface Address | ${dut1_node}
88 | | ... | ${dut1_to_tg} | ${dut1_to_tg_ip} | ${prefix_length}
89 | | And Add ARP on DUT | ${dut1_node} | ${dut1_to_tg} | ${tg_to_dut1_ip}
90 | | ... | ${tg_to_dut1_mac}
91 | | ${table_index} | ${skip_n} | ${match_n}=
92 | | ... | And VPP creates classify table L3 | ${dut1_node} | ${ip_version}
93 | | ... | src proto l4 src_port dst_port
94 | | :FOR | ${index} | IN RANGE | ${sessions}
95 | | | VPP configures classify session generic | ${dut1_node}
96 | | | ... | acl-hit-next permit | ${table_index} | ${skip_n} | ${match_n}
97 | | | ... | l3 ${ip_version} src ${tg_to_dut1_ip}
98 | | | ... | proto 6 l4 src_port ${index} dst_port ${index}
99 | | When Assign interface to flow table | ${dut1_node} | ${dut1_to_tg}
100 | | ... | ${table_index} | ip_version=${ip_version}
101 | | And setup IPFIX exporter | ${dut1_node} | ${tg_to_dut1_ip}
102 | | ... | ${dut1_to_tg_ip}
103 | | ... | mtu=1450 | interval=5
104 | | And Set IPFIX stream | ${dut1_node} | ${1}
105 | | And Assign classify table to exporter | ${dut1_node} | ${table_index}
106 | | ... | ${ip_version}
107 | | Then Send session sweep and verify IPFIX | ${tg_node} | ${dut1_node}
108 | | ... | ${tg_to_dut1} | ${dut1_to_tg} | ${tg_to_dut1_ip} | ${dut1_to_tg_ip}
109 | | ... | ${sessions} | timeout=10 | count=3
110
111 # TODO: DUT reports packet flow when ACL is configured with wildcards