Correction of dpdk packages download when vpp deb packages provided
[csit.git] / tests / func / ipv4 / eth2p-ethip4-ip4base-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 | Library | resources.libraries.python.NodePath
16 | Library | resources.libraries.python.Trace
17 | Resource | resources/libraries/robot/default.robot
18 | Resource | resources/libraries/robot/interfaces.robot
19 | Resource | resources/libraries/robot/ipv4.robot
20 | Force Tags | HW_ENV
21 | Suite Setup | Run Keywords
22 | ... | Setup all DUTs before test | AND
23 | ... | Setup all TGs before traffic script | AND
24 | ... | Update All Interface Data On All Nodes | ${nodes} | AND
25 | ... | Setup DUT nodes for IPv4 testing
26 | Test Setup | Run Keywords | Save VPP PIDs | AND
27 | ... | Clear interface counters on all vpp nodes in topology | ${nodes}
28 | Test Teardown | Run Keywords
29 | ... | Show packet trace on all DUTs | ${nodes} | AND
30 | ... | Show vpp trace dump on all DUTs | AND
31 | ... | Check VPP PID in Teardown
32 | Documentation | *IPv4 routing test cases*
33 | ...
34 | ... | RFC791 IPv4, RFC826 ARP, RFC792 ICMPv4. Encapsulations: Eth-IPv4-ICMPv4
35 | ... | on links TG-DUT1, TG-DUT2, DUT1-DUT2. IPv4 routing tests use circular
36 | ... | 3-node topology TG - DUT1 - DUT2 - TG with one link between the nodes.
37 | ... | DUT1 and DUT2 are configured with IPv4 routing and static routes. Test
38 | ... | ICMPv4 Echo Request packets are sent in both directions by TG on links
39 | ... | to DUT1 and DUT2 and received on TG links on the other side of circular
40 | ... | topology. On receive TG verifies packets IPv4 src-addr, dst-addr and MAC
41 | ... | addresses.
42
43 *** Test Cases ***
44
45 | TC01: DUT replies to ICMPv4 Echo Req to its ingress interface
46 | | [Documentation]
47 | | ... | Make TG send ICMPv4 Echo Req to DUT ingress interface. Make TG\
48 | | ... | verify ICMP Echo Reply is correct.
49 | | [Tags] | 3_NODE_SINGLE_LINK_TOPO | VM_ENV
50 | | Append Nodes | ${nodes['TG']} | ${nodes['DUT1']}
51 | | Compute Path
52 | | ${src_port} | ${src_node}= | First Interface
53 | | ${dst_port} | ${dst_node}= | Last Interface
54 | | ${hops}= | Set Variable | ${0}
55 | | Node "${src_node}" interface "${src_port}" can route to node "${dst_node}" interface "${dst_port}" ${hops} hops away using IPv4
56
57 | TC02: DUT routes IPv4 to its egress interface
58 | | [Documentation]
59 | | ... | Make TG send ICMPv4 Echo Req towards DUT1 egress interface\
60 | | ... | connected to DUT2. Make TG verify ICMPv4 Echo Reply is correct.
61 | | [Tags] | 3_NODE_SINGLE_LINK_TOPO | VM_ENV
62 | | Append Nodes | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']}
63 | | Compute Path
64 | | ${src_port} | ${src_node}= | First Interface
65 | | ${dst_port} | ${dst_node}= | Last Egress Interface
66 | | ${hops}= | Set Variable | ${0}
67 | | Node "${src_node}" interface "${src_port}" can route to node "${dst_node}" interface "${dst_port}" ${hops} hops away using IPv4
68
69 | TC03: DUT1 routes IPv4 to DUT2 ingress interface
70 | | [Documentation]
71 | | ... | Make TG send ICMPv4 Echo Req towards DUT2 ingress interface\
72 | | ... | connected to DUT1. Make TG verify ICMPv4 Echo Reply is correct.
73 | | [Tags] | 3_NODE_SINGLE_LINK_TOPO | VM_ENV
74 | | Append Nodes | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']}
75 | | Compute Path
76 | | ${src_port} | ${src_node}= | First Interface
77 | | ${dst_port} | ${dst_node}= | Last Interface
78 | | ${hops}= | Set Variable | ${1}
79 | | Node "${src_node}" interface "${src_port}" can route to node "${dst_node}" interface "${dst_port}" ${hops} hops away using IPv4
80
81 | TC04: DUT1 routes IPv4 to DUT2 egress interface
82 | | [Documentation]
83 | | ... | Make TG send ICMPv4 Echo Req towards DUT2 egress interface\
84 | | ... | connected to TG. Make TG verify ICMPv4 Echo Reply is correct.
85 | | [Tags] | 3_NODE_SINGLE_LINK_TOPO | VM_ENV
86 | | Append Nodes | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']}
87 | | Compute Path
88 | | ${src_port} | ${src_node}= | First Interface
89 | | ${dst_port} | ${dst_node}= | Last Egress Interface
90 | | ${hops}= | Set Variable | ${1}
91 | | Node "${src_node}" interface "${src_port}" can route to node "${dst_node}" interface "${dst_port}" ${hops} hops away using IPv4
92
93 | TC05: DUT1 and DUT2 route IPv4 between TG interfaces
94 | | [Documentation]
95 | | ... | Make TG send ICMPv4 Echo Req between its interfaces across DUT1\
96 | | ... | and DUT2. Make TG verify ICMPv4 Echo Replies are correct.
97 | | [Tags] | 3_NODE_SINGLE_LINK_TOPO | VM_ENV
98 | | Append Nodes | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']}
99 | | Compute Path
100 | | ${src_port} | ${src_node}= | First Interface
101 | | ${dst_port} | ${dst_node}= | Last Interface
102 | | ${hops}= | Set Variable | ${2}
103 | | Node "${src_node}" interface "${src_port}" can route to node "${dst_node}" interface "${dst_port}" ${hops} hops away using IPv4
104
105 | TC06: DUT replies to ICMPv4 Echo Reqs with size 64B-to-1500B-incr-1B
106 | | [Documentation]
107 | | ... | Make TG send ICMPv4 Echo Reqs to DUT ingress interface,\
108 | | ... | incrementating frame size from 64B to 1500B with increment step
109 | | ... | of 1Byte. Make TG verify ICMP Echo Replies are correct.
110 | | [Tags] | 3_NODE_SINGLE_LINK_TOPO | VM_ENV
111 | | Ipv4 icmp echo sweep | ${nodes['TG']} | ${nodes['DUT1']} | 0 | 1452 | 1
112
113 | TC07: DUT replies to ICMPv4 Echo Reqs with size 1500B-to-9000B-incr-10B
114 | | [Documentation]
115 | | ... | Make TG send ICMPv4 Echo Reqs to DUT ingress interface,\
116 | | ... | incrementating frame size from 1500B to 9000B with increment
117 | | ... | step of 10Bytes. Make TG verify ICMPv4 Echo Replies are correct.
118 | | [Tags] | 3_NODE_SINGLE_LINK_TOPO
119 | | [Setup] | Setup MTU on TG based on MTU on DUT | ${nodes['TG']} | ${nodes['DUT1']}
120 | | [Teardown] | Run keywords
121 | | ... | Set default Ethernet MTU on all interfaces on node | ${nodes['TG']}
122 | | ... | AND | Check VPP PID in Teardown
123 | | Append Nodes | ${nodes['TG']} | ${nodes['DUT1']}
124 | | Compute Path
125 | | ${dut_port} | ${dut_node}= | Last Interface
126 | | ${mtu}= | Get Interface MTU | ${dut_node} | ${dut_port}
127 | | # ICMP payload size is frame size minus size of Ehternet header, FCS,
128 | | # IPv4 header and ICMP header
129 | | ${end_size}= | Evaluate | ${mtu} - 14 - 4 - 20 - 8
130 | | Run Keyword If | ${mtu} > 1518
131 | | ... | Ipv4 icmp echo sweep | ${nodes['TG']} | ${nodes['DUT1']}
132 | | ... | 1452 | ${end_size} | 10
133
134 | TC08: DUT replies to ARP request
135 | | [Documentation]
136 | | ... | Make TG send ARP Request to DUT and verify ARP Reply is correct.\
137 | | [Tags] | 3_NODE_SINGLE_LINK_TOPO | VM_ENV
138 | | Send ARP request and validate response | ${nodes['TG']} | ${nodes['DUT1']}