CSIT-604: Bootstrap file for vpp-csit-verify-master-centos7-nightly
[csit.git] / tests / vpp / func / ip4 / eth2p-ethip4-ip4base-ipolicemarkbase-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 | Force Tags | 3_NODE_DOUBLE_LINK_TOPO | VM_ENV | HW_ENV
16 | Resource | resources/libraries/robot/features/policer.robot
17 | Library | resources.libraries.python.Trace
18 | Test Setup | Run Keywords | Set up functional test
19 | ...        | AND          | Configure topology for IPv4 policer test
20 | Test Teardown | Tear down functional test
21 | Documentation | *IPv4 policer test cases*
22 | ...
23 | ... | *[Top] Network topologies:* TG=DUT1 2-node topology with two links\
24 | ... | between nodes.
25 | ... | *[Cfg] DUT configuration:* On DUT1 configure interfaces IPv4 adresses,\
26 | ... | and static ARP record on the second interface.
27 | ... | *[Ver] TG verification:* Test packet is sent from TG on the first link\
28 | ... | to DUT1. Packet is received on TG on the second link from DUT1.
29 | ... | *[Ref] Applicable standard specifications:* RFC2474, RFC2697, RFC2698.
30
31 *** Variables ***
32 | ${tg_to_dut_if1_ip4}= | 192.168.122.2
33 | ${tg_to_dut_if2_ip4}= | 192.168.123.2
34 | ${dut_to_tg_if1_ip4}= | 192.168.122.1
35 | ${dut_to_tg_if2_ip4}= | 192.168.123.1
36 | ${ip4_plen}= | ${24}
37
38 | ${cir}= | ${100}
39 | ${eir}= | ${150}
40 | ${cb}= | ${200}
41 | ${eb}= | ${300}
42
43 *** Test Cases ***
44 | TC01: VPP policer 2R3C Color-aware marks packet
45 | | [Documentation]
46 | | ... | [Top] TG=DUT1.
47 | | ... | [Ref] RFC2474, RFC2698.
48 | | ... | [Cfg] On DUT1 configure 2R3C color-aware policer on the first\
49 | | ... | interface.
50 | | ... | [Ver] TG sends IPv4 TCP packet on the first link to DUT1.\
51 | | ... | On DUT1 packet is marked with DSCP tag. Verify if DUT1 sends\
52 | | ... | correct IPv4 TCP packet with correct DSCP on the second link to TG.
53 | | ${dscp}= | DSCP AF22
54 | | Given Policer Set Name | policer1
55 | | And Policer Set Node | ${dut_node}
56 | | And Policer Set CIR | ${cir}
57 | | And Policer Set EIR | ${eir}
58 | | And Policer Set CB | ${cb}
59 | | And Policer Set EB | ${eb}
60 | | And Policer Set Rate Type pps
61 | | And Policer Set Round Type Closest
62 | | And Policer Set Type 2R3C 2698
63 | | And Policer Set Conform Action Transmit
64 | | And Policer Set Exceed Action Mark and Transmit | ${dscp}
65 | | And Policer Set Violate Action Drop
66 | | And Policer Enable Color Aware
67 | | And Policer Classify Set Precolor Exceed
68 | | And Policer Classify Set Interface | ${dut_to_tg_if1}
69 | | And Policer Classify Set Match IP | ${tg_to_dut_if1_ip}
70 | | When Policer Set Configuration
71 | | Then Send packet and verify marking | ${tg_node} | ${tg_to_dut_if1}
72 | | ... | ${tg_to_dut_if2} | ${tg_to_dut_if1_mac} | ${dut_to_tg_if1_mac}
73 | | ... | ${tg_to_dut_if1_ip} | ${tg_to_dut_if2_ip} | ${dscp}
74
75 | TC02: VPP policer 2R3C Color-blind marks packet
76 | | [Documentation]
77 | | ... | [Top] TG=DUT1.
78 | | ... | [Ref] RFC2474, RFC2698.
79 | | ... | [Cfg] On DUT1 configure 2R3C color-blind policer on the first\
80 | | ... | interface.
81 | | ... | [Ver] TG sends IPv4 TCP packet on the first link to DUT1.\
82 | | ... | On DUT1 packet is marked with DSCP tag. Verify if DUT1 sends\
83 | | ... | correct IPv4 TCP packet with correct DSCP on the second link to TG.
84 | | ${dscp}= | DSCP AF22
85 | | Given Policer Set Name | policer1
86 | | And Policer Set Node | ${dut_node}
87 | | And Policer Set CIR | ${cir}
88 | | And Policer Set EIR | ${eir}
89 | | And Policer Set CB | ${cb}
90 | | And Policer Set EB | ${eb}
91 | | And Policer Set Rate Type pps
92 | | And Policer Set Round Type Closest
93 | | And Policer Set Type 2R3C 2698
94 | | And Policer Set Conform Action Mark and Transmit | ${dscp}
95 | | And Policer Set Exceed Action Transmit
96 | | And Policer Set Violate Action Drop
97 | | And Policer Classify Set Precolor Conform
98 | | And Policer Classify Set Interface | ${dut_to_tg_if1}
99 | | And Policer Classify Set Match IP | ${tg_to_dut_if1_ip}
100 | | When Policer Set Configuration
101 | | Then Send packet and verify marking | ${tg_node} | ${tg_to_dut_if1}
102 | | ... | ${tg_to_dut_if2} | ${tg_to_dut_if1_mac} | ${dut_to_tg_if1_mac}
103 | | ... | ${tg_to_dut_if1_ip} | ${tg_to_dut_if2_ip} | ${dscp}
104
105 | TC03: VPP policer 1R3C Color-aware marks packet
106 | | [Documentation]
107 | | ... | [Top] TG=DUT1.
108 | | ... | [Ref] RFC2474, RFC2697.
109 | | ... | [Cfg] On DUT1 configure 1R3C color-aware policer on the first\
110 | | ... | interface.
111 | | ... | [Ver] TG sends IPv4 TCP packet on the first link to DUT1.\
112 | | ... | On DUT1 packet is marked with DSCP tag. Verify if DUT1 sends\
113 | | ... | correct IPv4 TCP packet with correct DSCP on the second link to TG.
114 | | ${dscp}= | DSCP AF22
115 | | Given Policer Set Name | policer1
116 | | And Policer Set Node | ${dut_node}
117 | | And Policer Set CIR | ${1}
118 | | And Policer Set CB | ${2}
119 | | And Policer Set EB | ${eb}
120 | | And Policer Set Rate Type pps
121 | | And Policer Set Round Type Closest
122 | | And Policer Set Type 1R3C
123 | | And Policer Set Conform Action Transmit
124 | | And Policer Set Exceed Action Mark and Transmit | ${dscp}
125 | | And Policer Set Violate Action Drop
126 | | And Policer Enable Color Aware
127 | | And Policer Classify Set Precolor Exceed
128 | | And Policer Classify Set Interface | ${dut_to_tg_if1}
129 | | And Policer Classify Set Match IP | ${tg_to_dut_if1_ip}
130 | | When Policer Set Configuration
131 | | Then Send packet and verify marking | ${tg_node} | ${tg_to_dut_if1}
132 | | ... | ${tg_to_dut_if2} | ${tg_to_dut_if1_mac} | ${dut_to_tg_if1_mac}
133 | | ... | ${tg_to_dut_if1_ip} | ${tg_to_dut_if2_ip} | ${dscp}
134
135 | TC04: VPP policer 1R3C Color-blind marks packet
136 | | [Documentation]
137 | | ... | [Top] TG=DUT1.
138 | | ... | [Ref] RFC2474, RFC2697.
139 | | ... | [Cfg] On DUT1 configure 1R3C color-blind policer on the first\
140 | | ... | interface.
141 | | ... | [Ver] TG sends IPv4 TCP packet on the first link to DUT1.\
142 | | ... | On DUT1 packet is marked with DSCP tag. Verify if DUT1 sends\
143 | | ... | correct IPv4 TCP packet with correct DSCP on the second link to TG.
144 | | ${dscp}= | DSCP AF22
145 | | Given Policer Set Name | policer1
146 | | And Policer Set Node | ${dut_node}
147 | | And Policer Set CIR | ${cir}
148 | | And Policer Set CB | ${cb}
149 | | And Policer Set EB | ${eb}
150 | | And Policer Set Rate Type pps
151 | | And Policer Set Round Type Closest
152 | | And Policer Set Type 1R3C
153 | | And Policer Set Conform Action Mark and Transmit | ${dscp}
154 | | And Policer Set Exceed Action Transmit
155 | | And Policer Set Violate Action Drop
156 | | And Policer Classify Set Precolor Conform
157 | | And Policer Classify Set Interface | ${dut_to_tg_if1}
158 | | And Policer Classify Set Match IP | ${tg_to_dut_if1_ip}
159 | | When Policer Set Configuration
160 | | Then Send packet and verify marking | ${tg_node} | ${tg_to_dut_if1}
161 | | ... | ${tg_to_dut_if2} | ${tg_to_dut_if1_mac} | ${dut_to_tg_if1_mac}
162 | | ... | ${tg_to_dut_if1_ip} | ${tg_to_dut_if2_ip} | ${dscp}