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

[vlanmgrd]: Preventing VLAN interfaces from going down when all of their member ports are down #3370

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

Conversation

mramezani95
Copy link
Contributor

@mramezani95 mramezani95 commented Nov 14, 2024

What I did
Started up the "dummy" interface that is already connected to the bridge named "Bridge" so that when all ports connected to the bridge are DOWN, the bridge interface remains UP. This ensures that when there is one VLAN interface connected to the bridge, it remains UP even when all of the VLAN's member ports are DOWN.
Since the VLAN interface is UP immediately after creation (because the "dummy" interface is UP), at least one route to the VLAN's subnet is added to the ASIC_STATE:SAI_OBJECT_TYPE_ROUTE_ENTRY table (one route if the VLAN is created in a peerless Vnet, and two routes if it is created in a VNet with one peer). Tests in tests/test_vnet.py have been updated to reflect this fact.

Why I did it
Before this change, when all member ports of a VLAN interface went down, the VLAN interface also went operationally down. This effectively disabled the advertisement of the VLAN interface's subnet IP to neighbors and prevented the IP-in-IP decapsulation feature for the VLAN interface from working properly.

How I verified it
I ran the tests submitted in PR #15244 for sonic-mgmt repo on a T0 testbed and verified that when all member ports of a VLAN are brought down, the VLAN interface remains operationally UP and BGP advertisement and IP-in-IP decapsulation features work as expected.
I also ran all tests in tests/test_vnet.py on a local DVS container after starting up the "dummy" interface and verified that all of them pass (except for test_vnet_orch_4, which is skipped).

…ed to the bridge are down, the bridge interface still remains up (and as a result, VLAN interfaces connected to the bridge also remain up).

Signed-off-by: Mahdi Ramezani <[email protected]>
@prsunny
Copy link
Collaborator

prsunny commented Nov 18, 2024

@dgsudharsan , fyi

@dgsudharsan
Copy link
Collaborator

If I understand, this Vlan interface without neighbors is used only for decapsulation purpose? Why can't we use Loopback interface?

@prsunny
Copy link
Collaborator

prsunny commented Nov 19, 2024

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@prsunny
Copy link
Collaborator

prsunny commented Nov 20, 2024

If I understand, this Vlan interface without neighbors is used only for decapsulation purpose? Why can't we use Loopback interface?

no, we use Vlan GW IP as well for decap in addition to Loopback.

dgsudharsan
dgsudharsan previously approved these changes Nov 23, 2024
prsunny and others added 3 commits November 25, 2024 17:10
…ce's subnet is added to the 'ASIC_STATE:SAI_OBJECT_TYPE_ROUTE_ENTRY' table upon creation of the VLAN interface.

Signed-off-by: Mahdi Ramezani <[email protected]>
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.

3 participants