Configuring an Outside Source List
Configuring a NAT Outside Source List With Pool
Configuring a NAT Outside Source List With Pool
POST http://<mgmt0_IP>/api/mo/sys/nat/inst.json
{
"natInst": {
"children": [
{
"natDom": {
"attributes": {
"name": "default"
},
"children": [
{
"natIpNat": {
"attributes": {
"xlateType": "outside-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>outside-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 outside 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.
MO | DN |
---|---|
natInst | sys/nat/inst |
natDom | sys/nat/inst/dom-default |
natIpNat | sys/nat/inst/dom-default/xlate-outside-source-dynamic |
natDynamicNat | sys/nat/inst/dom-default/xlate-outside-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 Name | Data Type | Description | Values |
---|---|---|---|
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 Name | Data Type | Description | Values |
---|---|---|---|
xlateType | nat:InterfaceType (scalar:Enum8) | Xlate type to define translation | SELECTION: 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 Name | Data Type | Description | Values |
---|---|---|---|
aclName | nat:stringtype (string:Basic) | To define ACL allowing set of addresses | A sequence of characters |
addRoute | nat:booltype (scalar:Bool) | Adds route for translations | SELECTION: true or false DEFAULT: 0 |
dynamic | nat:booltype (scalar:Bool) | Dynamic flag for Twice-Nat | SELECTION: true or false DEFAULT: 0 |
groupId | nat:twicenatgroup (scalar:Uint32) | Group id for Twice-Nat | RANGE: [0 , 1024] DEFAULT: 0 |
poolName | nat: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:
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:
Deleting a NAT Outside Source List With Pool
Deleting a NAT Outside Source List With Pool
POST http://<mgmt0_IP>/api/mo/sys/nat/inst.json
{
"natInst": {
"children": [
{
"natDom": {
"attributes": {
"name": "default"
},
"children": [
{
"natIpNat": {
"attributes": {
"xlateType": "outside-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>outside-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 outside 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.
MO | DN |
---|---|
natInst | sys/nat/inst |
natDom | sys/nat/inst/dom-default |
natIpNat | sys/nat/inst/dom-default/xlate-outside-source-dynamic |
natDynamicNat | sys/nat/inst/dom-default/xlate-outside-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 Name | Data Type | Description | Values |
---|---|---|---|
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 Name | Data Type | Description | Values |
---|---|---|---|
xlateType | nat:InterfaceType (scalar:Enum8) | Xlate type to define translation | SELECTION: 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 Name | Data Type | Description | Values |
---|---|---|---|
aclName | nat:stringtype (string:Basic) | To define ACL allowing set of addresses | A sequence of characters |
status | mo:ModificationStatus (scalar:Bitmask32) | Modification status | SELECTION: 2 - created 4 - modified 8 - deleted 16 - replaced |
Related Documentation
For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:
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: