CSIT-220: Rename directories in tests directory
[csit.git] / tests / func / ipv6 / ipv6_untagged.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.Trace
16 | Resource | resources/libraries/robot/interfaces.robot
17 | Resource | resources/libraries/robot/ipv6.robot
18 | Resource | resources/libraries/robot/counters.robot
19 | Resource | resources/libraries/robot/default.robot
20 | Variables | resources/libraries/python/IPv6NodesAddr.py | ${nodes}
21 | Force Tags | HW_ENV
22 | Suite Setup | Run Keywords | Setup ipv6 to all dut in topology | ${nodes} | ${nodes_ipv6_addr}
23 | ...         | AND          | Vpp nodes ra suppress link layer | ${nodes}
24 | ...         | AND          | Vpp nodes setup ipv6 routing | ${nodes} | ${nodes_ipv6_addr}
25 | ...         | AND          | Setup all TGs before traffic script
26 | Test Setup | Clear interface counters on all vpp nodes in topology | ${nodes}
27 | Test Teardown | Run Keyword If Test Failed | Show packet trace on all DUTs | ${nodes}
28 | ...           | AND                        | Show vpp trace dump on all DUTs
29 | Documentation | *IPv6 routing test cases*
30 | ...
31 | ... | RFC2460 IPv6, RFC4443 ICMPv6, RFC4861 Neighbor Discovery.
32 | ... | Encapsulations: Eth-IPv6-ICMPv6 on links TG-DUT1, TG-DUT2, DUT1-DUT2;
33 | ... | Eth-IPv6-NS/NA on links TG-DUT. IPv6 routing tests use circular 3-node
34 | ... | topology TG - DUT1 - DUT2 - TG with one link between the nodes. DUT1 and
35 | ... | DUT2 are configured with IPv6 routing and static routes. Test ICMPv6
36 | ... | Echo Request packets are sent in both directions by TG on links to DUT1
37 | ... | and DUT2 and received on TG links on the other side of circular
38 | ... | topology. On receive TG verifies packets IPv6 src-addr, dst-addr and MAC
39 | ... | addresses.
40
41 *** Test Cases ***
42 | TC01: DUT replies to ICMPv6 Echo Req to its ingress interface
43 | | [Documentation]
44 | | ... | Make TG send ICMPv6 Echo Req to DUT ingress interface. Make TG\
45 | | ... | verify ICMPv6 Echo Reply is correct.
46 | | [Tags] | 3_NODE_SINGLE_LINK_TOPO | VM_ENV
47 | | Ipv6 icmp echo | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes_ipv6_addr}
48
49 | TC02: DUT replies to ICMPv6 Echo Req pkt with size 64B-to-1500B-incr-1B
50 | | [Documentation]
51 | | ... | Make TG send ICMPv6 Echo Reqs to DUT ingress interface,\
52 | | ... | incrementating frame size from 64B to 1500B with increment step
53 | | ... | of 1Byte. Make TG verify ICMP Echo Replies are correct.
54 | | [Tags] | 3_NODE_SINGLE_LINK_TOPO | VM_ENV
55 | | Ipv6 icmp echo sweep | ${nodes['TG']} | ${nodes['DUT1']} | 0 | 1452 | 1 | ${nodes_ipv6_addr}
56
57 | TC03: DUT replies to ICMPv6 Echo Req pkt with size 1500B-to-9000B-incr-10B
58 | | [Documentation]
59 | | ... | Make TG send ICMPv6 Echo Reqs to DUT ingress interface,\
60 | | ... | incrementating frame size from 1500B to 9000B with increment
61 | | ... | step of 10Bytes. Make TG verify ICMPv6 Echo Replies are correct.
62 | | [Tags] | 3_NODE_SINGLE_LINK_TOPO
63 | | [Setup] | Setup MTU on TG based on MTU on DUT | ${nodes['TG']} | ${nodes['DUT1']}
64 | | [Teardown] | Set default Ethernet MTU on all interfaces on node | ${nodes['TG']}
65 | | Append Nodes | ${nodes['TG']} | ${nodes['DUT1']}
66 | | Compute Path
67 | | ${dut_port} | ${dut_node}= | Last Interface
68 | | ${mtu}= | Get Interface MTU | ${dut_node} | ${dut_port}
69 | | # ICMPv6 payload size is frame size minus size of Ehternet header, FCS,
70 | | # IPv6 header and ICMPv6 header
71 | | ${end_size}= | Evaluate | ${mtu} - 14 - 4 - 40 - 8
72 | | Run Keyword If | ${mtu} > 1518
73 | | ...            | Ipv6 icmp echo sweep | ${nodes['TG']} | ${nodes['DUT1']}
74 | | ...            | 1452 | ${end_size} | 10 | ${nodes_ipv6_addr}
75
76 | TC04: DUT routes to its egress interface
77 | | [Documentation]
78 | | ... | Make TG send ICMPv6 Echo Req towards DUT1 egress interface\
79 | | ... | connected to DUT2. Make TG verify ICMPv6 Echo Reply is correct.
80 | | [Tags] | 3_NODE_SINGLE_LINK_TOPO | VM_ENV
81 | | Ipv6 tg to dut1 egress | ${nodes['TG']} | ${nodes['DUT1']} |
82 | | ...                    | ${nodes['DUT2']} | ${nodes_ipv6_addr}
83
84 | TC05: DUT1 routes to DUT2 ingress interface
85 | | [Documentation]
86 | | ... | Make TG send ICMPv6 Echo Req towards DUT2 ingress interface\
87 | | ... | connected to DUT1. Make TG verify ICMPv6 Echo Reply is correct.
88 | | [Tags] | 3_NODE_SINGLE_LINK_TOPO | VM_ENV
89 | | Ipv6 tg to dut2 via dut1 | ${nodes['TG']} | ${nodes['DUT1']}
90 | | ...                      | ${nodes['DUT2']} | ${nodes_ipv6_addr}
91
92 | TC06: DUT1 routes to DUT2 egress interface
93 | | [Documentation]
94 | | ... | Make TG send ICMPv6 Echo Req towards DUT2 egress interface\
95 | | ... | connected to TG. Make TG verify ICMPv6 Echo Reply is correct.
96 | | [Tags] | 3_NODE_SINGLE_LINK_TOPO | VM_ENV
97 | | Ipv6 tg to dut2 egress via dut1 | ${nodes['TG']} | ${nodes['DUT1']}
98 | | ...                             | ${nodes['DUT2']} | ${nodes_ipv6_addr}
99
100 | TC07: DUT1 and DUT2 route between TG interfaces
101 | | [Documentation]
102 | | ... | Make TG send ICMPv6 Echo Req between its interfaces across DUT1\
103 | | ... | and DUT2. Make TG verify ICMPv6 Echo Replies are correct.
104 | | [Tags] | 3_NODE_SINGLE_LINK_TOPO | VM_ENV
105 | | Ipv6 tg to tg routed | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']}
106 | | ...                  | ${nodes_ipv6_addr}
107
108 | TC08: DUT replies to IPv6 Neighbor Solicitation
109 | | [Documentation]
110 | | ... | On DUT configure interface IPv6 address in the main routing\
111 | | ... | domain. Make TG send Neighbor Solicitation message on the link
112 | | ... | to DUT and verify DUT Neighbor Advertisement reply is correct.
113 | | [Tags] | 3_NODE_SINGLE_LINK_TOPO | VM_ENV
114 | | Ipv6 neighbor solicitation | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes_ipv6_addr}