CSIT-687: Directory structure reorganization
[csit.git] / tests / vpp / func / telemetry / eth2p-ethip4-ip4base-spanrx-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/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
23 | Test Setup | Set up functional test
24 | Test Teardown | Tear down functional test
25 | Documentation | *SPAN test suite*
26 | ... | *[Top] Network Topologies:* TG=DUT1 2-node topology with two
27 | ... | links between nodes.
28 | ... | *[Cfg] DUT configuration:* DUT1 is configured with SPAN mirroring from
29 | ... | the first DUT1-TG interface to the second one.
30 | ... | *[Ver] TG verification:* Test ARP or ICMP packets are sent by TG
31 | ... | on first link to DUT1; On receipt through second link TG verifies
32 | ... | the copy of packet sent and the copy of DUT's reply packet.
33 | ... | *[Ref] Applicable standard specifications: None?*
34
35 *** Variables ***
36 | ${tg_to_dut_if1_ip4}= | 192.168.1.1
37 | ${dut_to_tg_if1_ip4}= | 192.168.1.2
38 | ${prefix}= | 24
39
40 *** Test Cases ***
41 | TC01: DUT mirrors L2 packets from one interface to another
42 | | [Documentation]
43 | | ... | [Top] TG=DUT1
44 | | ... | [Cfg] On DUT1 configure IPv4 address and set SPAN mirroring\
45 | | ... | from one DUT interface to the other.
46 | | ... | [Ver] Make TG send an ARP packet to DUT through one interface,\
47 | | ... | then receive a copy of sent packet and of DUT's ARP reply\
48 | | ... | on the second interface.
49 | | Given Configure path in 2-node circular topology | ${nodes['TG']} | ${nodes['DUT1']}
50 | | ... | ${nodes['TG']}
51 | | And Set interfaces in 2-node circular topology up
52 | | And Set interface Address | ${dut_node} | ${dut_to_tg_if1}
53 | | ... | ${dut_to_tg_if1_ip4} | ${prefix}
54 | | And Set SPAN Mirroring | ${dut_node} | ${dut_to_tg_if1} | ${dut_to_tg_if2}
55 | | Then Send Packet And Check Received Copies | ${tg_node}
56 | | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac}
57 | | ... | ${dut_to_tg__if1_mac} | ${tg_to_dut_if2}
58 | | ... | ${tg_to_dut_if1_ip4} | ${dut_to_tg_if1_ip4} | ARP
59
60 | TC02: DUT mirrors IPv4 packets from one interface to another
61 | | [Documentation]
62 | | ... | [Top] TG=DUT1
63 | | ... | [Cfg] On DUT1 configure IPv4 address, add ARP entry for one TG \
64 | | ... | interface and set SPAN mirroring from one DUT interface to the other.
65 | | ... | [Ver] Make TG send an ICMP packet to DUT through one interface,\
66 | | ... | then receive a copy of sent packet and of DUT's ICMP reply\
67 | | ... | on the other interface.
68 | | Given Configure path in 2-node circular topology | ${nodes['TG']} | ${nodes['DUT1']}
69 | | ... | ${nodes['TG']}
70 | | And Set interfaces in 2-node circular topology up
71 | | And Set interface Address | ${dut_node} | ${dut_to_tg_if1}
72 | | ... | ${dut_to_tg_if1_ip4} | ${prefix}
73 | | And Add ARP on DUT | ${dut_node} | ${dut_to_tg_if1} | ${tg_to_dut_if1_ip4}
74 | | ... | ${tg_to_dut_if1_mac}
75 | | And Set SPAN Mirroring | ${dut_node} | ${dut_to_tg_if1} | ${dut_to_tg_if2}
76 | | Then Send Packet And Check Received Copies | ${tg_node}
77 | | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac}
78 | | ... | ${dut_to_tg__if1_mac} | ${tg_to_dut_if2}
79 | | ... | ${tg_to_dut_if1_ip4} | ${dut_to_tg_if1_ip4} | ICMP