Creating a Dynamic Nat Rule

Creating a NAT Inside Source List With an Interface

 Creating a NAT Inside Source List With an Interface
POST http://<mgmt0_IP>/api/mo/sys/nat/inst.json
{
  "natInst": {
    "children": [
      {
        "natDom": {
          "attributes": {
            "name": "SampleString_123"
          },
          "children": [
            {
              "natIpNat": {
                "attributes": {
                  "xlateType": "inside-source-dynamic"
                },
                "children": [
                  {
                    "natDynamicNat": {
                      "attributes": {
                        "aclName": "SampleString_123",
                        "addRoute": "yes",
                        "dynamic": "yes",
                        "groupId": "267",
                        "interface": "eth1/2",
                        "matchInVrf": "yes",
                        "overload": "yes"
}}}]}}]}}]}}
{
    imdata:[]
}
<System>
  <nat-items>
    <inst-items>
      <dom-items>
        <Dom-list>
          <name>SampleString_123</name>
          <xlate-items>
            <IpNat-list>
              <xlateType>inside-source-dynamic</xlateType>
              <list-items>
                <DynamicNat-list>
                  <aclName>SampleString_123</aclName>
                  <addRoute>true</addRoute>
                  <dynamic>true</dynamic>
                  <groupId>267</groupId>
                  <interface>eth1/2</interface>
                  <matchInVrf>true</matchInVrf>
                  <overload>true</overload>
                </DynamicNat-list>
              </list-items>
            </IpNat-list>
          </xlate-items>
        </Dom-list>
      </dom-items>
    </inst-items>
  </nat-items>
</System>

Note: This example was added in Release 9.3(1).


CLI Commands

The CLI commands are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload. Click the YANG tab to view the XML payload.

ip nat inside source list SampleString_123 interface ethernet 1/2 vrf SampleString_123 match-in-vrf overload group 267 dynamic add-route


Verifying a DME Configuration

The following table contains the distinguished name (DN) for each managed object (MO) in the DME payload. Issue a GET request using the DN to verify the configuration was posted or to get information about the configured properties of a particular object.

MODN
natInst sys/nat/inst
natDom sys/nat/inst/dom-SampleString_123
natIpNat sys/nat/inst/dom-SampleString_123/xlate-inside-source-dynamic
natDynamicNat sys/nat/inst/dom-SampleString_123/xlate-inside-source-dynamic/list-SampleString_123


natDom Properties

The following table contains information about the natDom properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.

Property NameData TypeDescriptionValues
name
naming:Name256
string:Basic
The name of the object. RANGE: Min: "1" Max: "128"


natIpNat Properties

The following table contains information about the natIpNat properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.

Property NameData TypeDescriptionValues
xlateTypenat:InterfaceType
(scalar:Enum8)
Xlate type to define translationSELECTION:
0 - inside-source-static
1 - outside-source-static
2 - inside-source-dynamic
3 - outside-source-dynamic


natDynamicNat Properties

The following table contains information about the natDynamicNat properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.

Property NameData TypeDescriptionValues
aclNamenat:stringtype
(string:Basic)
To define ACL allowing set of addresses A sequence of characters
addRoutenat:booltype
(scalar:Bool)
Adds route for translationsSELECTION: true or false
DEFAULT: 0
dynamicnat:booltype
(scalar:Bool)
Dynamic flag for Twice-NatSELECTION: true or false
DEFAULT: 0
groupIdnat:twicenatgroup
(scalar:Uint32)
Group id for Twice-Nat
RANGE: [0 , 1024]
DEFAULT: 0
interfacenw:IfId
(base:IfIndex)
Interface name for overload caseMust match first field in the output of `show intf brief`. Example: Eth1/1 or Vlan100
matchInVrfnat:booltype
(scalar:Bool)
Match in vrf, flag used in vrf-aware NatSELECTION: true or false
DEFAULT: 0
overloadnat:booltype
(scalar:Bool)
Allows usage of same ip , with different port numbersSELECTION: true or false
DEFAULT: 0


Related Documentation

For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:

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

See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload:

https://developer.cisco.com/site/nx-os/docs/nexus-model-reference/

For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide:

https://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-programming-reference-guides-list.html

Deleting a NAT Inside Source List With an Interface

Deleting a NAT Inside Source List With an Interface
POST http://<mgmt0_IP>/api/mo/sys/nat/inst.json
{
  "natInst": {
    "children": [
      {
        "natDom": {
          "attributes": {
            "name": "SampleString_123"
          },
          "children": [
            {
              "natIpNat": {
                "attributes": {
                  "xlateType": "inside-source-dynamic"
                },
                "children": [
                  {
                    "natDynamicNat": {
                      "attributes": {
                        "aclName": "SampleString_123",
                        "status": "deleted"
}}}]}}]}}]}}
{
    imdata:[]
}
<System>
  <nat-items>
    <inst-items>
      <dom-items>
        <Dom-list>
          <name>SampleString_123</name>
          <xlate-items>
            <IpNat-list>
              <xlateType>inside-source-dynamic</xlateType>
              <list-items>
                <DynamicNat-list nc:operation="delete">
                  <aclName>SampleString_123</aclName>
                </DynamicNat-list>
              </list-items>
            </IpNat-list>
          </xlate-items>
        </Dom-list>
      </dom-items>
    </inst-items>
  </nat-items>
</System>

Note: This example was added in Release 9.3(1).


CLI Commands

The CLI commands are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload. Click the YANG tab to view the XML payload.

no ip nat inside source list SampleString_123 interface ethernet 1/2 vrf SampleString_123 match-in-vrf overload group 267 dynamic add-route


Verifying a DME Configuration

The following table contains the distinguished name (DN) for each managed object (MO) in the DME payload. Issue a GET request using the DN to verify the configuration was posted or to get information about the configured properties of a particular object.

MODN
natInst sys/nat/inst
natDom sys/nat/inst/dom-SampleString_123
natIpNat sys/nat/inst/dom-SampleString_123/xlate-inside-source-dynamic
natDynamicNat sys/nat/inst/dom-SampleString_123/xlate-inside-source-dynamic/list-SampleString_123


natDom Properties

The following table contains information about the natDom properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.

Property NameData TypeDescriptionValues
name
naming:Name256
string:Basic
The name of the object. RANGE: Min: "1" Max: "128"


natIpNat Properties

The following table contains information about the natIpNat properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.

Property NameData TypeDescriptionValues
xlateTypenat:InterfaceType
(scalar:Enum8)
Xlate type to define translationSELECTION:
0 - inside-source-static
1 - outside-source-static
2 - inside-source-dynamic
3 - outside-source-dynamic


natDynamicNat Properties

The following table contains information about the natDynamicNat properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.

Property NameData TypeDescriptionValues
aclNamenat:stringtype
(string:Basic)
To define ACL allowing set of addresses A sequence of characters
statusmo:ModificationStatus
(scalar:Bitmask32)
Modification statusSELECTION:
2 - created
4 - modified
8 - deleted
16 - replaced


Related Documentation

For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:

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

See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload:

https://developer.cisco.com/site/nx-os/docs/nexus-model-reference/

For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide:

https://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-programming-reference-guides-list.html

Creating a NAT Inside Source List With Pool

Creating a NAT Inside Source List With Pool
POST http://<mgmt0_IP>/api/mo/sys/nat/inst.json
{
  "natInst": {
    "children": [
      {
        "natDom": {
          "attributes": {
            "name": "default"
          },
          "children": [
            {
              "natIpNat": {
                "attributes": {
                  "xlateType": "inside-source-dynamic"
                },
                "children": [
                  {
                    "natDynamicNat": {
                      "attributes": {
                        "aclName": "SampleString_123",
                        "addRoute": "yes",
                        "dynamic": "yes",
                        "groupId": "267",
                        "poolName": "SampleString_123"
}}}]}}]}}]}}
{
    imdata:[]
}
<System>
  <nat-items>
    <inst-items>
      <dom-items>
        <Dom-list>
          <name>default</name>
          <xlate-items>
            <IpNat-list>
              <xlateType>inside-source-dynamic</xlateType>
              <list-items>
                <DynamicNat-list>
                  <aclName>SampleString_123</aclName>
                  <addRoute>true</addRoute>
                  <dynamic>true</dynamic>
                  <groupId>267</groupId>
                  <poolName>SampleString_123</poolName>
                </DynamicNat-list>
              </list-items>
            </IpNat-list>
          </xlate-items>
        </Dom-list>
      </dom-items>
    </inst-items>
  </nat-items>
</System>

Note: This example was added in Release 9.3(1).


CLI Commands

The CLI commands are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload. Click the YANG tab to view the XML payload.

ip nat inside source list SampleString_123 pool SampleString_123 group 267 dynamic add-route


Verifying a DME Configuration

The following table contains the distinguished name (DN) for each managed object (MO) in the DME payload. Issue a GET request using the DN to verify the configuration was posted or to get information about the configured properties of a particular object.

MODN
natInst sys/nat/inst
natDom sys/nat/inst/dom-default
natIpNat sys/nat/inst/dom-default/xlate-inside-source-dynamic
natDynamicNat sys/nat/inst/dom-default/xlate-inside-source-dynamic/list-SampleString_123


natDom Properties

The following table contains information about the natDom properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.

Property NameData TypeDescriptionValues
name
naming:Name256
string:Basic
The name of the object. RANGE: Min: "1" Max: "128"


natIpNat Properties

The following table contains information about the natIpNat properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.

Property NameData TypeDescriptionValues
xlateTypenat:InterfaceType
(scalar:Enum8)
Xlate type to define translationSELECTION:
0 - inside-source-static
1 - outside-source-static
2 - inside-source-dynamic
3 - outside-source-dynamic


natDynamicNat Properties

The following table contains information about the natDynamicNat properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.

Property NameData TypeDescriptionValues
aclNamenat:stringtype
(string:Basic)
To define ACL allowing set of addresses A sequence of characters
addRoutenat:booltype
(scalar:Bool)
Adds route for translationsSELECTION: true or false
DEFAULT: 0
dynamicnat:booltype
(scalar:Bool)
Dynamic flag for Twice-NatSELECTION: true or false
DEFAULT: 0
groupIdnat:twicenatgroup
(scalar:Uint32)
Group id for Twice-Nat
RANGE: [0 , 1024]
DEFAULT: 0
poolNamenat:NatPoolname
(string:Basic)
Defines set of address-range
MAX SIZE: 63


Related Documentation

For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:

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

See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload:

https://developer.cisco.com/site/nx-os/docs/nexus-model-reference/

For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide:

https://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-programming-reference-guides-list.html

Deleting a NAT Inside Source List With Pool

Deleting a NAT Inside Source List With Pool
POST http://<mgmt0_IP>/api/mo/sys/nat/inst.json
{
  "natInst": {
    "children": [
      {
        "natDom": {
          "attributes": {
            "name": "default"
          },
          "children": [
            {
              "natIpNat": {
                "attributes": {
                  "xlateType": "inside-source-dynamic"
                },
                "children": [
                  {
                    "natDynamicNat": {
                      "attributes": {
                        "aclName": "SampleString_123",
                        "status": "deleted"
}}}]}}]}}]}}
{
    imdata:[]
}
<System>
  <nat-items>
    <inst-items>
      <dom-items>
        <Dom-list>
          <name>default</name>
          <xlate-items>
            <IpNat-list>
              <xlateType>inside-source-dynamic</xlateType>
              <list-items>
                <DynamicNat-list nc:operation="delete">
                  <aclName>SampleString_123</aclName>
                </DynamicNat-list>
              </list-items>
            </IpNat-list>
          </xlate-items>
        </Dom-list>
      </dom-items>
    </inst-items>
  </nat-items>
</System>

Note: This example was added in Release 9.3(1).


CLI Commands

The CLI commands are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload. Click the YANG tab to view the XML payload.

no ip nat inside source list SampleString_123 pool SampleString_123 group 267 dynamic add-route


Verifying a DME Configuration

The following table contains the distinguished name (DN) for each managed object (MO) in the DME payload. Issue a GET request using the DN to verify the configuration was posted or to get information about the configured properties of a particular object.

MODN
natInst sys/nat/inst
natDom sys/nat/inst/dom-default
natIpNat sys/nat/inst/dom-default/xlate-inside-source-dynamic
natDynamicNat sys/nat/inst/dom-default/xlate-inside-source-dynamic/list-SampleString_123


natDom Properties

The following table contains information about the natDom properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.

Property NameData TypeDescriptionValues
name
naming:Name256
string:Basic
The name of the object. RANGE: Min: "1" Max: "128"


natIpNat Properties

The following table contains information about the natIpNat properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.

Property NameData TypeDescriptionValues
xlateTypenat:InterfaceType
(scalar:Enum8)
Xlate type to define translationSELECTION:
0 - inside-source-static
1 - outside-source-static
2 - inside-source-dynamic
3 - outside-source-dynamic


natDynamicNat Properties

The following table contains information about the natDynamicNat properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.

Property NameData TypeDescriptionValues
aclNamenat:stringtype
(string:Basic)
To define ACL allowing set of addresses A sequence of characters
statusmo:ModificationStatus
(scalar:Bitmask32)
Modification statusSELECTION:
2 - created
4 - modified
8 - deleted
16 - replaced


Related Documentation

For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:

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

See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload:

https://developer.cisco.com/site/nx-os/docs/nexus-model-reference/

For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide:

https://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-programming-reference-guides-list.html

Overloading an Address Translation

Overloading an Address Translation
POST http://<mgmt0_IP>/api/mo/sys/nat/inst.json
{
  "natInst": {
    "children": [
      {
        "natDom": {
          "attributes": {
            "name": "default"
          },
          "children": [
            {
              "natIpNat": {
                "attributes": {
                  "xlateType": "inside-source-dynamic"
                },
                "children": [
                  {
                    "natDynamicNat": {
                      "attributes": {
                        "aclName": "SampleString_123",
                        "addRoute": "yes",
                        "dynamic": "yes",
                        "groupId": "267",
                        "overload": "yes",
                        "poolName": "SampleString_123"
}}}]}}]}}]}}
{
    imdata:[]
}
<System>
  <nat-items>
    <inst-items>
      <dom-items>
        <Dom-list>
          <name>default</name>
          <xlate-items>
            <IpNat-list>
              <xlateType>inside-source-dynamic</xlateType>
              <list-items>
                <DynamicNat-list>
                  <aclName>SampleString_123</aclName>
                  <addRoute>true</addRoute>
                  <dynamic>true</dynamic>
                  <groupId>267</groupId>
                  <overload>true</overload>
                  <poolName>SampleString_123</poolName>
                </DynamicNat-list>
              </list-items>
            </IpNat-list>
          </xlate-items>
        </Dom-list>
      </dom-items>
    </inst-items>
  </nat-items>
</System>

Note: This example was added in Release 9.3(1).


CLI Commands

The CLI commands are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload. Click the YANG tab to view the XML payload.

ip nat inside source list SampleString_123 pool SampleString_123 overload group 267 dynamic add-route


Verifying a DME Configuration

The following table contains the distinguished name (DN) for each managed object (MO) in the DME payload. Issue a GET request using the DN to verify the configuration was posted or to get information about the configured properties of a particular object.

MODN
natInst sys/nat/inst
natDom sys/nat/inst/dom-default
natIpNat sys/nat/inst/dom-default/xlate-inside-source-dynamic
natDynamicNat sys/nat/inst/dom-default/xlate-inside-source-dynamic/list-SampleString_123


natDom Properties

The following table contains information about the natDom properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.

Property NameData TypeDescriptionValues
name
naming:Name256
string:Basic
The name of the object. RANGE: Min: "1" Max: "128"


natIpNat Properties

The following table contains information about the natIpNat properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.

Property NameData TypeDescriptionValues
xlateTypenat:InterfaceType
(scalar:Enum8)
Xlate type to define translationSELECTION:
0 - inside-source-static
1 - outside-source-static
2 - inside-source-dynamic
3 - outside-source-dynamic


natDynamicNat Properties

The following table contains information about the natDynamicNat properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.

Property NameData TypeDescriptionValues
aclNamenat:stringtype
(string:Basic)
To define ACL allowing set of addresses A sequence of characters
addRoutenat:booltype
(scalar:Bool)
Adds route for translationsSELECTION: true or false
DEFAULT: 0
dynamicnat:booltype
(scalar:Bool)
Dynamic flag for Twice-NatSELECTION: true or false
DEFAULT: 0
groupIdnat:twicenatgroup
(scalar:Uint32)
Group id for Twice-Nat
RANGE: [0 , 1024]
DEFAULT: 0
overloadnat:booltype
(scalar:Bool)
Allows usage of same ip , with different port numbersSELECTION: true or false
DEFAULT: 0
poolNamenat:NatPoolname
(string:Basic)
Defines set of address-range
MAX SIZE: 63


Related Documentation

For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:

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

See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload:

https://developer.cisco.com/site/nx-os/docs/nexus-model-reference/

For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide:

https://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-programming-reference-guides-list.html

Deleting an Overloaded Address Translation

Overloading an Overloaded Address Translation
POST http://<mgmt0_IP>/api/mo/sys/nat/inst.json
{
  "natInst": {
    "children": [
      {
        "natDom": {
          "attributes": {
            "name": "default"
          },
          "children": [
            {
              "natIpNat": {
                "attributes": {
                  "xlateType": "inside-source-dynamic"
                },
                "children": [
                  {
                    "natDynamicNat": {
                      "attributes": {
                        "aclName": "SampleString_123",
                        "status": "deleted"
}}}]}}]}}]}}
{
    imdata:[]
}
<System>
  <nat-items>
    <inst-items>
      <dom-items>
        <Dom-list>
          <name>default</name>
          <xlate-items>
            <IpNat-list>
              <xlateType>inside-source-dynamic</xlateType>
              <list-items>
                <DynamicNat-list nc:operation="delete">
                  <aclName>SampleString_123</aclName>
                </DynamicNat-list>
              </list-items>
            </IpNat-list>
          </xlate-items>
        </Dom-list>
      </dom-items>
    </inst-items>
  </nat-items>
</System>

Note: This example was added in Release 9.3(1).


CLI Commands

The CLI commands are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload. Click the YANG tab to view the XML payload.

no ip nat inside source list SampleString_123 pool SampleString_123 overload group 267 dynamic add-route


Verifying a DME Configuration

The following table contains the distinguished name (DN) for each managed object (MO) in the DME payload. Issue a GET request using the DN to verify the configuration was posted or to get information about the configured properties of a particular object.

MODN
natInst sys/nat/inst
natDom sys/nat/inst/dom-default
natIpNat sys/nat/inst/dom-default/xlate-inside-source-dynamic
natDynamicNat sys/nat/inst/dom-default/xlate-inside-source-dynamic/list-SampleString_123


natDom Properties

The following table contains information about the natDom properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.

Property NameData TypeDescriptionValues
name
naming:Name256
string:Basic
The name of the object. RANGE: Min: "1" Max: "128"


natIpNat Properties

The following table contains information about the natIpNat properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.

Property NameData TypeDescriptionValues
xlateTypenat:InterfaceType
(scalar:Enum8)
Xlate type to define translationSELECTION:
0 - inside-source-static
1 - outside-source-static
2 - inside-source-dynamic
3 - outside-source-dynamic


natDynamicNat Properties

The following table contains information about the natDynamicNat properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.

Property NameData TypeDescriptionValues
aclNamenat:stringtype
(string:Basic)
To define ACL allowing set of addresses A sequence of characters
statusmo:ModificationStatus
(scalar:Bitmask32)
Modification statusSELECTION:
2 - created
4 - modified
8 - deleted
16 - replaced


Related Documentation

For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:

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

See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload:

https://developer.cisco.com/site/nx-os/docs/nexus-model-reference/

For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide:

https://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-programming-reference-guides-list.html