[SmartSwitch] Added inbound traffic capability for DPU management traffic script#20635
Merged
kperumalbfn merged 5 commits intosonic-net:masterfrom Nov 21, 2024
Merged
[SmartSwitch] Added inbound traffic capability for DPU management traffic script#20635kperumalbfn merged 5 commits intosonic-net:masterfrom
kperumalbfn merged 5 commits intosonic-net:masterfrom
Conversation
Contributor
Author
|
/azpw run Azure.sonic-buildimage |
Collaborator
|
/AzurePipelines run Azure.sonic-buildimage |
vivekrnv
approved these changes
Oct 28, 2024
kperumalbfn
reviewed
Nov 6, 2024
Contributor
|
LGTM |
kperumalbfn
approved these changes
Nov 15, 2024
Contributor
|
/azpw ms_conflict -f |
Contributor
|
@StormLiangMS Could you check ms_conflict failure? |
Collaborator
|
/azpw ms_conflict |
Collaborator
|
@kperumalbfn can you please merge this PR? |
This was referenced Nov 22, 2024
VladimirKuk
pushed a commit
to Marvell-switching/sonic-buildimage
that referenced
this pull request
Jan 21, 2025
…ffic script (sonic-net#20635) [SmartSwitch] Added inbound traffic capability for DPU management traffic script
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why I did it
To add capability to control the inbound traffic for DPUs, Using the script we can now enable:
Command examples:
sonic-dpu-mgmt-traffic.sh outbound -eThis enables traffic to reach the internet from the DPUsonic-dpu-mgmt-traffic.sh outbound -dThis disables traffic to reach the internet from the DPUsonic-dpu-mgmt-traffic.sh inbound -e --dpus dpu1 --ports 9090This enables SSH traffic to the dpu1 from the internetWe can connect to the DPU using
ssh admin@<switch name/ip> -p 9090sonic-dpu-mgmt-traffic.sh inbound -e --dpus dpu1,dpu2 --ports 9090,5005This enables SSH traffic to the dpu1 and dpu2 from the internetWe can connect to dpu2 using
ssh admin@<switch name/ip> -p 5005sonic-dpu-mgmt-traffic.sh inbound -e --dpus all --ports 9090,8090,8091,5032This enables SSH traffic to all the dpus from the internet using the ports specified (in sorted order the DPUs will use the ports in the order the user specifies)We can connect to the DPU using
ssh admin@<switch name/ip> -p 5032to connect to the 4th dpu (in sorted order)sonic-dpu-mgmt-traffic.sh inbound -d --dpus dpu1 --ports 9090This disables SSH traffic to the dpu1 from the internetThe same rule which was used for enable has to be used (by replacing -e with -d)
--nofwctrlOption - If both inbound and outbound rules are enabled, if we try to disable only one of them the ipv4 enabled forwarding foreth0interface would be disabled so this option can be used in that specific case where we only need to disable either outbound or inbound traffic without affecting the other.This feature is enabled using the ip table rules, so if the rules are flushed the connection will be terminated
Work item tracking
How I did it
How to verify it
Which release branch to backport (provide reason below if selected)
Tested branch (Please provide the tested image version)
Description for the changelog
Link to config_db schema for YANG module changes
A picture of a cute animal (not mandatory but encouraged)