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