91a1b517d8aa9cf2b9bd3b173620135d946e9ad3
[csit.git] / tests / func / ipv6 / ipv6_ra.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 | Resource | resources/libraries/robot/default.robot
16 | Resource | resources/libraries/robot/counters.robot
17 | Resource | resources/libraries/robot/interfaces.robot
18 | Resource | resources/libraries/robot/testing_path.robot
19 | Resource | resources/libraries/robot/ipv6.robot
20 | Resource | resources/libraries/robot/traffic.robot
21 | Library | resources.libraries.python.Trace
22
23 | Force Tags | HW_ENV | VM_ENV | 3_NODE_SINGLE_LINK_TOPO
24 | Suite Setup | Run Keywords | Setup All TGs Before Traffic Script
25 | ...         | AND          | Update All Interface Data On All Nodes | ${nodes}
26 | Test Setup | Setup All DUTs Before Test
27 | Test Teardown | Run Keywords
28 | ... | Show Packet Trace On All DUTs | ${nodes} | AND
29 | ... | Show VPP Trace Dump On All DUTs
30 | Documentation | *IPv6 Router Advertisement test cases*
31 | ...
32 | ... | RFC4861 Neighbor Discovery. Encapsulations: Eth-IPv6-RA on links
33 | ... | TG-DUT1. IPv6 Router Advertisement tests use 3-node topology TG - DUT1 -
34 | ... | DUT2 - TG with one link between the nodes. DUT1 and DUT2 are configured
35 | ... | with IPv6 routing and static routes. TG verifies received RA packets.
36
37
38 *** Variables ***
39 | ${dut1_to_tg_ip}= | 3ffe:62::1
40 | ${tg_to_dut1_ip}= | 3ffe:62::2
41 | ${prefix_length}= | 64
42 | ${interval}= | 2
43
44 *** Test Cases ***
45 | TC01: DUT transmits RA on IPv6 enabled interface
46 | | [Documentation]
47 | | ... | [Top] TG-DUT1-DUT2-TG.
48 | | ... | [Cfg] On DUT1 configure IPv6 interface on the link to TG.
49 | | ... | [Ver] Make TG wait for IPv6 Router Advertisement packet to be sent\
50 | | ... | by DUT1 and verify the received RA packet is correct.
51 | | [Tags] | EXPECTED_FAILING
52 | | Given Path For 3-node Testing Is Set
53 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']}
54 | | And Interfaces In 3-node Path Are Up
55 | | And Vpp Set If Ipv6 Addr | ${dut1_node}
56 | | ... | ${dut1_to_tg} | ${dut1_to_tg_ip} | ${prefix_length}
57 | | When Vpp RA Send After Interval | ${dut1_node} | ${dut1_to_tg}
58 | | Then Receive And Check Router Advertisement Packet
59 | | ... | ${tg_node} | ${tg_to_dut1} | ${dut1_to_tg_mac}
60
61 | TC02: DUT retransmits RA on IPv6 enabled interface after a set interval
62 | | [Documentation]
63 | | ... | [Top] TG-DUT1-DUT2-TG.
64 | | ... | [Cfg] On DUT1 configure IPv6 interface on the link to TG.
65 | | ... | [Ver] Make TG wait for two IPv6 Router Advertisement packets\
66 | | ... | to be sent by DUT1 and verify the received RA packets are correct.
67 | | [Tags] | EXPECTED_FAILING
68 | | Given Path For 3-node Testing Is Set
69 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']}
70 | | And Interfaces In 3-node Path Are Up
71 | | And Vpp Set If Ipv6 Addr | ${dut1_node}
72 | | ... | ${dut1_to_tg} | ${dut1_to_tg_ip} | ${prefix_length}
73 | | When Vpp RA Send After Interval | ${dut1_node} | ${dut1_to_tg}
74 | | ... | interval=${interval}
75 | | :FOR | ${n} | IN RANGE | ${2}
76 | | | Then Receive And Check Router Advertisement Packet
77 | | | ... | ${tg_node} | ${tg_to_dut1} | ${dut1_to_tg_mac} | ${interval}
78
79 | TC03: DUT responds to Router Solicitation request
80 | | [Documentation]
81 | | ... | [Top] TG-DUT1-DUT2-TG.
82 | | ... | [Cfg] On DUT1 configure IPv6 interface on the link to TG and suppress\
83 | | ... | sending of Router Advertisement packets periodically.
84 | | ... | [Ver] Make TG send IPv6 Router Solicitation request to DUT1, listen\
85 | | ... | for response from DUT1 and verify the received RA packet is correct.
86 | | [Tags] | EXPECTED_FAILING
87 | | Given Path For 3-node Testing Is Set
88 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']}
89 | | And Interfaces In 3-node Path Are Up
90 | | And Vpp Set If Ipv6 Addr | ${dut1_node}
91 | | ... | ${dut1_to_tg} | ${dut1_to_tg_ip} | ${prefix_length}
92 | | When VPP RA Suppress Link Layer | ${dut1_node} | ${dut1_to_tg}
93 | | Then Send Router Solicitation And Check Response
94 | | ... | ${tg_node} | ${dut1_node} | ${tg_to_dut1} | ${dut1_to_tg}
95 | | ... | ${tg_to_dut1_ip}
96
97 | TC04: DUT responds to Router Solicitation request sent from link local address
98 | | [Documentation]
99 | | ... | [Top] TG-DUT1-DUT2-TG.
100 | | ... | [Cfg] On DUT1 configure IPv6 interface on the link to TG and suppress\
101 | | ... | sending of Router Advertisement packets periodically.
102 | | ... | [Ver] Make TG send IPv6 Router Solicitation request to DUT1, listen\
103 | | ... | for response from DUT1 and verify the received RA packet is correct.
104 | | [Tags] | EXPECTED_FAILING
105 | | Given Path For 3-node Testing Is Set
106 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']}
107 | | And Interfaces In 3-node Path Are Up
108 | | And Vpp Set If Ipv6 Addr | ${dut1_node}
109 | | ... | ${dut1_to_tg} | ${dut1_to_tg_ip} | ${prefix_length}
110 | | When VPP RA Suppress Link Layer | ${dut1_node} | ${dut1_to_tg}
111 | | Then Send Router Solicitation And Check Response
112 | | ... | ${tg_node} | ${dut1_node} | ${tg_to_dut1} | ${dut1_to_tg}