sonic-net / sonic-buildimage

Scripts which perform an installable binary image build for SONiC
Other
746 stars 1.44k forks source link

[NAT] Feature is not supported for Nvidia Mellanox SN4600C Spectrum 3 NAT Capable Switch #17389

Open usiegl00 opened 1 year ago

usiegl00 commented 1 year ago

Description

Nvidia Mellanox SN4600C Spectrum 3 Switch /var/log/syslog:

swss#orchagent: :- main: Failed to get the SNAT available entry count, rv:-196608
syncd#SDK: [SAI_UTILS.WARNING] mlnx_sai_utils.c[1685]- check_attribs_metadata: Not implemented attribute SAI_SWITCH_ATTR_AVAILABLE_SNAT_ENTRY (vendor data not found)
swss#orchagent: :- NatOrch: Failed to get the SNAT available entry count, rv:-196608
swss#orchagent: :- enableNatFeature: NAT Feature is not supported in this Platform

According to the Spectrum 3 documentation, it supports Network Address Translation (NAT).

Steps to reproduce the issue:

  1. sudo config nat feature enable
  2. sudo config nat add static basic -nat_type snat 192.168.0.1 192.168.1.1
  3. sudo sonic-db-cli COUNTERS_DB hgetall "COUNTERS_GLOBAL_NAT:Values"

Describe the results you received:

1. 
2. Max limit is reached for NAT entries, skipping adding the entry.
3. {'MAX_NAT_ENTRIES': '0', 'TIMEOUT': '600', 'UDP_TIMEOUT': '300', 'TCP_TIMEOUT': '86400'}

Describe the results you expected:

1. 
2. Static Nat Entry Added.
3. {'MAX_NAT_ENTRIES': '4096', 'TIMEOUT': '600', 'UDP_TIMEOUT': '300', 'TCP_TIMEOUT': '86400'}

Output of show version:

SONiC Software Version: SONiC.202305.424329-3c0c0aa39
SONiC OS Version: 11
Distribution: Debian 11.8
Kernel: 5.10.0-23-2-amd64
Build commit: 3c0c0aa39
Build date: Sat Dec  2 12:55:35 UTC 2023
Built by: AzDevOps@vmss-soni002KOV

Platform: x86_64-mlnx_msn4600c-r0
HwSKU: ACS-MSN4600C
ASIC: mellanox
ASIC Count: 1
Serial Number: MT2121X00036
Model Number: MSN4600-CS2ROS
Hardware Revision: A1
Uptime: 08:06:22 up 7 min,  1 user,  load average: 0.15, 0.25, 0.17
Date: Sun 03 Dec 2023 08:06:22 AM

Docker images:
REPOSITORY                    TAG                       IMAGE ID       SIZE
docker-syncd-mlnx             202305.424329-3c0c0aa39   7f3a7e9c9510   837MB
docker-syncd-mlnx             latest                    7f3a7e9c9510   837MB
docker-orchagent              202305.424329-3c0c0aa39   8657f4f9c4d3   330MB
docker-orchagent              latest                    8657f4f9c4d3   330MB
docker-fpm-frr                202305.424329-3c0c0aa39   617fda3041d9   349MB
docker-fpm-frr                latest                    617fda3041d9   349MB
docker-nat                    202305.424329-3c0c0aa39   fa5ea00b82c6   321MB
docker-nat                    latest                    fa5ea00b82c6   321MB
docker-sflow                  202305.424329-3c0c0aa39   a6a84778ce9f   319MB
docker-sflow                  latest                    a6a84778ce9f   319MB
docker-teamd                  202305.424329-3c0c0aa39   bcd69dfbc55c   318MB
docker-teamd                  latest                    bcd69dfbc55c   318MB
docker-macsec                 latest                    790fb228156a   320MB
docker-platform-monitor       202305.424329-3c0c0aa39   07e86827257c   828MB
docker-platform-monitor       latest                    07e86827257c   828MB
docker-dhcp-relay             latest                    8dfb1071f54c   308MB
docker-eventd                 202305.424329-3c0c0aa39   16818d307aef   300MB
docker-eventd                 latest                    16818d307aef   300MB
docker-sonic-telemetry        202305.424329-3c0c0aa39   ef5dfee858f2   387MB
docker-sonic-telemetry        latest                    ef5dfee858f2   387MB
docker-snmp                   202305.424329-3c0c0aa39   70812b780e35   339MB
docker-snmp                   latest                    70812b780e35   339MB
docker-lldp                   202305.424329-3c0c0aa39   4394156ba049   343MB
docker-lldp                   latest                    4394156ba049   343MB
docker-mux                    202305.424329-3c0c0aa39   e70d001015ed   349MB
docker-mux                    latest                    e70d001015ed   349MB
docker-database               202305.424329-3c0c0aa39   8d5ff50d7763   300MB
docker-database               latest                    8d5ff50d7763   300MB
docker-router-advertiser      202305.424329-3c0c0aa39   2dab19adced9   300MB
docker-router-advertiser      latest                    2dab19adced9   300MB
docker-sonic-mgmt-framework   202305.424329-3c0c0aa39   2a073a5a36f3   414MB
docker-sonic-mgmt-framework   latest                    2a073a5a36f3   414MB

Output of show techsupport:

sonic_dump_sonic_20231203_080733.tar.gz

prgeor commented 12 months ago

@adyeung could you check if BRCM would be interested in maintaining NAT feature and fix this CLI

adyeung commented 12 months ago

@dgsudharsan since Spectrum 3 doc claims support for NAT, pls work the SAI team to implement SAI_SWITCH_ATTR_AVAILABLE_SNAT_ENTRY and SAI_SWITCH_ATTR_AVAILABLE_DNAT_ENTRY