-
Notifications
You must be signed in to change notification settings - Fork 1.2k
IPv4 Decapsulation test
Related documents
N/A
##Overview
This test case is aimed at testing the DUTs ability to do de-capsulation of IP encapsulated packets, and verify that each decapsulated packet is with the right properties in each field, and forward with the corresponding underlay destination IP to the correct route. The test assumes all routes and decapsulation are set prior by to test, so no configuration is required to be done by the test itself, and the test will correspond only to the right IPs that is configured in the test.
The validation to the routes and the decapsulation is done by sending packets with the corresponding IPs both, in the overlay and underlay. If the test fails, it is the test responsibility to provide all the debug information which can be retrieved in order to shade more light to the failure for offline debugging as much as possible.
The scope if this test plan is only the PTF test.
The Setup will be configured to have IPv4 routes and decapsulation commands
No CLI commands will be needed for this test.
No DUT configuration test files are needed on the test switch.
The test is targeting a running SONIC system with fully functioning configuration. The purpose of the test is not to test specific SAI API, but functional testing of routes, making sure that routes pre-configured on SONIC start-up function properly.
The setup tests assume to have single SONiC (DUT) connected to a switch connected to a server running 32 Arista VMs.
There will be 32 BGP peers connected to the switch. Each peer will have 2 BGP sessions open with the switch: single IPV4 connection and single IPV6 connection. The peers will advertise routes that switch needs to become aware of.
PTF host needs to be connected to a port through which it will send packets to the switch and needs to have a connection via ports through which the switch will send forward received packet back to the host for validation.
The peers and SONIC (DUT) will be deployed by an Ansible script. As part of the deployment, the script will generate the routes and decapsulation commands.
The test assumes there is a mechanism to validate logs on the DUT where we should be able to analyze /var/log/syslog for error and warning messages related to the current test. In case such messages are detected, the test is considered failed.
The test should have standardized summary section in the following format:
TEST SUMMARY:
TEST: OK/FAIL
LOGS: OK/FAIL
The objective is to validate decapsulation ability and each route has been added to the switch and is functioning properly with the decapsulated packet.
- IP decap IPv4: 1.1.1.1
- IP Route IPv4: 2.2.2.0/32 -> dst_port
- From the PTF docker, craft and sent through the source port a double encapsulated IP packet as follows:
outer IP header [S:2.2.2.0,D:1.1.1.1]inner IP header [S:1.1.1.1,D:2.2.2.0]ECN and DSCP will be randomized, for the overlay and the underlay.all other fields will be PTF default
-
Verify the Sonic does not see the encapsulated packet. the IP-in-IP packet should not go to CPU, the packet should not be seen on the DUT.
-
Confirm that the packet that comes back to PTF Docker decapsulated from the destination port. and the L3 header fields will look like this :
IP header [S:1.1.1.1,D:2.2.2.0]TTL = TTL_outer - 1ECN = ECN_outerDSCP = DSCP_outer
The objective is to validate decapsulation ability and each route has been added to the switch and is functioning properly with the decapsulated packet with different fields from case 1.
- IP decap IPv4: 3.3.3.3
- IP Route IPv4: 2.2.2.0/32 -> dst_port
####Test description
- From the PTF docker, craft and sent through the source port a double encapsulated IP packet as follows:
outer IP header [S:2.2.2.0,D:3.3.3.3]inner IP header [S:3.3.3.3,D:2.2.2.0]ECN and DSCP will be randomized, for the overlay and the underlay.ECN_outer != ECN_innerDSCP_outer != DSCP_innerTTL_outer != TTL_innerall other fields will be PTF default for simple_tcp_packet function
-
Verify the Sonic does not see the encapsulated packet. the IP-in-IP packet should not go to CPU, the packet should not be seen on the DUT.
-
Confirm that the packet that comes back to PTF Docker decapsulated from the destination port. and the L3 header fields will look like this :
IP header [S:3.3.3.3,D:2.2.2.0]TTL = TTL_outer - 1ECN = ECN_outerDSCP = DSCP_outer
####Test objective
The objective is to validate decapsulation ability with triple encapsulated packet and each route has been added to the switch and is functioning properly with the decapsulated packet.
- IP decap IPv4: 1.1.1.1
- IP Route IPv4: 2.2.2.0/32 -> dst_port
####Test description
- From the PTF docker, craft a triple encapsulated IP packet as follows: Repeat steps 1 through 3 with a triple IP encapsulated packet, like this:
outer IP header [S:2.2.2.0,D:1.1.1.1]inner1 IP header [S:1.1.1.1,D:2.2.2.0]inner2 IP header [S:4.4.4.4,D:4.4.4.3]ECN and DSCP will be randomized, for the overlay and the underlay.ECN_outer != ECN_inner1DSCP_outer != DSCP_inner1TTL_outer != TTL_inner1all other fields will be PTF default for simple_tcp_packet function
-
Verify the Sonic does not see the encapsulated packet. the IP-in-IP packet should not go to CPU, the packet should not be seen on the DUT.
-
Confirm that the packet that comes back to PTF Docker decapsulated from the destination port. and the L3 header fields will look like this :
outer IP headers
IPs [S:1.1.1.1,D:2.2.2.0]TTL = TTL_outer - 1ECN = ECN_outerDSCP = DSCP_outer
inner IP headers
IPs [S:4.4.4.4,D:4.4.4.3]TTL = TTL_inner2ECN = ECN_inner2DSCP = DSCP_inner2
-
For Users
-
For Developers
-
Subgroups/Working Groups
-
Presentations
-
Join Us