125e8b92af0a7ac41bb63ad769922833ffdde4b0
[csit.git] / tests / func / telemetry / ipfix / eth2p-ethip6-ip6base-ip6ipfixscale-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/default.robot
16 | Resource | resources/libraries/robot/interfaces.robot
17 | Resource | resources/libraries/robot/testing_path.robot
18 | Resource | resources/libraries/robot/ipv4.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.IPv6Setup
23 | Library | resources.libraries.python.Trace
24
25 | Force Tags | HW_ENV | VM_ENV | 3_NODE_SINGLE_LINK_TOPO | EXPECTED_FAILING
26 # TODO: Remove EXPECTED_FAILING tag once functionality is implemented (VPP-204)
27 | Test Setup | Func Test Setup
28 | Test Teardown | Func Test Teardown
29 | Documentation | *IPFIX ipv6 test cases*
30 | ...
31 | ... | IPFIX tests use 3-node topology TG - DUT1 - DUT2 - TG with
32 | ... | one link between the nodes. DUT1 is configured with IPv4 and IPV6
33 | ... | routing and static routes. IPFIX is configured on DUT1 with
34 | ... | DUT1->TG interface as collector.Test packets are
35 | ... | sent from TG to or through DUT1. TG listens for flow report packets
36 | ... | and verifies that they contains flow records of test packets sent.
37
38 *** Variables ***
39 | ${dut1_to_tg_ip}= | 10::10
40 | ${tg_to_dut1_ip}= | 12::10
41 | ${prefix_length}= | 64
42 | ${ip_version}= | ip6
43 | ${sessions}= | 45
44
45 # IPv4 addresses used for IPFIX exporter. Export over IPv6 not (yet?) supported.
46 | ${dut1_to_tg_ip4}= | 192.168.1.1
47 | ${tg_to_dut1_ip4}= | 192.168.1.2
48
49 *** Test Cases ***
50 | TC01: DUT reports packet flow with a large number of packets
51 | | [Documentation]
52 | | ... | [Top] TG-DUT1-DUT2-TG. [Cfg] On DUT1 configure IPFIX with TG interface
53 | | ... | address as collector and add classify session with TG source address.
54 | | ... | [Ver] Make TG send packets to DUT1, then listen for IPFIX template
55 | | ... | and data packets, verify that IPFIX reported the received packets.
56 | | ... | [Ref] RFC 7011
57 | | Given Path for 3-node testing is set
58 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']}
59 | | And Interfaces in 3-node path are up
60 | | And Set Interface Address | ${dut1_node}
61 | | ... | ${dut1_to_tg} | ${dut1_to_tg_ip} | ${prefix_length}
62 | | And Set Interface Address | ${dut1_node}
63 | | ... | ${dut1_to_tg} | ${dut1_to_tg_ip4} | ${24}
64 | | And Add ARP on DUT | ${dut1_node} | ${dut1_to_tg} | ${tg_to_dut1_ip4}
65 | | ... | ${tg_to_dut1_mac}
66 | | And Add ARP on DUT | ${dut1_node} | ${dut1_to_tg} | ${tg_to_dut1_ip}
67 | | ... | ${tg_to_dut1_mac}
68 | | And VPP RA suppress link layer | ${dut1_node} | ${dut1_to_tg}
69 | | ${table_index} | ${skip_n} | ${match_n}=
70 | | ... | And VPP creates classify table L3 | ${dut1_node} | ${ip_version} | src
71 | | And VPP configures classify session L3 | ${dut1_node} | permit
72 | | ... | ${table_index} | ${skip_n} | ${match_n} | ${ip_version} | src
73 | | ... | ${tg_to_dut1_ip}
74 | | When Assign interface to flow table | ${dut1_node} | ${dut1_to_tg}
75 | | ... | ${table_index} | ip_version=${ip_version}
76 | | And setup IPFIX exporter | ${dut1_node} | ${tg_to_dut1_ip4}
77 | | ... | ${dut1_to_tg_ip4} | interval=5
78 | | And Set IPFIX stream | ${dut1_node} | ${1}
79 | | And Assign classify table to exporter | ${dut1_node} | ${table_index}
80 | | ... | ${ip_version}
81 | | Then Send packets and verify IPFIX | ${tg_node} | ${dut1_node}
82 | | ... | ${tg_to_dut1} | ${dut1_to_tg} | ${tg_to_dut1_ip} | ${dut1_to_tg_ip}
83 | | ... | count=20000 | timeout=10
84
85 | TC02: DUT reports packet flow when multiple sessions are configured
86 | | [Documentation]
87 | | ... | [Top] TG-DUT1-DUT2-TG. [Cfg] On DUT1 configure IPFIX with TG interface
88 | | ... | address as collector and add several classify sessions with different
89 | | ... | ports.
90 | | ... | [Ver] Make TG send packets to DUT1 using a range of ports matching
91 | | ... | configured sessions, then listen for IPFIX template and data packets,
92 | | ... | verify that IPFIX reported the received packets for each session.
93 | | ... | [Ref] RFC 7011
94 | | Given Path for 3-node testing is set
95 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']}
96 | | And Interfaces in 3-node path are up
97 | | And Set Interface Address | ${dut1_node}
98 | | ... | ${dut1_to_tg} | ${dut1_to_tg_ip} | ${prefix_length}
99 | | And Set Interface Address | ${dut1_node}
100 | | ... | ${dut1_to_tg} | ${dut1_to_tg_ip4} | ${24}
101 | | And Add ARP on DUT | ${dut1_node} | ${dut1_to_tg} | ${tg_to_dut1_ip4}
102 | | ... | ${tg_to_dut1_mac}
103 | | And Add ARP on DUT | ${dut1_node} | ${dut1_to_tg} | ${tg_to_dut1_ip}
104 | | ... | ${tg_to_dut1_mac}
105 | | And VPP RA suppress link layer | ${dut1_node} | ${dut1_to_tg}
106 | | ${table_index} | ${skip_n} | ${match_n}=
107 | | ... | And VPP creates classify table L3 | ${dut1_node} | ${ip_version}
108 | | ... | src proto l4 src_port dst_port
109 | | :FOR | ${index} | IN RANGE | ${sessions}
110 | | | VPP configures classify session generic | ${dut1_node}
111 | | | ... | acl-hit-next permit | ${table_index} | ${skip_n} | ${match_n}
112 | | | ... | l3 ${ip_version} src ${tg_to_dut1_ip}
113 | | | ... | proto 6 l4 src_port ${index} dst_port ${index}
114 | | When Assign interface to flow table | ${dut1_node} | ${dut1_to_tg}
115 | | ... | ${table_index} | ip_version=${ip_version}
116 | | And setup IPFIX exporter | ${dut1_node} | ${tg_to_dut1_ip4}
117 | | ... | ${dut1_to_tg_ip4} | interval=5
118 | | ... | mtu=1450 | interval=5
119 | | And Set IPFIX stream | ${dut1_node} | ${1}
120 | | And Assign classify table to exporter | ${dut1_node} | ${table_index}
121 | | ... | ${ip_version}
122 | | Then Send session sweep and verify IPFIX | ${tg_node} | ${dut1_node}
123 | | ... | ${tg_to_dut1} | ${dut1_to_tg} | ${tg_to_dut1_ip} | ${dut1_to_tg_ip}
124 | | ... | ${sessions} | timeout=10 | count=3
125
126 # TODO: DUT reports packet flow when ACL is configured with wildcards