diff options
author | Maciek Konstantynowicz <mkonstan@cisco.com> | 2016-06-15 20:40:15 +0100 |
---|---|---|
committer | Jan Gelety <jgelety@cisco.com> | 2016-06-21 19:43:45 +0000 |
commit | 2d3cd90647d4329dc76374287d97a6b8eb04ca7c (patch) | |
tree | 6c00f7ddf9cad4672d9afed78d24b07e97d04521 /tests/suites/ipv6 | |
parent | a670557b96493c1e2c6f4b251a82b83001c3839d (diff) |
Suite:ipv6
Files: ipv6_untagged.robot, ipv6_iacl_untagged.robot, ipv6_ra.robot.
Updated test cases names and test cases documentation.
Change-Id: Id255bd7026dd934cffe15f000347fcfeb59cad22
Signed-off-by: Maciek Konstantynowicz <mkonstan@cisco.com>
Diffstat (limited to 'tests/suites/ipv6')
-rw-r--r-- | tests/suites/ipv6/ipv6_iacl_untagged.robot | 110 | ||||
-rw-r--r-- | tests/suites/ipv6/ipv6_ra.robot | 18 | ||||
-rw-r--r-- | tests/suites/ipv6/ipv6_untagged.robot | 60 |
3 files changed, 116 insertions, 72 deletions
diff --git a/tests/suites/ipv6/ipv6_iacl_untagged.robot b/tests/suites/ipv6/ipv6_iacl_untagged.robot index ffe9880968..e8b363373d 100644 --- a/tests/suites/ipv6/ipv6_iacl_untagged.robot +++ b/tests/suites/ipv6/ipv6_iacl_untagged.robot @@ -28,6 +28,17 @@ | Test Setup | Setup all DUTs before test | Test Teardown | Run Keywords | Show packet trace on all DUTs | ${nodes} | ... | AND | Vpp Show Errors | ${nodes['DUT1']} +| Documentation | *IPv6 routing with ingress ACL test cases* +| ... +| ... | Encapsulations: Eth-IPv6 on links TG-DUT1, TG-DUT2, DUT1-DUT2. IPv6 +| ... | ingress ACL (iACL) tests use 3-node topology TG - DUT1 - DUT2 - TG with +| ... | one link between the nodes. DUT1 and DUT2 are configured with IPv6 +| ... | routing and static routes. DUT1 is configured with iACL on link to TG, +| ... | iACL classification and permit/deny action are configured on a per test +| ... | case basis. Test ICMPv6 Echo Request packets are sent in one direction +| ... | by TG on link to DUT1 and received on TG link to DUT2. On receive TG +| ... | verifies if packets are dropped, or if received verifies packet IPv6 +| ... | src-addr, dst-addr and MAC addresses. *** Variables *** | ${dut1_to_tg_ip}= | 3ffe:62::1 @@ -44,10 +55,10 @@ | ${l2_table}= | l2 *** Test Cases *** -| VPP drops packets based on IPv6 source addresses -| | [Documentation] | Create classify table on VPP, add source IP address -| | ... | of traffic into table and setup 'deny' traffic -| | ... | and check if traffic is dropped. +| TC01: DUT with iACL IPv6 src-addr drops matching pkts +| | [Documentation] +| | ... | On DUT1 add source IPv6 address to classify table with 'deny'.\ +| | ... | Make TG verify matching packets are dropped. | | Given Path for 3-node testing is set | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} | | And Interfaces in 3-node path are up @@ -89,10 +100,10 @@ | | ... | ${tg_to_dut1_mac} | ${dut1_to_tg_mac} | ${tg_to_dut2} | | ... | ${dut1_to_dut2_mac} | ${tg_to_dut2_mac} -| VPP drops packets based on IPv6 destination addresses -| | [Documentation] | Create classify table on VPP, add destination IP address -| | ... | of traffic into table and setup 'deny' traffic -| | ... | and check if traffic is dropped. +| TC02: DUT with iACL IPv6 dst-addr drops matching pkts +| | [Documentation] +| | ... | On DUT1 add destination IPv6 address to classify table with 'deny'.\ +| | ... | Make TG verify matching packets are dropped. | | Given Path for 3-node testing is set | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} | | And Interfaces in 3-node path are up @@ -137,10 +148,10 @@ | | ... | ${tg_to_dut1_mac} | ${dut1_to_tg_mac} | ${tg_to_dut2} | | ... | ${dut1_to_dut2_mac} | ${tg_to_dut2_mac} -| VPP drops packets based on IPv6 src-addr and dst-addr -| | [Documentation] | Create classify table on VPP, add source and destination -| | ... | IP address of traffic into table and setup 'deny' traffic -| | ... | and check if traffic is dropped. +| TC03: DUT with iACL IPv6 src-addr and dst-addr drops matching pkts +| | [Documentation] +| | ... | On DUT1 add source and destination IPv6 addresses to classify table\ +| | ... | with 'deny'. Make TG verify matching packets are dropped. | | Given Path for 3-node testing is set | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} | | And Interfaces in 3-node path are up @@ -192,10 +203,10 @@ | | ... | ${tg_to_dut1_mac} | ${dut1_to_tg_mac} | ${tg_to_dut2} | | ... | ${dut1_to_dut2_mac} | ${tg_to_dut2_mac} -| VPP drops packets based on IPv6 protocol (TCP) -| | [Documentation] | Create classify table on VPP, add mask for TCP port -| | ... | into table and setup 'deny' traffic -| | ... | and check if TCP traffic is dropped. +| TC04: DUT with iACL IPv6 protocol set to TCP drops matching pkts +| | [Documentation] +| | ... | On DUT1 add protocol mask and TCP protocol (0x06) to classify table\ +| | ... | with 'deny'. Make TG verify matching packets are dropped. | | Given Path for 3-node testing is set | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} | | And Interfaces in 3-node path are up @@ -233,10 +244,10 @@ | | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac} | | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | UDP | 80 | 20 -| VPP drops packets based on IPv6 protocol (UDP) -| | [Documentation] | Create classify table on VPP, add mask for UDP port -| | ... | into table and setup 'deny' traffic -| | ... | and check if UDP traffic is dropped. +| TC05: DUT with iACL IPv6 protocol set to UDP drops matching pkts +| | [Documentation] +| | ... | On DUT1 add protocol mask and UDP protocol (0x11) to classify table\ +| | ... | with 'deny'. Make TG verify matching packets are dropped. | | Given Path for 3-node testing is set | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} | | And Interfaces in 3-node path are up @@ -274,10 +285,10 @@ | | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac} | | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | TCP | 80 | 20 -| VPP drops packets based on IPv6 TCP src ports -| | [Documentation] | Create classify table on VPP, add source IP address -| | ... | of traffic into table and setup 'deny' traffic -| | ... | and check if traffic is dropped. +| TC06: DUT with iACL IPv6 TCP src-ports drops matching pkts +| | [Documentation] +| | ... | On DUT1 add TCP source ports to classify table with 'deny'.\ +| | ... | Make TG verify matching packets are dropped. | | Given Path for 3-node testing is set | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} | | And Interfaces in 3-node path are up @@ -316,10 +327,10 @@ | | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac} | | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | TCP | 110 | 20 -| VPP drops packets based on IPv6 TCP dst ports -| | [Documentation] | Create classify table on VPP, add destination TCP port -| | ... | of traffic into table and setup 'deny' traffic -| | ... | and check if traffic is dropped. +| TC07: DUT with iACL IPv6 TCP dst-ports drops matching pkts +| | [Documentation] +| | ... | On DUT1 add TCP destination ports to classify table with 'deny'.\ +| | ... | Make TG verify matching packets are dropped. | | Given Path for 3-node testing is set | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} | | And Interfaces in 3-node path are up @@ -358,10 +369,10 @@ | | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac} | | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | TCP | 20 | 110 -| VPP drops packets based on IPv6 TCP src + dst ports -| | [Documentation] | Create classify table on VPP, add source and destination -| | ... | TCP port of traffic into table and setup 'deny' traffic -| | ... | and check if traffic is dropped. +| TC08: DUT with iACL IPv6 TCP src-ports and dst-ports drops matching pkts +| | [Documentation] +| | ... | On DUT1 add TCP source and destination ports to classify table\ +| | ... | with 'deny'. Make TG verify matching packets are dropped. | | Given Path for 3-node testing is set | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} | | And Interfaces in 3-node path are up @@ -401,10 +412,10 @@ | | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac} | | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | TCP | 110 | 25 -| VPP drops packets based on IPv6 UDP src ports -| | [Documentation] | Create classify table on VPP, add source UDP port -| | ... | of traffic into table and setup 'deny' traffic -| | ... | and check if traffic is dropped. +| TC09: DUT with iACL IPv6 UDP src-ports drops matching pkts +| | [Documentation] +| | ... | On DUT1 add UDP source ports to classify table with 'deny'.\ +| | ... | Make TG verify matching packets are dropped. | | Given Path for 3-node testing is set | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} | | And Interfaces in 3-node path are up @@ -443,10 +454,10 @@ | | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac} | | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | UDP | 110 | 20 -| VPP drops packets based on IPv6 UDP dst ports -| | [Documentation] | Create classify table on VPP, add destination UDP port -| | ... | of traffic into table and setup 'deny' traffic -| | ... | and check if traffic is dropped. +| TC10: DUT with iACL IPv6 UDP dst-ports drops matching pkts +| | [Documentation] +| | ... | On DUT1 add TCP destination ports to classify table with 'deny'.\ +| | ... | Make TG verify matching packets are dropped. | | Given Path for 3-node testing is set | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} | | And Interfaces in 3-node path are up @@ -485,10 +496,10 @@ | | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac} | | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | UDP | 20 | 110 -| VPP drops packets based on IPv6 UDP src + dst ports -| | [Documentation] | Create classify table on VPP, add source and destination -| | ... | UDP port of traffic into table and setup 'deny' traffic -| | ... | and check if traffic is dropped. +| TC11: DUT with iACL IPv6 UDP src-ports and dst-ports drops matching pkts +| | [Documentation] +| | ... | On DUT1 add UDP source and destination ports to classify table\ +| | ... | with 'deny'. Make TG verify matching packets are dropped. | | Given Path for 3-node testing is set | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} | | And Interfaces in 3-node path are up @@ -528,12 +539,11 @@ | | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac} | | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | UDP | 110 | 25 -| VPP can drop packets based on src MAC + IPv6 UDP src+dst port -| | [Documentation] | Create first classify table on VPP, for source MAC address -| | ... | filtering and second classify table for IPv6 UDP source -| | ... | and destination port filtering. Add MAC address and UDP -| | ... | ports into table and set 'deny' traffic. -| | ... | Check if traffic is dropped. +| TC12: DUT with iACL MAC src-addr and iACL IPv6 UDP src-ports and dst-ports drops matching pkts +| | [Documentation] +| | ... | On DUT1 add source MAC address to classify (L2) table and add UDP\ +| | ... | source and destination ports to classify (hex) table with 'deny'. +| | ... | Make TG verify matching packets are dropped. | | Given Path for 3-node testing is set | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} | | And Interfaces in 3-node path are up diff --git a/tests/suites/ipv6/ipv6_ra.robot b/tests/suites/ipv6/ipv6_ra.robot index 9ce824d807..f5272011d3 100644 --- a/tests/suites/ipv6/ipv6_ra.robot +++ b/tests/suites/ipv6/ipv6_ra.robot @@ -27,11 +27,12 @@ | ... | AND | Update All Interface Data On All Nodes | ${nodes} | Test Setup | Setup all DUTs before test | Test Teardown | Show packet trace on all DUTs | ${nodes} -| Documentation | *Router advertisement tests.* +| Documentation | *IPv6 Router Advertisement test cases* | ... -| ... | Test suite uses 3-node topology TG - DUT1 - DUT2 - TG -| ... | with one link between nodes where Router advertisement functionality is -| ... | tested in following test cases. +| ... | RFC4861 Neighbor Discovery. Encapsulations: Eth-IPv6-RA on links +| ... | TG-DUT1. IPv6 Router Advertisement tests use 3-node topology TG - DUT1 - +| ... | DUT2 - TG with one link between the nodes. DUT1 and DUT2 are configured +| ... | with IPv6 routing and static routes. TG verifies received RA packets. *** Variables *** @@ -39,10 +40,11 @@ | ${prefix_length}= | 64 *** Test Cases *** -| VPP transmits RA from IPv6 enabled interface -| | [Documentation] | Setup IPv6 interace and wait for router advertisement \ -| | ... | packet from this interface to be sent. Subsequently, \ -| | ... | check received packet for correct contents. +| TC01: DUT transmits RA on IPv6 enabled interface +| | [Documentation] +| | ... | On DUT1 configure IPv6 interface on the link to TG. Make TG wait\ +| | ... | for IPv6 Router Advertisement packet to be sent out by DUT1 and +| | ... | verify the received RA packet is correct. | | Given Path for 3-node testing is set | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} | | And Interfaces in 3-node path are up diff --git a/tests/suites/ipv6/ipv6_untagged.robot b/tests/suites/ipv6/ipv6_untagged.robot index d67d1e35fc..adc74ae88f 100644 --- a/tests/suites/ipv6/ipv6_untagged.robot +++ b/tests/suites/ipv6/ipv6_untagged.robot @@ -11,10 +11,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -"""IPv6 untagged test suite""" - *** Settings *** -| Documentation | IPv6 untagged test suite | Library | resources.libraries.python.Trace | Resource | resources/libraries/robot/interfaces.robot | Resource | resources/libraries/robot/ipv6.robot @@ -28,21 +25,40 @@ | ... | AND | Setup all TGs before traffic script | Test Setup | Clear interface counters on all vpp nodes in topology | ${nodes} | Test Teardown | Run Keyword If Test Failed | Show packet trace on all DUTs | ${nodes} +| Documentation | *IPv6 routing test cases* +| ... +| ... | RFC2460 IPv6, RFC4443 ICMPv6, RFC4861 Neighbor Discovery. +| ... | Encapsulations: Eth-IPv6-ICMPv6 on links TG-DUT1, TG-DUT2, DUT1-DUT2; +| ... | Eth-IPv6-NS/NA on links TG-DUT. IPv6 routing tests use circular 3-node +| ... | topology TG - DUT1 - DUT2 - TG with one link between the nodes. DUT1 and +| ... | DUT2 are configured with IPv6 routing and static routes. Test ICMPv6 +| ... | Echo Request packets are sent in both directions by TG on links to DUT1 +| ... | and DUT2 and received on TG links on the other side of circular +| ... | topology. On receive TG verifies packets IPv6 src-addr, dst-addr and MAC +| ... | addresses. *** Test Cases *** -| VPP replies to ICMPv6 echo request +| TC01: DUT replies to ICMPv6 Echo Req to its ingress interface +| | [Documentation] +| | ... | Make TG send ICMPv6 Echo Req to DUT ingress interface. Make TG\ +| | ... | verify ICMPv6 Echo Reply is correct. | | [Tags] | 3_NODE_SINGLE_LINK_TOPO | VM_ENV | | Ipv6 icmp echo | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes_ipv6_addr} -| VPP can process ICMPv6 echo request from min to 1500B packet size with 1B increment +| TC02: DUT replies to ICMPv6 Echo Req pkt with size 64B-to-1500B-incr-1B +| | [Documentation] +| | ... | Make TG send ICMPv6 Echo Reqs to DUT ingress interface,\ +| | ... | incrementating frame size from 64B to 1500B with increment step +| | ... | of 1Byte. Make TG verify ICMP Echo Replies are correct. | | [Tags] | 3_NODE_SINGLE_LINK_TOPO | VM_ENV | | Ipv6 icmp echo sweep | ${nodes['TG']} | ${nodes['DUT1']} | 0 | 1452 | 1 | ${nodes_ipv6_addr} -| VPP can process ICMPv6 echo request from 1500B to max packet size with 10B increment +| TC03: DUT replies to ICMPv6 Echo Req pkt with size 1500B-to-9000B-incr-10B +| | [Documentation] +| | ... | Make TG send ICMPv6 Echo Reqs to DUT ingress interface,\ +| | ... | incrementating frame size from 1500B to 9000B with increment +| | ... | step of 10Bytes. Make TG verify ICMPv6 Echo Replies are correct. | | [Tags] | 3_NODE_SINGLE_LINK_TOPO -| | [Documentation] | This test case cannot be run reliably on VM_ENV because -| | ... | the virtual hosts can be connected using a bridge which -| | ... | has its own MTU | | [Setup] | Setup MTU on TG based on MTU on DUT | ${nodes['TG']} | ${nodes['DUT1']} | | [Teardown] | Set default Ethernet MTU on all interfaces on node | ${nodes['TG']} | | Append Nodes | ${nodes['TG']} | ${nodes['DUT1']} @@ -56,26 +72,42 @@ | | ... | Ipv6 icmp echo sweep | ${nodes['TG']} | ${nodes['DUT1']} | | ... | 1452 | ${end_size} | 10 | ${nodes_ipv6_addr} -| TG can route to first DUT egress interface +| TC04: DUT routes to its egress interface +| | [Documentation] +| | ... | Make TG send ICMPv6 Echo Req towards DUT1 egress interface\ +| | ... | connected to DUT2. Make TG verify ICMPv6 Echo Reply is correct. | | [Tags] | 3_NODE_SINGLE_LINK_TOPO | VM_ENV | | Ipv6 tg to dut1 egress | ${nodes['TG']} | ${nodes['DUT1']} | | | ... | ${nodes['DUT2']} | ${nodes_ipv6_addr} -| TG can route to second DUT through first DUT +| TC05: DUT1 routes to DUT2 ingress interface +| | [Documentation] +| | ... | Make TG send ICMPv6 Echo Req towards DUT2 ingress interface\ +| | ... | connected to DUT1. Make TG verify ICMPv6 Echo Reply is correct. | | [Tags] | 3_NODE_SINGLE_LINK_TOPO | VM_ENV | | Ipv6 tg to dut2 via dut1 | ${nodes['TG']} | ${nodes['DUT1']} | | ... | ${nodes['DUT2']} | ${nodes_ipv6_addr} -| TG can route to second DUT egress interface through first DUT +| TC06: DUT1 routes to DUT2 egress interface +| | [Documentation] +| | ... | Make TG send ICMPv6 Echo Req towards DUT2 egress interface\ +| | ... | connected to TG. Make TG verify ICMPv6 Echo Reply is correct. | | [Tags] | 3_NODE_SINGLE_LINK_TOPO | VM_ENV | | Ipv6 tg to dut2 egress via dut1 | ${nodes['TG']} | ${nodes['DUT1']} | | ... | ${nodes['DUT2']} | ${nodes_ipv6_addr} -| TG can route to TG through first and second DUT +| TC07: DUT1 and DUT2 route between TG interfaces +| | [Documentation] +| | ... | Make TG send ICMPv6 Echo Req between its interfaces across DUT1\ +| | ... | and DUT2. Make TG verify ICMPv6 Echo Replies are correct. | | [Tags] | 3_NODE_SINGLE_LINK_TOPO | VM_ENV | | Ipv6 tg to tg routed | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | | ... | ${nodes_ipv6_addr} -| VPP replies to IPv6 Neighbor Solicitation +| TC08: DUT replies to IPv6 Neighbor Solicitation +| | [Documentation] +| | ... | On DUT configure interface IPv6 address in the main routing\ +| | ... | domain. Make TG send Neighbor Solicitation message on the link +| | ... | to DUT and verify DUT Neighbor Advertisement reply is correct. | | [Tags] | 3_NODE_SINGLE_LINK_TOPO | VM_ENV | | Ipv6 neighbor solicitation | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes_ipv6_addr} |