CSIT-509: Add perf tests for vlan + l2 + vhost
[csit.git] / tests / func / telemetry / span.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/testing_path.robot
17 | Resource | resources/libraries/robot/telemetry/span.robot
18 | Library  | resources.libraries.python.Trace
19 | Library  | resources.libraries.python.IPv4Util
20 | Library  | resources.libraries.python.IPv4Setup
21 | Library  | resources.libraries.python.telemetry.SPAN
22 | Force Tags | HW_ENV | VM_ENV | 3_NODE_DOUBLE_LINK_TOPO | EXPECTED_FAILING
23 # TODO: Remove EXPECTED_FAILING tag once functionality is implemented (VPP-185)
24 | Test Setup | Func Test Setup
25 | Test Teardown | Func Test Teardown
26 | Documentation | *SPAN test suite*
27 | ... | *[Top] Network Topologies:* TG=DUT1 2-node topology with two
28 | ... | links between nodes.
29 | ... | *[Cfg] DUT configuration:* DUT1 is configured with SPAN mirroring from
30 | ... | the first DUT1-TG interface to the second one.
31 | ... | *[Ver] TG verification:* Test ARP or ICMP packets are sent by TG
32 | ... | on first link to DUT1; On receipt through second link TG verifies
33 | ... | the copy of packet sent and the copy of DUT's reply packet.
34 | ... | *[Ref] Applicable standard specifications: None?*
35
36 *** Variables ***
37 | ${tg_to_dut_if1_ip4}= | 192.168.1.1
38 | ${dut_to_tg_if1_ip4}= | 192.168.1.2
39 | ${tg_to_dut_if1_ip6}= | 11::1
40 | ${dut_to_tg_if1_ip6}= | 10::1
41 | ${prefix}= | 24
42
43 *** Test Cases ***
44 | TC01: DUT mirrors L2 packets from one interface to another
45 | | [Documentation]
46 | | ... | [Top] TG=DUT1
47 | | ... | [Cfg] On DUT1 configure IPv4 address and set SPAN mirroring\
48 | | ... | from one DUT interface to the other.
49 | | ... | [Ver] Make TG send an ARP packet to DUT through one interface,\
50 | | ... | then receive a copy of sent packet and of DUT's ARP reply\
51 | | ... | on the second interface.
52 | | Given Path For 2-node Testing Is Set | ${nodes['TG']} | ${nodes['DUT1']}
53 | | ... | ${nodes['TG']}
54 | | And Interfaces In 2-node Path Are Up
55 | | And Set interface Address | ${dut_node} | ${dut_to_tg_if1}
56 | | ... | ${dut_to_tg_if1_ip4} | ${prefix}
57 | | And Set SPAN Mirroring | ${dut_node} | ${dut_to_tg_if1} | ${dut_to_tg_if2}
58 | | Then Send Packet And Check Received Copies | ${tg_node}
59 | | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac}
60 | | ... | ${dut_to_tg__if1_mac} | ${tg_to_dut_if2}
61 | | ... | ${tg_to_dut_if1_ip4} | ${dut_to_tg_if1_ip4} | ARP
62
63 | TC02: DUT mirrors IPv4 packets from one interface to another
64 | | [Documentation]
65 | | ... | [Top] TG=DUT1
66 | | ... | [Cfg] On DUT1 configure IPv4 address, add ARP entry for one TG \
67 | | ... | interface and set SPAN mirroring from one DUT interface to the other.
68 | | ... | [Ver] Make TG send an ICMP packet to DUT through one interface,\
69 | | ... | then receive a copy of sent packet and of DUT's ICMP reply\
70 | | ... | on the other interface.
71 | | Given Path For 2-node Testing Is Set | ${nodes['TG']} | ${nodes['DUT1']}
72 | | ... | ${nodes['TG']}
73 | | And Interfaces In 2-node Path Are Up
74 | | And Set interface Address | ${dut_node} | ${dut_to_tg_if1}
75 | | ... | ${dut_to_tg_if1_ip4} | ${prefix}
76 | | And Add ARP on DUT | ${dut_node} | ${dut_to_tg_if1} | ${tg_to_dut_if1_ip4}
77 | | ... | ${tg_to_dut_if1_mac}
78 | | And Set SPAN Mirroring | ${dut_node} | ${dut_to_tg_if1} | ${dut_to_tg_if2}
79 | | Then Send Packet And Check Received Copies | ${tg_node}
80 | | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac}
81 | | ... | ${dut_to_tg__if1_mac} | ${tg_to_dut_if2}
82 | | ... | ${tg_to_dut_if1_ip4} | ${dut_to_tg_if1_ip4} | ICMP
83
84 | TC03: DUT mirrors IPv6 packets from one interface to another
85 | | [Documentation]
86 | | ... | [Top] TG=DUT1
87 | | ... | [Cfg] On DUT1 configure IPv6 address, add ARP entry for one TG \
88 | | ... | interface and set SPAN mirroring from one DUT interface to the other.
89 | | ... | [Ver] Make TG send an ICMP packet to DUT through one interface,\
90 | | ... | then receive a copy of sent packet and of DUT's ICMP reply\
91 | | ... | on the other interface.
92 | | Given Path For 2-node Testing Is Set | ${nodes['TG']} | ${nodes['DUT1']}
93 | | ... | ${nodes['TG']}
94 | | And Interfaces In 2-node Path Are Up
95 | | And Set interface Address | ${dut_node} | ${dut_to_tg_if1}
96 | | ... | ${dut_to_tg_if1_ip6} | ${prefix}
97 | | And Add ARP on DUT | ${dut_node} | ${dut_to_tg_if1} | ${tg_to_dut_if1_ip6}
98 | | ... | ${tg_to_dut_if1_mac}
99 | | And Set SPAN Mirroring | ${dut_node} | ${dut_to_tg_if1} | ${dut_to_tg_if2}
100 | | Then Send Packet And Check Received Copies | ${tg_node}
101 | | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac}
102 | | ... | ${dut_to_tg__if1_mac} | ${tg_to_dut_if2}
103 | | ... | ${tg_to_dut_if1_ip6} | ${dut_to_tg_if1_ip6} | ICMP