CSIT-532 HC Test: IPv6 Neighbor Discovery proxy
[csit.git] / tests / func / honeycomb / mgmt-cfg-proxynd6-apihc-func.robot
1 # Copyright (c) 2017 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 *** Variables ***
15 # Interface to run configuration tests on.
16 | ${interface}= | ${node['interfaces']['port1']['name']}
17 # IPv6 addresses to configure on DUT.
18 | ${dut_to_tg_if1_ip}= | 10::1
19 | ${dut_to_tg_if2_ip}= | 11::1
20 # IPv6 addresses used for TG interfaces.
21 | ${test_src_ip}= | 10::2
22 | ${test_dst_ip}= | 11::2
23 | ${test_dst_ip2}= | 11::3
24 # IPv6 subnet prefix length
25 | ${prefix_length}= | 64
26
27 *** Settings ***
28 | Resource | resources/libraries/robot/default.robot
29 | Resource | resources/libraries/robot/honeycomb/honeycomb.robot
30 | Resource | resources/libraries/robot/honeycomb/interfaces.robot
31 | Resource | resources/libraries/robot/honeycomb/proxyarp.robot
32 | Resource | resources/libraries/robot/testing_path.robot
33 | Resource | resources/libraries/robot/ipv6.robot
34 | Resource | resources/libraries/robot/traffic.robot
35 | Resource | resources/libraries/robot/dhcp_proxy.robot
36 | Library | resources.libraries.python.Trace
37 | Test Setup | Clear Packet Trace on All DUTs | ${nodes}
38 | Suite Teardown | Restart Honeycomb And VPP | ${node}
39 | Force Tags | honeycomb_sanity | honeycomb_test
40 | Documentation | *Honeycomb IPv6 neighbor discovery proxy test suite.*
41
42 *** Test Cases ***
43 | TC01: Honeycomb can configure IPv6 ND proxy on an interface
44 | | [Documentation] | Check if Honeycomb can configure the IPv6 ND proxy\
45 | | ... | feature on an interface.
46 | | Given IPv6 ND proxy from Honeycomb should be empty | ${node} | ${interface}
47 | | And Honeycomb sets interface state | ${node} | ${interface} | up
48 | | When Honeycomb configures IPv6 ND proxy on interface
49 | | ... | ${node} | ${interface} | ${test_dst_ip}
50 | | Then IPv6 ND proxy from Honeycomb should be
51 | | ... | ${node} | ${interface} | ${test_dst_ip}
52
53 | TC02: Honeycomb can disable IPv6 ND proxy on an interface
54 | | [Documentation] | Check if Honeycomb can remove IPv6 ND proxy feature\
55 | | ... | configuration from an interface.
56 | | Given IPv6 ND proxy from Honeycomb should be
57 | | ... | ${node} | ${interface} | ${test_dst_ip}
58 | | When Honeycomb disables IPv6 ND proxy on interface | ${node} | ${interface}
59 | | Then IPv6 ND proxy from Honeycomb should be empty | ${node} | ${interface}
60
61 | TC03: Honeycomb can configure multiple IPv6 ND proxies on an interface
62 | | [Documentation] | Check if Honeycomb can configure two ND proxies\
63 | | ... | on one interface.
64 | | [Teardown] | Honeycomb disables IPv6 ND proxy on interface
65 | | ... | ${node} | ${interface}
66 | | Given IPv6 ND proxy from Honeycomb should be empty | ${node} | ${interface}
67 | | And Honeycomb sets interface state | ${node} | ${interface} | up
68 | | When Honeycomb configures IPv6 ND proxy on interface
69 | | ... | ${node} | ${interface} | ${test_dst_ip} | ${test_dst_ip2}
70 | | Then IPv6 ND proxy from Honeycomb should be
71 | | ... | ${node} | ${interface} | ${test_dst_ip} | ${test_dst_ip2}
72
73 | TC04: VPP proxies valid ICMPv6 Neighbor Discovery request
74 | | [Documentation] |
75 | | ... | [Top] TG=DUT
76 | | ... | [Cfg] On DUT configure IPv6 addresses and neighbors, supress router\
77 | | ... | advertisement and configure IPv6 Neighbor Discovery proxy.
78 | | ... | [Ver] Make TG send a neighbor solicitation packet to it's other\
79 | | ... | interface through DUT, verify DUT responds to the packet instead\
80 | | ... | of forwarding it. Then exchange ICMPv6 Echo request/reply to verify\
81 | | ... | connectivity between interfaces.
82 | | ... | [Ref] RFC 4389
83 | | ...
84 | | [Teardown] | Run Keywords
85 | | ... | Show Packet Trace on All DUTs | ${nodes} | AND
86 | | ... | Honeycomb disables IPv6 ND proxy on interface
87 | | ... | ${dut_node} | ${dut_to_tg_if2}
88 | | Given Path for 2-node testing is set
89 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']}
90 | | Honeycomb sets interface state | ${dut_node} | ${dut_to_tg_if1} | up
91 | | Honeycomb sets interface state | ${dut_node} | ${dut_to_tg_if2} | up
92 | | Honeycomb sets interface ipv6 address | ${dut_node}
93 | | ... | ${dut_to_tg_if1} | ${dut_to_tg_if1_ip} | ${prefix_length}
94 | | Honeycomb sets interface ipv6 address | ${dut_node}
95 | | ... | ${dut_to_tg_if2} | ${dut_to_tg_if2_ip} | ${prefix_length}
96 | | And Vpp Ra Suppress Link Layer | ${dut_node} | ${dut_to_tg_if1}
97 | | And Vpp Ra Suppress Link Layer | ${dut_node} | ${dut_to_tg_if2}
98 | | And Honeycomb adds interface ipv6 neighbor | ${dut_node} | ${dut_to_tg_if1}
99 | | ... | ${test_src_ip} | ${tg_to_dut_if1_mac}
100 | | And Honeycomb adds interface ipv6 neighbor | ${dut_node} | ${dut_to_tg_if2}
101 | | ... | ${test_dst_ip} | ${tg_to_dut_if2_mac}
102 | | When Honeycomb configures IPv6 ND proxy on interface
103 | | ... | ${dut_node} | ${dut_to_tg_if2} | ${test_dst_ip}
104 | | Then Verify IPv6ND Proxy | ${tg_node}
105 | | ... | ${tg_to_dut_if1} | ${tg_to_dut_if2}
106 | | ... | ${test_src_ip} | ${test_dst_ip}
107 | | ... | ${tg_to_dut_if1_mac} | ${tg_to_dut_if2_mac}
108 | | ... | ${dut_to_tg_if1_mac} | ${dut_to_tg_if2_mac}