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