diff options
Diffstat (limited to 'tests/suites')
-rw-r--r-- | tests/suites/ipv4/ipv4_arp_untagged.robot | 24 | ||||
-rw-r--r-- | tests/suites/ipv4/ipv4_iacl_untagged.robot | 107 | ||||
-rw-r--r-- | tests/suites/ipv4/ipv4_untagged.robot | 58 |
3 files changed, 121 insertions, 68 deletions
diff --git a/tests/suites/ipv4/ipv4_arp_untagged.robot b/tests/suites/ipv4/ipv4_arp_untagged.robot index 9ad3b1b75a..099cd64020 100644 --- a/tests/suites/ipv4/ipv4_arp_untagged.robot +++ b/tests/suites/ipv4/ipv4_arp_untagged.robot @@ -12,7 +12,6 @@ # limitations under the License. *** Settings *** -| Documentation | Check if VPP sends ARP request to unknown destinations. | Resource | resources/libraries/robot/default.robot | Resource | resources/libraries/robot/counters.robot | Resource | resources/libraries/robot/interfaces.robot @@ -27,6 +26,13 @@ | ... | 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 | *IPv4 ARP test cases* +| ... +| ... | RFC826 ARP: Eth-IPv4 and Eth-ARP on links TG-DUT1, TG-DUT2, DUT1-DUT2: +| ... | IPv4 ARP tests use 3-node topology TG - DUT1 - DUT2 - TG with one link +| ... | between the nodes. DUT1 and DUT2 are configured with IPv4 routing and +| ... | static routes. DUT ARP functionality is tested by making TG send ICMPv4 +| ... | Echo Requests towards its other interface via DUT1 and DUT2. *** Variables *** | ${dut1_to_tg_ip}= | 192.168.1.1 @@ -37,9 +43,11 @@ | ${prefix_length}= | 24 *** Test Cases *** -| VPP sends ARP requests for unknown destinations -| | [Documentation] | Setup IP addresses. -| | ... | Send ICMP packet and check if VPP sends ARP request. +| TC01: DUT sends ARP Request for unresolved locally connected IPv4 address +| | [Documentation] +| | ... | Make TG send test packet destined to IPv4 address of its other\ +| | ... | interface connected to DUT2. Make TG verify DUT2 sends ARP +| | ... | Request for locally connected TG IPv4 address. | | Given Path for 3-node testing is set | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} | | And Interfaces in 3-node path are up @@ -54,10 +62,12 @@ | | ... | ${dut1_to_tg_mac} | ${tg_to_dut2} | ${dut1_to_dut2_mac} | | ... | ${dut1_to_dut2_ip} | ${dut1_to_dut2_ip_GW} -| VPP sends ARP requests for route's next hop IP +| TC02: DUT sends ARP Request for route next hop IPv4 address +| | [Documentation] | +| | ... | Make TG send test packet destined to IPv4 address matching\ +| | ... | static route on DUT2. Make TG verify DUT2 sends ARP Request for +| | ... | next hop of the static route. | | [Tags] | EXPECTED_FAILING -| | [Documentation] | Setup IP addresses and route. -| | ... | Send ICMP packet and check if VPP sends ARP request. | | 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/ipv4/ipv4_iacl_untagged.robot b/tests/suites/ipv4/ipv4_iacl_untagged.robot index 0a2aa5e6d4..57ffe8ac2d 100644 --- a/tests/suites/ipv4/ipv4_iacl_untagged.robot +++ b/tests/suites/ipv4/ipv4_iacl_untagged.robot @@ -29,6 +29,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 | *IPv4 routing with ingress ACL test cases* +| ... +| ... | Encapsulations: Eth-IPv4 on links TG-DUT1, TG-DUT2, DUT1-DUT2. IPv4 +| ... | ingress ACL (iACL) tests use 3-node topology TG - DUT1 - DUT2 - TG with +| ... | one link between the nodes. DUT1 and DUT2 are configured with IPv4 +| ... | 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 ICMPv4 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 IPv4 +| ... | src-addr, dst-addr and MAC addresses. *** Variables *** | ${dut1_to_tg_ip}= | 192.168.1.1 @@ -43,10 +54,10 @@ | ${l2_table}= | l2 *** Test Cases *** -| VPP drops packets based on IPv4 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 IPv4 src-addr drops matching pkts +| | [Documentation] +| | ... | On DUT1 add source IPv4 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 @@ -87,10 +98,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 IPv4 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 IPv4 dst-addr drops matching pkts +| | [Documentation] +| | ... | On DUT1 add destination IPv4 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 @@ -134,10 +145,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 IPv4 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 IPv4 src-addr and dst-addr drops matching pkts +| | [Documentation] +| | ... | On DUT1 add source and destination IPv4 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 @@ -188,10 +199,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 IPv4 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 IPv4 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 @@ -228,10 +239,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 IPv4 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 IPv4 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 @@ -268,10 +279,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 IPv4 TCP src ports -| | [Documentation] | Create classify table on VPP, add source TCP port -| | ... | of traffic into table and setup 'deny' traffic -| | ... | and check if traffic is dropped. +| TC06: DUT with iACL IPv4 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 @@ -309,10 +320,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 IPv4 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 IPv4 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 @@ -350,10 +361,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 IPv4 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 IPv4 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 @@ -392,10 +403,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 IPv4 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 IPv4 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 @@ -433,10 +444,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 IPv4 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 IPv4 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 @@ -474,10 +485,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 IPv4 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 IPv4 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 @@ -516,10 +527,10 @@ | | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac} | | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | UDP | 110 | 25 -| VPP drops packets based on MAC src addr -| | [Documentation] | Create classify table on VPP, add source MAC address -| | ... | of traffic into table and setup 'deny' traffic -| | ... | and check if traffic is dropped. +| TC12: DUT with iACL MAC src-addr drops matching pkts +| | [Documentation] +| | ... | On DUT1 add source MAC 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 diff --git a/tests/suites/ipv4/ipv4_untagged.robot b/tests/suites/ipv4/ipv4_untagged.robot index 45ab5768c7..e19cc02388 100644 --- a/tests/suites/ipv4/ipv4_untagged.robot +++ b/tests/suites/ipv4/ipv4_untagged.robot @@ -24,10 +24,23 @@ | ... | AND | Setup DUT nodes for IPv4 testing | 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 | *IPv4 routing test cases* +| ... +| ... | RFC791 IPv4, RFC826 ARP, RFC792 ICMPv4. Encapsulations: Eth-IPv4-ICMPv4 +| ... | on links TG-DUT1, TG-DUT2, DUT1-DUT2. IPv4 routing tests use circular +| ... | 3-node topology TG - DUT1 - DUT2 - TG with one link between the nodes. +| ... | DUT1 and DUT2 are configured with IPv4 routing and static routes. Test +| ... | ICMPv4 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 IPv4 src-addr, dst-addr and MAC +| ... | addresses. *** Test Cases *** -| VPP replies to ICMPv4 echo request +| TC01: DUT replies to ICMPv4 Echo Req to its ingress interface +| | [Documentation] +| | ... | Make TG send ICMPv4 Echo Req to DUT ingress interface. Make TG\ +| | ... | verify ICMP Echo Reply is correct. | | [Tags] | 3_NODE_SINGLE_LINK_TOPO | VM_ENV | | Append Nodes | ${nodes['TG']} | ${nodes['DUT1']} | | Compute Path @@ -36,7 +49,10 @@ | | ${hops}= | Set Variable | ${0} | | Node "${src_node}" interface "${src_port}" can route to node "${dst_node}" interface "${dst_port}" ${hops} hops away using IPv4 -| TG can route to DUT egress interface +| TC02: DUT routes IPv4 to its egress interface +| | [Documentation] +| | ... | Make TG send ICMPv4 Echo Req towards DUT1 egress interface\ +| | ... | connected to DUT2. Make TG verify ICMPv4 Echo Reply is correct. | | [Tags] | 3_NODE_SINGLE_LINK_TOPO | VM_ENV | | Append Nodes | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | | Compute Path @@ -45,7 +61,10 @@ | | ${hops}= | Set Variable | ${0} | | Node "${src_node}" interface "${src_port}" can route to node "${dst_node}" interface "${dst_port}" ${hops} hops away using IPv4 -| TG can route to DUT2 through DUT1 +| TC03: DUT1 routes IPv4 to DUT2 ingress interface +| | [Documentation] +| | ... | Make TG send ICMPv4 Echo Req towards DUT2 ingress interface\ +| | ... | connected to DUT1. Make TG verify ICMPv4 Echo Reply is correct. | | [Tags] | 3_NODE_SINGLE_LINK_TOPO | VM_ENV | | Append Nodes | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | | Compute Path @@ -54,7 +73,10 @@ | | ${hops}= | Set Variable | ${1} | | Node "${src_node}" interface "${src_port}" can route to node "${dst_node}" interface "${dst_port}" ${hops} hops away using IPv4 -| TG can route to DUT2 egress interface through DUT1 +| TC04: DUT1 routes IPv4 to DUT2 egress interface +| | [Documentation] +| | ... | Make TG send ICMPv4 Echo Req towards DUT2 egress interface\ +| | ... | connected to TG. Make TG verify ICMPv4 Echo Reply is correct. | | [Tags] | 3_NODE_SINGLE_LINK_TOPO | VM_ENV | | Append Nodes | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} | | Compute Path @@ -63,7 +85,10 @@ | | ${hops}= | Set Variable | ${1} | | Node "${src_node}" interface "${src_port}" can route to node "${dst_node}" interface "${dst_port}" ${hops} hops away using IPv4 -| TG can route to TG through DUT1 and DUT2 +| TC05: DUT1 and DUT2 route IPv4 between TG interfaces +| | [Documentation] +| | ... | Make TG send ICMPv4 Echo Req between its interfaces across DUT1\ +| | ... | and DUT2. Make TG verify ICMPv4 Echo Replies are correct. | | [Tags] | 3_NODE_SINGLE_LINK_TOPO | VM_ENV | | Append Nodes | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} | | Compute Path @@ -84,15 +109,20 @@ | | ${port} | ${node}= | Next Interface | | Check ipv4 interface counter | ${node} | ${port} | ${exp_counter_val} -| VPP can process ICMP echo request from min to 1500B packet size with 1B increment +| TC06: DUT replies to ICMPv4 Echo Reqs with size 64B-to-1500B-incr-1B +| | [Documentation] +| | ... | Make TG send ICMPv4 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 | | Ipv4 icmp echo sweep | ${nodes['TG']} | ${nodes['DUT1']} | 0 | 1452 | 1 -| VPP can process ICMP echo request from 1500B to max packet size with 10B increment +| TC07: DUT replies to ICMPv4 Echo Reqs with size 1500B-to-9000B-incr-10B +| | [Documentation] +| | ... | Make TG send ICMPv4 Echo Reqs to DUT ingress interface,\ +| | ... | incrementating frame size from 1500B to 9000B with increment +| | ... | step of 10Bytes. Make TG verify ICMPv4 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']} @@ -103,9 +133,11 @@ | | # IPv4 header and ICMP header | | ${end_size}= | Evaluate | ${mtu} - 14 - 4 - 20 - 8 | | Run Keyword If | ${mtu} > 1518 -| | ... | Ipv4 icmp echo sweep | ${nodes['TG']} | ${nodes['DUT1']} -| | ... | 1452 | ${end_size} | 10 +| | ... | Ipv4 icmp echo sweep | ${nodes['TG']} | ${nodes['DUT1']} +| | ... | 1452 | ${end_size} | 10 -| VPP responds to ARP request +| TC08: DUT replies to ARP request +| | [Documentation] +| | ... | Make TG send ARP Request to DUT and verify ARP Reply is correct.\ | | [Tags] | 3_NODE_SINGLE_LINK_TOPO | VM_ENV | | Send ARP request and validate response | ${nodes['TG']} | ${nodes['DUT1']} |