-
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
Change tcp port range to support telemetry and gnmi #17907
Conversation
@@ -15,6 +15,7 @@ net.ipv4.conf.all.arp_announce=1 | |||
net.ipv4.conf.all.arp_filter=0 | |||
net.ipv4.conf.all.arp_notify=1 | |||
net.ipv4.conf.all.arp_ignore=2 | |||
net.ipv4.ip_local_reserved_ports=50051,50052 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here is current SONiC auto allocate port range: 32768 60999
If any other SONiC service in this range, also need add to here.
admin@vlab-01:$ sudo sysctl -a | grep ip_local_$
net.ipv4.ip_local_port_range = 32768 60999
net.ipv4.ip_local_reserved_ports =
admin@vlab-01:
* Reserve tcp port for telemetry and gnmi * Use ip_local_port_range instead * Fix sysctl config
Cherry-pick PR to 202311: #17916 |
* Reserve tcp port for telemetry and gnmi * Use ip_local_port_range instead * Fix sysctl config
Cherry-pick PR to 202305: #17923 |
* Reserve tcp port for telemetry and gnmi * Use ip_local_port_range instead * Fix sysctl config
Why I did it
A common cause of failure for the telemetry and gnmi server is port conflict. If other processes are using tcp ports 50051 and 50052, the server cannot start.
Work item tracking
How I did it
Change local port range in sysctl, new port range is from 32768 to 50001.
And then service ports for telemetry and gnmi will not be used by automatic port assignments.
https://www.kernel.org/doc/html/latest/networking/ip-sysctl.html
How to verify it
Stop telemetry and gnmi service, and create new tcp connections, and they will not use 50051 and 50052.
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)