From 3d4cac1936aea0f9b6e65619332daab3670241ff Mon Sep 17 00:00:00 2001 From: ganglyu Date: Fri, 26 Jan 2024 10:37:37 +0800 Subject: [PATCH 1/3] Reserve tcp port for telemetry and gnmi --- files/image_config/sysctl/sysctl-net.conf | 1 + 1 file changed, 1 insertion(+) diff --git a/files/image_config/sysctl/sysctl-net.conf b/files/image_config/sysctl/sysctl-net.conf index 3e7c0811200a..44531fef9e64 100644 --- a/files/image_config/sysctl/sysctl-net.conf +++ b/files/image_config/sysctl/sysctl-net.conf @@ -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 net.ipv4.neigh.default.base_reachable_time_ms=1800000 net.ipv6.neigh.default.base_reachable_time_ms=1800000 net.ipv4.neigh.default.gc_thresh1=1024 From 84171221bb949f1bbc2d9c058edaceddc843de8b Mon Sep 17 00:00:00 2001 From: ganglyu Date: Fri, 26 Jan 2024 13:27:01 +0800 Subject: [PATCH 2/3] Use ip_local_port_range instead --- files/image_config/sysctl/sysctl-net.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/image_config/sysctl/sysctl-net.conf b/files/image_config/sysctl/sysctl-net.conf index 44531fef9e64..e9fb368b6f77 100644 --- a/files/image_config/sysctl/sysctl-net.conf +++ b/files/image_config/sysctl/sysctl-net.conf @@ -15,7 +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 +net.ipv4.ip_local_port_range=32768 50001 net.ipv4.neigh.default.base_reachable_time_ms=1800000 net.ipv6.neigh.default.base_reachable_time_ms=1800000 net.ipv4.neigh.default.gc_thresh1=1024 From 5256c8e8d0cf3a36957969a82f53c7eef5b19720 Mon Sep 17 00:00:00 2001 From: ganglyu Date: Fri, 26 Jan 2024 15:22:31 +0800 Subject: [PATCH 3/3] Fix sysctl config --- files/image_config/sysctl/sysctl-net.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/image_config/sysctl/sysctl-net.conf b/files/image_config/sysctl/sysctl-net.conf index e9fb368b6f77..7946d2c8685f 100644 --- a/files/image_config/sysctl/sysctl-net.conf +++ b/files/image_config/sysctl/sysctl-net.conf @@ -15,7 +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_port_range=32768 50001 +net.ipv4.ip_local_port_range="32768 50001" net.ipv4.neigh.default.base_reachable_time_ms=1800000 net.ipv6.neigh.default.base_reachable_time_ms=1800000 net.ipv4.neigh.default.gc_thresh1=1024