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