Align suite/test teardown/setup
[csit.git] / tests / vpp / device / ip6 / eth2p-ethip6-ip6base-dev.robot
1 # Copyright (c) 2018 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/ip/ip6.robot
16 | Resource | resources/libraries/robot/shared/default.robot
17 | Resource | resources/libraries/robot/shared/interfaces.robot
18 | Resource | resources/libraries/robot/shared/traffic.robot
19 | ...
20 | Force Tags | 2_NODE_SINGLE_LINK_TOPO | DEVICETEST | HW_ENV | DCR_ENV
21 | ... | FUNCTEST | IP6FWD | BASE | ETH | IP6BASE
22 | ...
23 | Test Setup | Set up VPP device test
24 | ...
25 | Test Teardown | Tear down test
26 | ...
27 | Documentation | *IPv6 routing test cases*
28 | ...
29 | ... | *[Top] Network Topologies:* TG-DUT1-TG 2-node circular topology \
30 | ... | with single links between nodes.
31 | ... | *[Enc] Packet Encapsulations:* Eth-IPv6-ICMPv6 for IPv6 routing on \
32 | ... | both links.
33 | ... | *[Cfg] DUT configuration:* DUT1 is configured with IPv6 routing and \
34 | ... | two static IPv6 /64 route entries.
35 | ... | *[Ver] TG verification:* Test ICMPv6 Echo Request packets are sent in \
36 | ... | one direction by TG on links to DUT1; on receive TG verifies packets \
37 | ... | for correctness and their IPv6 src-addr, dst-addr and MAC addresses.
38 | ... | *[Ref] Applicable standard specifications:* RFC2460, RFC4443, RFC4861
39
40 *** Variables ***
41 | ${tg_to_dut_if1_ip6}= | 2001:1::2
42 | ${tg_to_dut_if2_ip6}= | 2001:2::2
43 | ${dut_to_tg_if1_ip6}= | 2001:1::1
44 | ${dut_to_tg_if2_ip6}= | 2001:2::1
45 | ${remote_host1_ip6}= | 3ffe:5f::1
46 | ${remote_host2_ip6}= | 3ffe:5f::2
47 | ${remote_host_ip6_prefix}= | 128
48
49 *** Test Cases ***
50 | tc01-eth2p-ethicmpv6-ip6base-device_echo-req-to-dut-ingress-interface
51 | | [Documentation]
52 | | ... | Make TG send ICMPv6 Echo Req to DUT1 ingress interface. Make TG \
53 | | ... | verify ICMPv6 Echo Reply is correct.
54 | | ...
55 | | ${hops}= | Set Variable | ${0}
56 | | ...
57 | | Given Configure path in 2-node circular topology
58 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']}
59 | | And Configure IPv6 forwarding in circular topology | ${tg_to_dut_if1_ip6}
60 | | ... | ${tg_to_dut_if2_ip6} | ${dut_to_tg_if1_ip6} | ${dut_to_tg_if2_ip6}
61 | | And Suppress ICMPv6 router advertisement message | ${nodes}
62 | | When All Vpp Interfaces Ready Wait | ${nodes}
63 | | Then Send IPv6 echo request packet and verify headers | ${tg_node}
64 | | ... | ${tg_to_dut_if1} | ${dut_node} | ${dut_to_tg_if1}
65 | | ... | ${tg_to_dut_if1_ip6} | ${dut_to_tg_if1_ip6} | ${dut_to_tg_if1_mac}
66 | | ... | ${hops}
67 | | Get interface Ipv6 addresses | ${nodes['DUT1']} | ${dut_to_tg_if1}
68
69 | tc02-eth2p-ethicmpv6-ip6base-device_echo-req-to-dut-egress-interface
70 | | [Documentation]
71 | | ... | Make TG send ICMPv6 Echo Req towards DUT1 egress interface. Make TG \
72 | | ... | verify ICMPv6 Echo Reply is correct.
73 | | ...
74 | | ${hops}= | Set Variable | ${0}
75 | | ...
76 | | Given Configure path in 2-node circular topology
77 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']}
78 | | And Configure IPv6 forwarding in circular topology | ${tg_to_dut_if1_ip6}
79 | | ... | ${tg_to_dut_if2_ip6} | ${dut_to_tg_if1_ip6} | ${dut_to_tg_if2_ip6}
80 | | And Suppress ICMPv6 router advertisement message | ${nodes}
81 | | When All Vpp Interfaces Ready Wait | ${nodes}
82 | | Then Send IPv6 echo request packet and verify headers | ${tg_node}
83 | | ... | ${tg_to_dut_if1} | ${dut_node} | ${dut_to_tg_if2}
84 | | ... | ${tg_to_dut_if1_ip6} | ${dut_to_tg_if2_ip6} | ${dut_to_tg_if1_mac}
85 | | ... | ${hops}
86
87 | tc03-eth2p-ethicmpv6-ip6base-device_echo-req-to-tg-interface-for-local-ipv4-address
88 | | [Documentation]
89 | | ... | Make TG send ICMPv6 Echo Req between its interfaces across DUT1 for \
90 | | ... | locally connected IPv6 addresses. Make TG verify ICMPv6 Echo Replies \
91 | | ... | are correct.
92 | | ...
93 | | ${hops}= | Set Variable | ${1}
94 | | ...
95 | | Given Configure path in 2-node circular topology
96 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']}
97 | | And Configure IPv6 forwarding in circular topology | ${tg_to_dut_if1_ip6}
98 | | ... | ${tg_to_dut_if2_ip6} | ${dut_to_tg_if1_ip6} | ${dut_to_tg_if2_ip6}
99 | | And Suppress ICMPv6 router advertisement message | ${nodes}
100 | | When All Vpp Interfaces Ready Wait | ${nodes}
101 | | Then Send IPv6 echo request packet and verify headers | ${tg_node}
102 | | ... | ${tg_to_dut_if1} | ${tg_node} | ${tg_to_dut_if2}
103 | | ... | ${tg_to_dut_if1_ip6} | ${tg_to_dut_if2_ip6} | ${dut_to_tg_if1_mac}
104 | | ... | ${hops} | ${dut_to_tg_if2_mac}
105
106 | tc04-eth2p-ethicmpv6-ip6base-device_echo-req-to-tg-interface-for-remote-host-ipv4-address
107 | | [Documentation]
108 | | ... | Make TG send ICMPv6 Echo Req between its interfaces across DUT1 for \
109 | | ... | remote host IPv6 addresses. Make TG verify ICMPv6 Echo Replies are \
110 | | ... | correct.
111 | | ...
112 | | ${hops}= | Set Variable | ${1}
113 | | ...
114 | | Given Configure path in 2-node circular topology
115 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']}
116 | | And Configure IPv6 forwarding in circular topology | ${tg_to_dut_if1_ip6}
117 | | ... | ${tg_to_dut_if2_ip6} | ${dut_to_tg_if1_ip6} | ${dut_to_tg_if2_ip6}
118 | | ... | remote_host1_ip6=${remote_host1_ip6}
119 | | ... | remote_host2_ip6=${remote_host2_ip6}
120 | | ... | remote_host_ip6_prefix=${remote_host_ip6_prefix}
121 | | And Suppress ICMPv6 router advertisement message | ${nodes}
122 | | When All Vpp Interfaces Ready Wait | ${nodes}
123 | | Then Send IPv6 echo request packet and verify headers | ${tg_node}
124 | | ... | ${tg_to_dut_if1} | ${tg_node} | ${tg_to_dut_if2}
125 | | ... | ${remote_host1_ip6} | ${remote_host2_ip6} | ${dut_to_tg_if1_mac}
126 | | ... | ${hops} | ${dut_to_tg_if2_mac}