From 4db0f2bdb2bd5107bbdf9f44c5b2b12216067606 Mon Sep 17 00:00:00 2001 From: Xin Wang Date: Mon, 19 Feb 2024 09:27:12 +0800 Subject: [PATCH] [add-topo] Increase server IPv6 route cache size from default 4096 to 16384 (#11680) On testbed server, the IPv6 route cache may be full. When the issue is hit, we can observe messages like below in dmesg: [2615625.047483] Route cache is full: consider increasing sysctl net.ipv[4|6].route.max_size. [2615625.967008] Route cache is full: consider increasing sysctl net.ipv[4|6].route.max_size. The impact is that static IPv6 configured on testbed server interface may stop working. Just ping the IP would get "Network is unreachable". Reason: The current SONiC testbed design needs to create many bridges on test server. Each bridge may consume some IPv6 route cache. When multiple testbeds are deployed on single server, the default route cache size 4096 may be hit. The fix is to increase IPv6 route cache size on test server from default 4096 to 16384 while deploying a testbed. Signed-off-by: Xin Wang --- ansible/roles/vm_set/tasks/main.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ansible/roles/vm_set/tasks/main.yml b/ansible/roles/vm_set/tasks/main.yml index 31add804e77..121d56caad5 100644 --- a/ansible/roles/vm_set/tasks/main.yml +++ b/ansible/roles/vm_set/tasks/main.yml @@ -168,6 +168,13 @@ sysctl_set: yes become: yes +- name: Increase IPv6 route cache size + sysctl: + name: "net.ipv6.route.max_size" + value: "16384" + sysctl_set: yes + become: yes + - name: Setup external front port include_tasks: external_port.yml when: external_port is defined