-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
[SmartSwitch] Added inbound traffic capability for DPU management traffic script #20635
Open
gpunathilell
wants to merge
5
commits into
sonic-net:master
Choose a base branch
from
gpunathilell:dpu_mgmt_inb
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains 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
/azpw run Azure.sonic-buildimage |
/AzurePipelines run Azure.sonic-buildimage |
vivekrnv
approved these changes
Oct 28, 2024
kperumalbfn
reviewed
Nov 6, 2024
LGTM |
kperumalbfn
approved these changes
Nov 15, 2024
/azpw ms_conflict -f |
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 -e
This enables traffic to reach the internet from the DPUsonic-dpu-mgmt-traffic.sh outbound -d
This disables traffic to reach the internet from the DPUsonic-dpu-mgmt-traffic.sh inbound -e --dpus dpu1 --ports 9090
This enables SSH traffic to the dpu1 from the internetWe can connect to the DPU using
ssh admin@<switch name/ip> -p 9090
sonic-dpu-mgmt-traffic.sh inbound -e --dpus dpu1,dpu2 --ports 9090,5005
This enables SSH traffic to the dpu1 and dpu2 from the internetWe can connect to dpu2 using
ssh admin@<switch name/ip> -p 5005
sonic-dpu-mgmt-traffic.sh inbound -e --dpus all --ports 9090,8090,8091,5032
This 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 5032
to connect to the 4th dpu (in sorted order)sonic-dpu-mgmt-traffic.sh inbound -d --dpus dpu1 --ports 9090
This 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)
--nofwctrl
Option - If both inbound and outbound rules are enabled, if we try to disable only one of them the ipv4 enabled forwarding foreth0
interface 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)