Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[test plan] Add test plan for subnet decap #12990

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

bingwang-ms
Copy link
Collaborator

Description of PR

Summary:
This PR is to add a test plan for a new feature Subnet decap.
HLD sonic-net/SONiC#1657
Code

Repo PR title state
sonic-swss-common [subnet_decap] Introduce subnet decap tables GitHub issue/pull request detail
sonic-swss [subnet_decap] Add subnet decap GitHub issue/pull request detail
sonic-buildimage [decap] Enable ipinip.json.j2 template to use new db schema GitHub issue/pull request detail
sonic-swss [subnet decap] Add subnet decap rule based on overlay ECMP GitHub issue/pull request detail

Type of change

  • Bug fix
  • Testbed and Framework(new/improvement)
  • Test case(new/improvement)

Back port request

  • 201911
  • 202012
  • 202205
  • 202305
  • 202311

Approach

What is the motivation for this PR?

This PR is to add a test plan for a new feature Subnet decap.

How did you do it?

N/A

How did you verify/test it?

N/A

Any platform specific information?

N/A

Supported testbed topology if it's a new test case?

N/A

Documentation

#### IPV4 positive scenario
1. Craft `IPinIP` packet with signature as below.

- Outer DIP: Any IP in `192.168.0.1/21`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be 192.168.0.0/21

#### Test steps
#### IPV4 scenario
1. Verify `STATE_DB` entries are created as expected.
2. Craft packet with below signature
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

better to validate by sending IPinIP packets with source IP not in the range 20.20.20.0/24

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why? For VIP decap we are also checking the src_ip.

### Test case 3 - Verify IPinIP packet targeting at vnet route is decapsulated (T1 only)
#### Test steps
#### IPV4 scenario
1. Configure IPv4 vnet routes with RESTAPI on DUT.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Better to be more specific on the steps:

  1. add vxlan tunnel
  2. add vnet
  3. add vxlan tunnel route

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

#### Test steps
#### IPV4 scenario
1. Configure IPv4 vnet routes with RESTAPI on DUT.
2. Verify `STATE_DB` entries are created as expected.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

STATE_DB decap term entries for the vxlan tunnel route prefix are created

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there is no testcase to cover the decap term creation/removal due to the endpoint BFD session state changes.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the bfd part is out of the scope of this test plan. We are monitoring the VNET_ROUTE table, but we didn't monitor BFD session.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Discussed offline, the code is monitoring the state of route state. The change of status of BFD session will trigger the route state change. https://github.com/sonic-net/sonic-swss/blob/98012ed411d4e83ac01dabbb6d03e4f122ad1545/orchagent/vnetorch.cpp#L2127
The code in swss need to be revised probably.

4. Verify packet is forwarded to expected VLAN port.

### Test case 2 - Verify IPinIP packet targeting at VIP is decapsulated (T0 only)
#### Test setup
Copy link
Contributor

@lolyu lolyu Jun 4, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need a separate case for dualtor as both ToRs should have decap rules generated based on the VIP.

Copy link
Contributor

@lolyu lolyu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

wangxin pushed a commit that referenced this pull request Sep 26, 2024
What is the motivation for this PR?
In Azure network, Netscan uses IP-decap to check for route blackholes, but servers do not support decapsulation, making it impossible to perform server-to-server checks. To address this, we developed the subnet decap feature to detect if the link between the server and T0 is functioning properly. Additionally, new test cases are required to ensure the functionality of subnet decap is working as expected.

How did you do it?
Add new test to verify IPinIP packet targeting at VLAN subnet is decapsulated (T0 only)
Ref test gap issue: #13120
Ref test plan: #12990

How did you verify/test it?
Test on broadcom td3 asic and KVM
arista-hpandya pushed a commit to arista-hpandya/sonic-mgmt that referenced this pull request Oct 2, 2024
What is the motivation for this PR?
In Azure network, Netscan uses IP-decap to check for route blackholes, but servers do not support decapsulation, making it impossible to perform server-to-server checks. To address this, we developed the subnet decap feature to detect if the link between the server and T0 is functioning properly. Additionally, new test cases are required to ensure the functionality of subnet decap is working as expected.

How did you do it?
Add new test to verify IPinIP packet targeting at VLAN subnet is decapsulated (T0 only)
Ref test gap issue: sonic-net#13120
Ref test plan: sonic-net#12990

How did you verify/test it?
Test on broadcom td3 asic and KVM
hdwhdw pushed a commit to hdwhdw/sonic-mgmt that referenced this pull request Oct 10, 2024
What is the motivation for this PR?
In Azure network, Netscan uses IP-decap to check for route blackholes, but servers do not support decapsulation, making it impossible to perform server-to-server checks. To address this, we developed the subnet decap feature to detect if the link between the server and T0 is functioning properly. Additionally, new test cases are required to ensure the functionality of subnet decap is working as expected.

How did you do it?
Add new test to verify IPinIP packet targeting at VLAN subnet is decapsulated (T0 only)
Ref test gap issue: sonic-net#13120
Ref test plan: sonic-net#12990

How did you verify/test it?
Test on broadcom td3 asic and KVM
vikshaw-Nokia pushed a commit to vikshaw-Nokia/sonic-mgmt that referenced this pull request Oct 23, 2024
What is the motivation for this PR?
In Azure network, Netscan uses IP-decap to check for route blackholes, but servers do not support decapsulation, making it impossible to perform server-to-server checks. To address this, we developed the subnet decap feature to detect if the link between the server and T0 is functioning properly. Additionally, new test cases are required to ensure the functionality of subnet decap is working as expected.

How did you do it?
Add new test to verify IPinIP packet targeting at VLAN subnet is decapsulated (T0 only)
Ref test gap issue: sonic-net#13120
Ref test plan: sonic-net#12990

How did you verify/test it?
Test on broadcom td3 asic and KVM
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants