CSIT-402: Remove EXPECTED_FAILING tag from IPFIX tests
[csit.git] / tests / vpp / func / telemetry / eth2p-ethip6-ip6base-ip6ipfixbase-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.IPv6Setup
23 | Library | resources.libraries.python.Trace
24
25 | Force Tags | HW_ENV | VM_ENV | 3_NODE_SINGLE_LINK_TOPO
26 | Test Setup | Set up functional test
27 | Test Teardown | Tear down functional test
28 | Documentation | *IPFIX ipv6 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 and IPV6
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 or through DUT1. TG listens for flow report packets
35 | ... | and verifies that they contains flow records of test packets sent.
36
37 *** Variables ***
38 | ${dut1_to_tg_ip}= | 10::10
39 | ${dut2_to_dut1_ip}= | 11::10
40 | ${tg_to_dut1_ip}= | 12::10
41 | ${prefix_length}= | 64
42 | ${ip_version}= | ip6
43 | ${port}= | 80
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 for traffic by source address
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 a packet to DUT1, then listen for IPFIX template
55 | | ... | and data packets, verify that IPFIX reported the received packet.
56 | | ... | [Ref] RFC 7011
57 | | Given Configure path in 3-node circular topology
58 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']}
59 | | And Set interfaces in 3-node circular topology 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
84 | TC02: DUT reports packet flow for traffic with local destination address
85 | | [Documentation]
86 | | ... | [Top] TG-DUT1-DUT2-TG. [Cfg] On DUT1 configure IPFIX with TG interface
87 | | ... | address as collector and add classify session with destination
88 | | ... | address of DUT1.
89 | | ... | [Ver] Make TG send a packet to DUT1, then listen for IPFIX template
90 | | ... | and data packets, verify that IPFIX reported the received packet.
91 | | ... | [Ref] RFC 7011
92 | | Given Configure path in 3-node circular topology
93 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']}
94 | | And Set interfaces in 3-node circular topology up
95 | | And Set Interface Address | ${dut1_node}
96 | | ... | ${dut1_to_tg} | ${dut1_to_tg_ip} | ${prefix_length}
97 | | And Set Interface Address | ${dut1_node}
98 | | ... | ${dut1_to_tg} | ${dut1_to_tg_ip4} | ${24}
99 | | And Add ARP on DUT | ${dut1_node} | ${dut1_to_tg} | ${tg_to_dut1_ip4}
100 | | ... | ${tg_to_dut1_mac}
101 | | And Add ARP on DUT | ${dut1_node} | ${dut1_to_tg} | ${tg_to_dut1_ip}
102 | | ... | ${tg_to_dut1_mac}
103 | | And VPP RA suppress link layer | ${dut1_node} | ${dut1_to_tg}
104 | | ${table_index} | ${skip_n} | ${match_n}=
105 | | ... | And VPP creates classify table L3 | ${dut1_node} | ${ip_version} | dst
106 | | And VPP configures classify session L3 | ${dut1_node} | permit
107 | | ... | ${table_index} | ${skip_n} | ${match_n} | ${ip_version} | dst
108 | | ... | ${dut1_to_tg_ip}
109 | | When Assign interface to flow table | ${dut1_node} | ${dut1_to_tg}
110 | | ... | ${table_index} | ip_version=${ip_version}
111 | | And setup IPFIX exporter | ${dut1_node} | ${tg_to_dut1_ip4}
112 | | ... | ${dut1_to_tg_ip4} | interval=5
113 | | And Set IPFIX stream | ${dut1_node} | ${1}
114 | | And Assign classify table to exporter | ${dut1_node} | ${table_index}
115 | | ... | ${ip_version}
116 | | Then Send packets and verify IPFIX | ${tg_node} | ${dut1_node}
117 | | ... | ${tg_to_dut1} | ${dut1_to_tg} | ${tg_to_dut1_ip} | ${dut1_to_tg_ip}
118
119 | TC03: DUT reports packet flow for traffic with remote destination address
120 | | [Documentation]
121 | | ... | [Top] TG-DUT1-DUT2-TG. [Cfg] On DUT1 configure IPFIX with TG interface
122 | | ... | address as collector and add classify session with destination
123 | | ... | address of DUT2.
124 | | ... | [Ver] Make TG send a packet to DUT2 through DUT1, then listen
125 | | ... | for IPFIX template and data packets, verify that IPFIX reported
126 | | ... | the received packet.
127 | | ... | [Ref] RFC 7011
128 | | Given Configure path in 3-node circular topology
129 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']}
130 | | And Set interfaces in 3-node circular topology up
131 | | And Set Interface Address | ${dut1_node}
132 | | ... | ${dut1_to_tg} | ${dut1_to_tg_ip} | ${prefix_length}
133 | | And Set Interface Address | ${dut1_node}
134 | | ... | ${dut1_to_tg} | ${dut1_to_tg_ip4} | ${24}
135 | | And Add ARP on DUT | ${dut1_node} | ${dut1_to_tg} | ${tg_to_dut1_ip4}
136 | | ... | ${tg_to_dut1_mac}
137 | | And Add ARP on DUT | ${dut1_node} | ${dut1_to_tg} | ${tg_to_dut1_ip}
138 | | ... | ${tg_to_dut1_mac}
139 | | And Add ARP on DUT | ${dut1_node} | ${dut1_to_dut2} | ${dut2_to_dut1_ip}
140 | | ... | ${dut2_to_dut1_mac}
141 | | And VPP RA suppress link layer | ${dut1_node} | ${dut1_to_tg}
142 | | ${table_index} | ${skip_n} | ${match_n}=
143 | | ... | And VPP creates classify table L3 | ${dut1_node} | ${ip_version} | dst
144 | | And VPP configures classify session L3 | ${dut1_node} | permit
145 | | ... | ${table_index} | ${skip_n} | ${match_n} | ${ip_version} | dst
146 | | ... | ${dut2_to_dut1_ip}
147 | | When Assign interface to flow table | ${dut1_node} | ${dut1_to_tg}
148 | | ... | ${table_index} | ip_version=${ip_version}
149 | | And setup IPFIX exporter | ${dut1_node} | ${tg_to_dut1_ip4}
150 | | ... | ${dut1_to_tg_ip4} | interval=5
151 | | And Set IPFIX stream | ${dut1_node} | ${1}
152 | | And Assign classify table to exporter | ${dut1_node} | ${table_index}
153 | | ... | ${ip_version}
154 | | Then Send packets and verify IPFIX | ${tg_node} | ${dut1_node}
155 | | ... | ${tg_to_dut1} | ${dut1_to_tg} | ${tg_to_dut1_ip}
156 | | ... | ${dut2_to_dut1_ip}
157
158 | TC04: DUT reports packet flow for traffic by source and destination port
159 | | [Tags] | SKIP_VPP_PATCH
160 | | [Documentation]
161 | | ... | [Top] TG-DUT1-DUT2-TG. [Cfg] On DUT1 configure IPFIX with TG interface
162 | | ... | address as collector and add classify session with TG source address
163 | | ... | and source and destination ports.
164 | | ... | [Ver] Make TG send a packet to DUT1, then listen for IPFIX template
165 | | ... | and data packets, verify that IPFIX reported the received packet.
166 | | ... | [Ref] RFC 7011
167 | | Given Configure path in 3-node circular topology
168 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']}
169 | | And Set interfaces in 3-node circular topology up
170 | | And Set Interface Address | ${dut1_node}
171 | | ... | ${dut1_to_tg} | ${dut1_to_tg_ip} | ${prefix_length}
172 | | And Set Interface Address | ${dut1_node}
173 | | ... | ${dut1_to_tg} | ${dut1_to_tg_ip4} | ${24}
174 | | And Add ARP on DUT | ${dut1_node} | ${dut1_to_tg} | ${tg_to_dut1_ip4}
175 | | ... | ${tg_to_dut1_mac}
176 | | And Add ARP on DUT | ${dut1_node} | ${dut1_to_tg} | ${tg_to_dut1_ip}
177 | | ... | ${tg_to_dut1_mac}
178 | | And VPP RA suppress link layer | ${dut1_node} | ${dut1_to_tg}
179 | | ${table_index} | ${skip_n} | ${match_n}=
180 | | ... | And VPP creates classify table L3 | ${dut1_node} | ${ip_version}
181 | | ... | src proto l4 src_port dst_port
182 | | And VPP configures classify session generic | ${dut1_node}
183 | | ... | acl-hit-next permit | ${table_index} | ${skip_n} | ${match_n}
184 | | ... | l3 ${ip_version} src ${tg_to_dut1_ip}
185 | | ... | proto 6 l4 src_port ${port} dst_port ${port}
186 | | When Assign interface to flow table | ${dut1_node} | ${dut1_to_tg}
187 | | ... | ${table_index} | ip_version=${ip_version}
188 | | And setup IPFIX exporter | ${dut1_node} | ${tg_to_dut1_ip4}
189 | | ... | ${dut1_to_tg_ip4} | interval=5
190 | | And Set IPFIX stream | ${dut1_node} | ${1}
191 | | And Assign classify table to exporter | ${dut1_node} | ${table_index}
192 | | ... | ${ip_version}
193 | | Then Send packets and verify IPFIX | ${tg_node} | ${dut1_node}
194 | | ... | ${tg_to_dut1} | ${dut1_to_tg} | ${tg_to_dut1_ip} | ${dut1_to_tg_ip}
195 | | ... | port=${port}
196
197 # TODO: DUT reports packet flow when ACL is configured with wildcards