show platform afm info tcam 0 nat-stats

show platform afm info tcam 0 nat-stats

import json

"""
Modify these please
"""
url='http://<IP_Address>/ins'
switchuser='<User_ID>'
switchpassword='<Password>'

myheaders={'content-type':'application/json'}
payload={
  "ins_api":{
  "version": "1.0",
  "type": "cli_show",
  "chunk": "0",
  "sid": "1",
  "input": "show platform afm info tcam 0 nat-stats",
  "output_format": "json"
}

response = requests.post(url,data=json.dumps(payload), headers=myheaders,auth=(switchuser,switchpassword)).json()
output = json.dumps(response, indent=4, sort_keys=True)


{

    "ins_api": {
        "outputs": {
            "output": {
                "body": {
                    "TABLE_natentry": {
                        "ROW_natentry": {
                            "entry_idx": "0", 
                            "ipv4_da": "0.0.0.0", 
                            "ipv4_dport": "0", 
                            "ipv4_sa": "0.0.0.0", 
                            "ipv4_sport": "0", 
                            "stats": "0", 
                            "stats_idx": "0"
                        }
                    }
                }, 
                "code": "200", 
                "input": "show platform afm info tcam 0 nat-stats", 
                "msg": "Success"
            }
        }, 
        "sid": "eoc", 
        "type": "cli_show", 
        "version": "1.0"
    }
}

The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show platform afm info tcam 0 nat-stats command, see the CLI command reference:

http//www.cisco.com/c/en/us/support/switches/nexus-3000-series-switches/products-command-reference-list.html

Note: This example was added in Cisco NX-OS Release 6.0(2)A8(9).

CLI Output
Switch# show platform afm info tcam 0 nat-stats

Idx[0] ipv4_sa=000.000.000.000 ipv4_da=000.000.000.000 sport=0 dport=0 stats_id 0 stats 0

show platform afm info tcam 0 region nat

show platform afm info tcam 0 region nat

import json

"""
Modify these please
"""
url='http://<IP_Address>/ins'
switchuser='<User_ID>'
switchpassword='<Password>'

myheaders={'content-type':'application/json'}
payload={
  "ins_api":{
  "version": "1.0",
  "type": "cli_show",
  "chunk": "0",
  "sid": "1",
  "input": "show platform afm info tcam 0 region nat ",
  "output_format": "json"
}

response = requests.post(url,data=json.dumps(payload), headers=myheaders,auth=(switchuser,switchpassword)).json()
output = json.dumps(response, indent=4, sort_keys=True)


{

    "ins_api": {
        "outputs": {
            "output": {
                "body": {
                    "TABLE_nat": {
                        "ROW_nat": {
                            "end": "687", 
                            "size": "512", 
                            "start": "176", 
                            "tcam_type": "nat tcam", 
                            "valid": "1"
                        }
                    }, 
                    "TABLE_tcam_region": {
                        "ROW_tcam_region": [
                            {
                                "range_high": "63", 
                                "range_low": "0", 
                                "tcam_name": "sup tcam"
                            }, 
                            {
                                "range_high": "159", 
                                "range_low": "144", 
                                "tcam_name": "vacl tcam"
                            }, 
                            {
                                "range_high": "143", 
                                "range_low": "128", 
                                "tcam_name": "ifacl tcam"
                            }, 
                            {
                                "range_high": "2175", 
                                "range_low": "2048", 
                                "tcam_name": "qos tcam"
                            }, 
                            {
                                "range_high": "0", 
                                "range_low": "0", 
                                "tcam_name": "rbacl tcam"
                            }, 
                            {
                                "range_high": "0", 
                                "range_low": "0", 
                                "tcam_name": "span tcam"
                            }, 
                            {
                                "range_high": "1791", 
                                "range_low": "688", 
                                "tcam_name": "racl tcam"
                            }, 
                            {
                                "range_high": "2047", 
                                "range_low": "1792", 
                                "tcam_name": "e-racl tcam"
                            }, 
                            {
                                "range_high": "175", 
                                "range_low": "160", 
                                "tcam_name": "e-vacl tcam"
                            }, 
                            {
                                "range_high": "0", 
                                "range_low": "0", 
                                "tcam_name": "qoslbl tcam"
                            }, 
                            {
                                "range_high": "0", 
                                "range_low": "0", 
                                "tcam_name": "ipsg tcam"
                            }, 
                            {
                                "range_high": "0", 
                                "range_low": "0", 
                                "tcam_name": "arpacl tcam"
                            }, 
                            {
                                "range_high": "0", 
                                "range_low": "0", 
                                "tcam_name": "ipv6-racl tcam"
                            }, 
                            {
                                "range_high": "0", 
                                "range_low": "0", 
                                "tcam_name": "ipv6-e-racl tcam"
                            }, 
                            {
                                "range_high": "0", 
                                "range_low": "0", 
                                "tcam_name": "ipv6-sup tcam"
                            }, 
                            {
                                "range_high": "0", 
                                "range_low": "0", 
                                "tcam_name": "ipv6-qos tcam"
                            }, 
                            {
                                "range_high": "687", 
                                "range_low": "176", 
                                "tcam_name": "nat tcam"
                            }, 
                            {
                                "range_high": "2303", 
                                "range_low": "2176", 
                                "tcam_name": "e-qos tcam"
                            }, 
                            {
                                "range_high": "0", 
                                "range_low": "0", 
                                "tcam_name": "pbr tcam"
                            }, 
                            {
                                "range_high": "0", 
                                "range_low": "0", 
                                "tcam_name": "ipv6-pbr tcam"
                            }, 
                            {
                                "range_high": "127", 
                                "range_low": "64", 
                                "tcam_name": "copp tcam"
                            }
                        ]
                    }, 
                    "asic_id": "0", 
                    "in_use_entry": "10", 
                    "range_bmp": "678-687"
                }, 
                "code": "200", 
                "input": "show platform afm info tcam 0 region nat ", 
                "msg": "Success"
            }
        }, 
        "sid": "eoc", 
        "type": "cli_show", 
        "version": "1.0"
    }
}

The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show platform afm info tcam 0 region nat command, see the CLI command reference:

http//www.cisco.com/c/en/us/support/switches/nexus-3000-series-switches/products-command-reference-list.html

Note: This example was added in Cisco NX-OS Release 6.0(2)A8(9).

CLI Output
Switch# show platform afm info tcam 0 region nat 
nat TCAM configuration for asic id 0:
[        sup tcam]: range     0 -   63
[ vacl tcam]: range 144 - 159
[ ifacl tcam]: range 128 - 143
[ qos tcam]: range 2048 - 2175
[ rbacl tcam]: range 0 - 0
[ span tcam]: range 0 - 0
[ racl tcam]: range 688 - 1791
[ e-racl tcam]: range 1792 - 2047
[ e-vacl tcam]: range 160 - 175
[ qoslbl tcam]: range 0 - 0
[ ipsg tcam]: range 0 - 0
[ arpacl tcam]: range 0 - 0
[ ipv6-racl tcam]: range 0 - 0
[ipv6-e-racl tcam]: range 0 - 0
[ ipv6-sup tcam]: range 0 - 0
[ ipv6-qos tcam]: range 0 - 0
[ nat tcam]: range 176 - 687 * [ e-qos tcam]: range 2176 - 2303
[ pbr tcam]: range 0 - 0
[ ipv6-pbr tcam]: range 0 - 0
[ copp tcam]: range 64 - 127
TCAM [nat tcam]: [v:1, size:512, start:176 end:687] In use tcam entries: 10 678-687 Link Local Entries: