Configuring Netstack

This section contains payload examples to demonstrate how to use the NX-API REST API to configure netstack on the Cisco Nexus 3000 and 9000 Series switches.

Netstack Configuration Command Examples

This section contains payload examples and CLIs to demonstrate many of the netstack configuration commands and to show how the REST APIs correspond to the CLI commands.

Configuring a Secondary IPv4 Address on an Interface

Configuring a Secondary IPv4 Address on an Interface
POST http://<IP_Address>/api/mo/sys/ipv4/inst.json
{
  "ipv4Inst": {
    "children": [
      {
        "ipv4Dom": {
          "attributes": {
            "name": "default"
          },
          "children": [
            {
              "ipv4If": {
                "attributes": {
                  "id": "eth1/1"
                },
                "children": [
                  {
                    "ipv4Addr": {
                      "attributes": {
                        "addr": "128.0.0.1/10",
                        "type": "secondary",
                        "tag": "30"
}}}]}}]}}]}}

This example configures a tagged secondary IPv4 address on the Ethernet 1/1 interface. Change the attributes as necessary for your own uses.

Configuring IP Forwarding

Configuring IP Forwarding
POST http://<IP_Address>/api/mo/sys/ipv4/inst.json
{
  "ipv4Inst": {
    "children": [
      {
        "ipv4Dom": {
          "attributes": {
            "name": "default"
          },
          "children": [
            {
              "ipv4If": {
                "attributes": {
                  "forward": "enabled",
                  "id": "eth1/1"
}}}]}}]}}

This example configures forwarding on interface Ethernet 1/1.

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

Configuring Reachability

Configuring Reachability
POST http://<IP_Address>/api/mo/sys/icmpv4/inst.json
{
  "icmpv4Inst": {
    "children": [
      {
        "icmpv4Dom": {
          "attributes": {
            "name": "default"
          },
          "children": [
            {
              "icmpv4If": {
                "attributes": {
                  "ctrl": "port-unreachable,redirect,unreachable",
                  "id": "eth1/1"
}}}]}}]}}

The following example configures ICMPv4 on the interface Ethernet 1/1 such that the ICMPv4 interface is unreachable.

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

Queue 1 Packet when Triggered NS is Sent

Queue 1 Packet when Triggered NS is Sent
POST http://<mgmt0_IP>/api/mo/sys.json
{
  "topSystem": {
    "children": [
      {
        "interfaceEntity": {
          "children": [
            {
              "l3LbRtdIf": {
                "attributes": {
                  "id": "lo222"
}}}]}},

      {
        "ipv6Entity": {
          "children": [
            {
              "ipv6Inst": {
                "attributes": {
                  "queuePackets": "enabled"
}}}]}}]}}
{
    imdata:[]
}
<System>
  <intf-items>
    <lb-items>
      <LbRtdIf-list>
        <id>lo222</id>
      </LbRtdIf-list>
    </lb-items>
  </intf-items>
  <ipv6-items>
    <inst-items>
      <queuePackets>enabled</queuePackets>
    </inst-items>
  </ipv6-items>
</System>

Queue 1 packet when a triggered NS is sent.


CLI Commands

The CLI commands and options listed below are the 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 or the YANG tab to view the XML payload.

interface loopback 222
 ipv6 queue-packets

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

Switch ND Packets Received on Core Ports

Switch ND Packets Received on Core Ports
POST http://<mgmt0_IP>/api/mo/sys.json
{
  "topSystem": {
    "children": [
      {
        "interfaceEntity": {
          "children": [
            {
              "l3LbRtdIf": {
                "attributes": {
                  "id": "lo222"
}}}]}},

      {
        "ipv6Entity": {
          "children": [
            {
              "ipv6Inst": {
                "attributes": {
                  "switchPackets": "all"
}}}]}}]}}
{
    imdata:[]
}
<System>
  <intf-items>
    <lb-items>
      <LbRtdIf-list>
        <id>lo222</id>
      </LbRtdIf-list>
    </lb-items>
  </intf-items>
  <ipv6-items>
    <inst-items>
      <switchPackets>all</switchPackets>
    </inst-items>
  </ipv6-items>
</System>

Switch ND packets received on core ports.


CLI Commands

The CLI commands and options listed below are the 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 or the YANG tab to view the XML payload.

interface loopback 222
 ipv6 switch-packets

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

Enabling IP Source Routing

Enabling IP Source Routing
POST http://<mgmt0_IP>/api/mo/sys/ipv4.json
{
 "ipv4Entity": {
   "children": [
     {
       "ipv4Inst": {
         "attributes": {
           "sourceRoute": "enabled"
}}}]}}
{
    imdata:[]
}
<System>
  <ipv4-items>
    <inst-items>
      <sourceRoute>enabled</sourceRoute>
    </inst-items>
  </ipv4-items>
</System>

Enables IP source routing.


CLI Command

The CLI command below is the equivalent to the payload example 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 or the YANG tab to view the XML payload.

ip source-route

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

Enabling IP Auto Discard

Enabling IP Auto Discard
POST http://<mgmt0_IP>/api/mo/sys/ipv4/inst.json
{
 "ipv4Inst": {
   "children": [
     {
       "ipv4Dom": {
         "attributes": {
           "autoDiscard": "enabled",
           "name": "default"
}}}]}}
{
    imdata:[]
}
<System>
  <ipv4-items>
    <inst-items>
      <dom-items>
        <Dom-list>
          <name>default</name>
          <autoDiscard>enabled</autoDiscard>
        </Dom-list>
      </dom-items>
    </inst-items>
  </ipv4-items>
</System>

Enables IP auto discard.


CLI Command

The CLI command below is the equivalent to the payload example 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 or the YANG tab to view the XML payload.

ip auto-discard

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

Specifying an IPv4 ICMP Error-Source Interface

Specifying an IPv4 ICMP Error-Source Interface
POST http://<mgmt0_IP>/api/mo/sys/ipv4/inst.json
{
 "ipv4Inst": {
   "children": [
     {
       "ipv4Dom": {
         "attributes": {
           "ipIcmpErrorsSrcIntf": "lo2",
           "name": "default"
}}}]}}
{
    imdata:[]
}
<System>
  <ipv4-items>
    <inst-items>
      <dom-items>
        <Dom-list>
          <name>default</name>
          <ipIcmpErrorsSrcIntf>lo2</ipIcmpErrorsSrcIntf>
        </Dom-list>
      </dom-items>
    </inst-items>
  </ipv4-items>
</System>

Generates ICMP error packets with the source IPv4 address from the configured interface.


CLI Command

The CLI command below is the equivalent to the payload example 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 or the YANG tab to view the XML payload.

ip icmp-errors source-interface loopback 2

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

Specifying Internal IPv6 Event Logs for High Availability

Specifying Internal IPv6 Event Logs for High Availability
POST http://<mgmt0_IP>/api/mo/sys/ipv6/inst.json
{
 "ipv6Inst": {
   "children": [
     {
       "ipv6IPv6EventLogs": {
         "attributes": {
           "eventType": "highAvailability",
           "logSize": "small"
}}}]}}
{
    imdata:[]
}
<System>
  <ipv6-items>
    <inst-items>
      <logs-items>
        <IPv6EventLogs-list>
          <eventType>highAvailability</eventType>
          <logSize>small</logSize>
        </IPv6EventLogs-list>
      </logs-items>
    </inst-items>
  </ipv6-items>
</System>

Specifies the internal IPv6 event log for high availability buffer size.


CLI Command

The CLI command below is the equivalent to the payload example 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 or the YANG tab to view the XML payload.

ipv6 internal event-history ha size small

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

Enabling Access-List Matching for Locally Generated Traffic

Enabling Access-List Matching for Locally Generated Traffic
POST http://<mgmt0_IP>/api/mo/sys/ipv4.json
{
 "ipv4Entity": {
   "children": [
     {
       "ipv4Inst": {
         "attributes": {
           "accessListMatchLocal": "enabled"
}}}]}}
{
    imdata:[]
}
<System>
  <ipv4-items>
    <inst-items>
      <accessListMatchLocal>enabled</accessListMatchLocal>
    </inst-items>
  </ipv4-items>
</System>

Enables access-list matching for locally generated traffic.


CLI Command

The CLI command below is the equivalent to the payload example 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 or the YANG tab to view the XML payload.

ip access-list match-local-traffic

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

Specifying IPv4 Load Sharing

Specifying IPv4 Load Sharing
POST http://<mgmt0_IP>/api/mo/sys/ipv4/inst.json
{
 "ipv4Inst": {
   "children": [
     {
       "ipv4IPLoadSharing": {
         "attributes": {
           "concatenation": "disabled",
           "greOuterHash": "disabled",
           "loadShareMode": "srcDestPort"
}}}]}}
{
    imdata:[]
}
<System>
  <ipv4-items>
    <inst-items>
      <iploadsharing-items>
        <concatenation>disabled</concatenation>
        <greOuterHash>disabled</greOuterHash>
        <loadShareMode>srcDestPort</loadShareMode>
      </iploadsharing-items>
    </inst-items>
  </ipv4-items>
</System>

Configures IPv4 load sharing.


CLI Command

The CLI command below is the equivalent to the payload example 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 or the YANG tab to view the XML payload.

ip load-sharing address source-destination port source-destination

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

Setting the Syslog Filter Level for Netstack

Setting the Syslog Filter Level for Netstack
POST http://<mgmt0_IP>/api/mo/sys/ipv4.json
{
 "ipv4Entity": {
   "children": [
     {
       "ipv4Inst": {
         "attributes": {
           "loggingLevel": "critical"
}}}]}}
{
    imdata:[]
}
<System>
  <ipv4-items>
    <inst-items>
      <loggingLevel>critical</loggingLevel>
    </inst-items>
  </ipv4-items>
</System>

Sets the syslog filter level for netstack.


CLI Command

The CLI command below is the equivalent to the payload example 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 or the YANG tab to view the XML payload.

logging level netstack 2

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

Configuring the ICMPv6 Logging Level

Configuring the ICMPv6 Logging Level
POST http://<mgmt0_IP>/api/mo/sys/icmpv6.json
{
 "icmpv6Entity": {
   "children": [
     {
       "icmpv6Inst": {
         "attributes": {
           "loggingLevel": "Error"
}}}]}}
{
    imdata:[]
}
<System>
  <icmpv6-items>
    <inst-items>
      <loggingLevel>Error</loggingLevel>
    </inst-items>
  </icmpv6-items>
</System>

Configures the ICMPv6 logging level.


CLI Command

The CLI command below is the equivalent to the payload example 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 or the YANG tab to view the XML payload.

logging Level icmpv6 3

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

Sending ICMP Redirect Messages

Sending ICMP Redirect Messages
POST http://<mgmt0_IP>/api/mo/sys/icmpv4/inst.json
{
 "icmpv4Inst": {
   "children": [
     {
       "icmpv4Dom": {
         "attributes": {
           "name": "default"
         },
         "children": [
           {
             "icmpv4If": {
               "attributes": {
                 "ctrl": "port-unreachable,redirect",
                 "id": "eth1/1"
}}}]}}]}}
{
    imdata:[]
}
<System>
  <icmpv4-items>
    <inst-items>
      <dom-items>
        <Dom-list>
          <name>default</name>
          <if-items>
            <If-list>
              <id>eth1/1</id>
              <ctrl>port-unreachable,redirect</ctrl>
            </If-list>
          </if-items>
        </Dom-list>
      </dom-items>
    </inst-items>
  </icmpv4-items>
</System>

Enables sending redirects.


CLI Commands

The CLI commands and options listed below are the 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 or the YANG tab to view the XML payload.

interface ethernet1/1
 ip redirects

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

Configuring an IP Address on an Interface

Configuring an IP Address on an Interface
POST http://<mgmt0_IP>/api/mo/sys/ipv4/inst.json
{
  "ipv4Inst": {
    "children": [
      {
        "ipv4Dom": {
          "attributes": {
            "name": "default"
          },
          "children": [
            {
              "ipv4If": {
                "attributes": {
                  "id": "eth1/1"
                },
                "children": [
                  {
                    "ipv4Addr": {
                      "attributes": {
                        "addr": "4.4.4.4/5",
                        "tag": "111"
}}}]}}]}}]}}
{
    imdata:[]
}
<System>
  <ipv4-items>
    <inst-items>
      <dom-items>
        <Dom-list>
          <name>default</name>
          <if-items>
            <If-list>
              <id>eth1/1</id>
              <addr-items>
                <Addr-list>
                  <addr>4.4.4.4/5</addr>
                  <tag>111</tag>
                </Addr-list>
              </addr-items>
            </If-list>
          </if-items>
        </Dom-list>
      </dom-items>
    </inst-items>
  </ipv4-items>
</System>

Configures an IP address on an interface.


CLI Commands

The CLI commands and options listed below are the 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 or the YANG tab to view the XML payload.

interface ethernet1/1
 ip address 4.4.4.4/5 tag 111

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

Configuring Additional IP Addresses on an Interface

Configuring Additional IP Addresses on an Interface
POST http://<mgmt0_IP>/api/mo/sys/ipv4/inst.json
{
  "ipv4Inst": {
    "children": [
      {
        "ipv4Dom": {
          "attributes": {
            "name": "default"
          },
          "children": [
            {
              "ipv4If": {
                "attributes": {
                  "id": "eth1/1"
                },
                "children": [
                  {
                    "ipv4Addr": {
                      "attributes": {
                        "addr": "4.4.4.4/5",
                        "tag": "111",
                        "type": "secondary"
}}}]}}]}}]}}
{
    imdata:[]
}
<System>
  <ipv4-items>
    <inst-items>
      <dom-items>
        <Dom-list>
          <name>default</name>
          <if-items>
            <If-list>
              <id>eth1/1</id>
              <addr-items>
                <Addr-list>
                  <addr>4.4.4.4/5</addr>
                  <tag>111</tag>
                  <type>secondary</type>
                </Addr-list>
              </addr-items>
            </If-list>
          </if-items>
        </Dom-list>
      </dom-items>
    </inst-items>
  </ipv4-items>
</System>

Configures additional IP addresses on an interface.


CLI Commands

The CLI commands and options listed below are the 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 or the YANG tab to view the XML payload.

interface ethernet1/1
 ip address 4.4.4.4/5 secondary tag 323

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

Enabling IP Forwarding on an Interface

Enabling IP Forwarding on an Interface
POST http://<mgmt0_IP>/api/mo/sys/ipv4/inst.json
{
  "ipv4Inst": {
    "children": [
      {
        "ipv4Dom": {
          "attributes": {
            "name": "default"
          },
          "children": [
            {
              "ipv4If": {
                "attributes": {
                  "forward": "enabled",
                  "id": "eth1/1"
}}}]}}]}}
{
    imdata:[]
}
<System>
  <ipv4-items>
    <inst-items>
      <dom-items>
        <Dom-list>
          <name>default</name>
          <if-items>
            <If-list>
              <id>eth1/1</id>
              <forward>enabled</forward>
            </If-list>
          </if-items>
        </Dom-list>
      </dom-items>
    </inst-items>
  </ipv4-items>
</System>

Enables IP forwarding on an interface.


CLI Commands

The CLI commands and options listed below are the 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 or the YANG tab to view the XML payload.

interface ethernet1/1
 ip forward

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

Enabling an IP-Directed Broadcast ACL Policy

Enabling an IP-Directed Broadcast ACL Policy
POST http://<mgmt0_IP>/api/mo/sys/ipv4/inst.json
{
  "ipv4Inst": {
    "children": [
      {
        "ipv4Dom": {
          "attributes": {
            "name": "default"
          },
          "children": [
            {
              "ipv4If": {
                "attributes": {
                  "acl": "ACL_Policy_Name",
                  "directedBroadcast": "enabled",
                  "id": "eth1/1"
}}}]}}]}}
{
    imdata:[]
}
<System>
  <ipv4-items>
    <inst-items>
      <dom-items>
        <Dom-list>
          <name>default</name>
          <if-items>
            <If-list>
              <id>eth1/1</id>
              <acl>ACL_Policy_Name</acl>
              <directedBroadcast>enabled</directedBroadcast>
            </If-list>
          </if-items>
        </Dom-list>
      </dom-items>
    </inst-items>
  </ipv4-items>
</System>

Enables an IP-directed broadcast ACL policy.


CLI Commands

The CLI commands and options listed below are the 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 or the YANG tab to view the XML payload.

interface ethernet1/1
 ip directed-broadcast ACL_Policy_Name

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

Enabling the Sending of ICMP Unreachables (other than port-unreachable)

Enabling the Sending of ICMP Unreachables (other than port-unreachable)
POST http://<mgmt0_IP>/api/mo/sys/icmpv4/inst.json
{
  "icmpv4Inst": {
    "children": [
      {
        "icmpv4Dom": {
          "attributes": {
            "name": "default"
          },
          "children": [
            {
              "icmpv4If": {
                "attributes": {
                  "ctrl": "port-unreachable,redirect,unreachable",
                  "id": "eth1/1"
}}}]}}]}}
{
    imdata:[]
}
<System>
  <icmpv4-items>
    <inst-items>
      <dom-items>
        <Dom-list>
          <name>default</name>
          <if-items>
            <If-list>
              <id>eth1/1</id>
              <ctrl>port-unreachable,redirect,unreachable</ctrl>
            </If-list>
          </if-items>
        </Dom-list>
      </dom-items>
    </inst-items>
  </icmpv4-items>
</System>

Enables the sending of ICMP unreachables (other than port-unreachable).


CLI Commands

The CLI commands and options listed below are the 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 or the YANG tab to view the XML payload.

interface ethernet1/1
 ip unreachables

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

Enable Sending an ICMP Port Unreachable

Enable Sending an ICMP Port Unreachable
POST http://<mgmt0_IP>/api/mo/sys/icmpv4/inst.json
{
  "icmpv4Inst": {
    "children": [
      {
        "icmpv4Dom": {
          "attributes": {
            "name": "default"
          },
          "children": [
            {
              "icmpv4If": {
                "attributes": {
                  "ctrl": "port-unreachable,redirect",
                  "id": "eth1/1"
}}}]}}]}}
{
    imdata:[]
}
<System>
  <icmpv4-items>
    <inst-items>
      <dom-items>
        <Dom-list>
          <name>default</name>
          <if-items>
            <If-list>
              <id>eth1/1</id>
              <ctrl>port-unreachable,redirect</ctrl>
            </If-list>
          </if-items>
        </Dom-list>
      </dom-items>
    </inst-items>
  </icmpv4-items>
</System>

Enables sending an ICMP port unreachable.


CLI Commands

The CLI commands and options listed below are the 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 or the YANG tab to view the XML payload.

interface ethernet1/1
 ip port-unreachable

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

Enabling IPv6 on an Interface Using only a Single Link-Local Address
POST http://<mgmt0_IP>/api/mo/sys/ipv6/inst.json
{
  "ipv6Inst": {
    "children": [
      {
        "ipv6Dom": {
          "attributes": {
            "name": "default"
          },
          "children": [
            {
              "ipv6If": {
                "attributes": {
                  "autoconfig": "disabled",
                  "id": "eth1/1",
                  "useLinkLocalAddr": "enabled"
}}}]}}]}}
{
    imdata:[]
}
<System>
  <ipv6-items>
    <inst-items>
      <dom-items>
        <Dom-list>
          <name>default</name>
          <if-items>
            <If-list>
              <id>eth1/1</id>
              <autoconfig>disabled</autoconfig>
              <useLinkLocalAddr>enabled</useLinkLocalAddr>
            </If-list>
          </if-items>
        </Dom-list>
      </dom-items>
    </inst-items>
  </ipv6-items>
</System>

Enables IPv6 on an interface using only a single link-local address.


CLI Commands

The CLI commands and options listed below are the 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 or the YANG tab to view the XML payload.

interface ethernet1/1
 ipv6 address use-link-local-only

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

Changing the Format of a Link-Local Address
POST http://<mgmt0_IP>/api/mo/sys/ipv6/inst.json
{
  "ipv6Inst": {
    "children": [
      {
        "ipv6Dom": {
          "attributes": {
            "name": "default"
          },
          "children": [
            {
              "ipv6If": {
                "attributes": {
                  "id": "eth1/1"
                },
                "children": [
                  {
                    "ipv6LLaddr": {
                      "attributes": {
                        "addr": "feb1:2::3:4"
}}}]}}]}}]}}
{
    imdata:[]
}
<System>
  <ipv6-items>
    <inst-items>
      <dom-items>
        <Dom-list>
          <name>default</name>
          <if-items>
            <If-list>
              <id>eth1/1</id>
              <lladdr-items>
                <LLaddr-list>
                  <addr>feb1:2::3:4</addr>
                </LLaddr-list>
              </lladdr-items>
            </If-list>
          </if-items>
        </Dom-list>
      </dom-items>
    </inst-items>
  </ipv6-items>
</System>

Changes the format of a link-local address.


CLI Commands

The CLI commands and options listed below are the 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 or the YANG tab to view the XML payload.

interface ethernet1/1
 ipv6 link-local FEB1:2::3:4

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

Configuring IPv6 Addresses on an Interface

Configuring IPv6 Addresses on an Interface
POST http://<mgmt0_IP>/api/mo/sys/ipv6/inst.json
{
  "ipv6Inst": {
    "children": [
      {
        "ipv6Dom": {
          "attributes": {
            "name": "default"
          },
          "children": [
            {
              "ipv6If": {
                "attributes": {
                  "id": "eth1/1"
                },
                "children": [
                  {
                    "ipv6Addr": {
                      "attributes": {
                        "addr": "1:2::3:4/3",
                        "ctrl": "eui64",
                        "pref": "44"
}}}]}}]}}]}}
{
    imdata:[]
}
<System>
  <ipv6-items>
    <inst-items>
      <dom-items>
        <Dom-list>
          <name>default</name>
          <if-items>
            <If-list>
              <id>eth1/1</id>
              <addr-items>
                <Addr-list>
                  <addr>1:2::3:4/3</addr>
                  <ctrl>eui64</ctrl>
                  <pref>44</pref>
                </Addr-list>
              </addr-items>
            </If-list>
          </if-items>
        </Dom-list>
      </dom-items>
    </inst-items>
  </ipv6-items>
</System>

Configures IPv6 addresses on an interface.


CLI Commands

The CLI commands and options listed below are the 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 or the YANG tab to view the XML payload.

interface ethernet1/1
 ipv6 address 1:2::3:4/3 eui64 route-preference 44

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

Configuring a U6RIB Route Preference for Local or Direct Routes

Configuring a U6RIB Route Preference for Local or Direct Routes
POST http://<mgmt0_IP>/api/mo/sys/ipv6/inst.json
{
  "ipv6Inst": {
    "children": [
      {
        "ipv6Dom": {
          "attributes": {
            "name": "default"
          },
          "children": [
            {
              "ipv6If": {
                "attributes": {
                  "autoconfig": "enabled",
                  "defaultRoute": "enabled",
                  "id": "eth1/1",
                  "useLinkLocalAddr": "disabled"
}}}]}}]}}
{
    imdata:[]
}
<System>
  <ipv6-items>
    <inst-items>
      <dom-items>
        <Dom-list>
          <name>default</name>
          <if-items>
            <If-list>
              <id>eth1/1</id>
              <autoconfig>enabled</autoconfig>
              <defaultRoute>enabled</defaultRoute>
              <useLinkLocalAddr>disabled</useLinkLocalAddr>
            </If-list>
          </if-items>
        </Dom-list>
      </dom-items>
    </inst-items>
  </ipv6-items>
</System>

Configuring a U6RIB route preference for local or direct routes.


CLI Commands

The CLI commands and options listed below are the 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 or the YANG tab to view the XML payload.

interface ethernet1/1
 ipv6 address autoconfig default

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

Configuring IPv6 Stateless Address Autoconfig

Configuring IPv6 Stateless Address Autoconfig
POST http://<mgmt0_IP>/api/mo/sys/ipv6/inst.json
{
  "ipv6Inst": {
    "children": [
      {
        "ipv6Dom": {
          "attributes": {
            "name": "default"
          },
          "children": [
            {
              "ipv6If": {
                "attributes": {
                  "id": "eth1/1"
                },
                "children": [
                  {
                    "ipv6Neighbor": {
                      "attributes": {
                        "addr": "1:2::3:4",
                        "neighborMac": "00:05:00:05:00:05"
}}}]}}]}}]}}
{
    imdata:[]
}
<System>
  <ipv6-items>
    <inst-items>
      <dom-items>
        <Dom-list>
          <name>default</name>
          <if-items>
            <If-list>
              <id>eth1/1</id>
              <nghbr-items>
                <Neighbor-list>
                  <addr>1:2::3:4</addr>
                  <neighborMac>00:05:00:05:00:05</neighborMac>
                </Neighbor-list>
              </nghbr-items>
            </If-list>
          </if-items>
        </Dom-list>
      </dom-items>
    </inst-items>
  </ipv6-items>
</System>

Configures IPv6 stateless address autoconfig.


CLI Commands

The CLI commands and options listed below are the 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 or the YANG tab to view the XML payload.

interface ethernet1/1
 ipv6 neighbor 1:2::3:4 5.5.5

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

Enable Sending ICMPv6 Unreachable Messages

Enable Sending ICMPv6 Unreachable Messages
POST http://<mgmt0_IP>/api/mo/sys/icmpv6/inst.json
{
  "icmpv6Inst": {
    "children": [
      {
        "icmpv6If": {
          "attributes": {
            "ctrl": "unreachables-icmp",
            "id": "eth1/1"
}}}]}}
{
    imdata:[]
}
<System>
  <icmpv6-items>
    <inst-items>
      <if-items>
        <If-list>
          <id>eth1/1</id>
          <ctrl>unreachables-icmp</ctrl>
        </If-list>
      </if-items>
    </inst-items>
  </icmpv6-items>
</System>

Enables sending ICMPv6 unreachable messages.


CLI Commands

The CLI commands and options listed below are the 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 or the YANG tab to view the XML payload.

interface ethernet1/1
 ipv6 icmp unreachables

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

Specifying when Probing for an Adjacency Begins

Specifying when Probing for an Adjacency Begins
POST http://<mgmt0_IP>/api/mo/sys/icmpv6.json
{
  "icmpv6Entity": {
    "children": [
      {
        "icmpv6Inst": {
          "attributes": {
            "adjStaleTimer": "300",
            "adjStaleTimerIcmp": "disabled"
}}}]}}
{
    imdata:[]
}
<System>
  <icmpv6-items>
    <inst-items>
      <adjStaleTimer>300</adjStaleTimer>
      <adjStaleTimerIcmp>disabled</adjStaleTimerIcmp>
    </inst-items>
  </icmpv6-items>
</System>

Specifies when probing for an adjacency begins.


CLI Commands

The CLI commands and options listed below are the 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 or the YANG tab to view the XML payload.

interface ethernet1/1
 ipv6 adjacency-stale-timer 300

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

Configuring an IP Interface as Unnumbered

Configuring an IP Interface as Unnumbered
POST http://<mgmt0_IP>/api/mo/sys/nd/inst.json
{
  "ipv4Inst": {
    "children": [
      {
        "ipv4Dom": {
          "attributes": {
            "name": "default"
          },
          "children": [
            {
              "ipv4If": {
                "attributes": {
                  "id": "eth1/1",
                  "unnumbered": "lo1"
}}}]}}]}}
{
    imdata:[]
}
<System>
  <ipv4-items>
    <inst-items>
      <dom-items>
        <Dom-list>
          <name>default</name>
          <if-items>
            <If-list>
              <id>eth1/1</id>
              <unnumbered>lo1</unnumbered>
            </If-list>
          </if-items>
        </Dom-list>
      </dom-items>
    </inst-items>
  </ipv4-items>
</System>

Configures an IP interface as unnumbered.


CLI Commands

The CLI commands and options listed below are the 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 or the YANG tab to view the XML payload.

interface ethernet 1/1
 ip unnumbered lo1

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

Configuring an Unnumbered VLAN Interface

Configuring an Unnumbered VLAN Interface
POST http://<mgmt0_IP>/api/mo/sys.json
{
  "topSystem": {
    "children": [
{
"ipv4Entity": {
  "children": [
{
  "ipv4Inst": {
    "children": [
{
"ipv4Dom": {
  "attributes": {
    "name": "default"
},
"children": [
{
  "ipv4If": {
    "attributes": {
      "id": "vlan123",
      "unnumbered": "vlan321"
}}}]}}]}}]}},{
"interfaceEntity": {
  "children": [
{
  "sviIf": {
    "attributes": {
      "id": "vlan123"

}}}]}}]}}
{
    imdata:[]
}
<System>
  <ipv4-items>
    <inst-items>
      <dom-items>
        <Dom-list>
          <name>default</name>
          <if-items>
            <If-list>
              <id>vlan123</id>
              <unnumbered>vlan321</unnumbered>
            </If-list>
          </if-items>
        </Dom-list>
      </dom-items>
    </inst-items>
  </ipv4-items>
  <intf-items>
    <svi-items>
      <If-list>
        <id>vlan123</id>
      </If-list>
    </svi-items>
  </intf-items>
</System>

Note: This example was added in Release 7.0(3)I7(2).


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.

interface vlan 123
  ip unnumbered vlan 321

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 Unnumbered VLAN Interface

Deleting an Unnumbered VLAN Interface
POST http://<mgmt0_IP>/api/mo/sys.json
{
  "topSystem": {
    "children": [
{
"ipv4Entity": {
  "children": [
{
  "ipv4Inst": {
"children": [
  {
"ipv4Dom": {
  "attributes": {
    "name": "default"
},
"children": [
{
  "ipv4If": {
    "attributes": {
      "id": "vlan123",
      "unnumbered": "unspecified"
}}}]}}]}}]}},{
        "interfaceEntity": {
          "children": [
            {
              "sviIf": {
                "attributes": {
                  "id": "vlan123"
}}}]}}]}}
{
    imdata:[]
}
<System>
  <ipv4-items>
    <inst-items>
      <dom-items>
        <Dom-list>
          <name>default</name>
          <if-items>
            <If-list>
              <id>vlan123</id>
              <unnumbered>unspecified</unnumbered>
            </If-list>
          </if-items>
        </Dom-list>
      </dom-items>
    </inst-items>
  </ipv4-items>
  <intf-items>
    <svi-items>
      <If-list>
        <id>vlan123</id>
      </If-list>
    </svi-items>
  </intf-items>
</System>

Note: This example was added in Release 7.0(3)I7(2).


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.

interface vlan 123
  no ip unnumbered vlan 321

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

Configuring a VLAN Interface as IPv6 Forward

Configuring a VLAN Interface as IPv6 Forward
POST http://<mgmt0_IP>/api/mo/sys.json
{
  "topSystem": {
    "children": [
{
"interfaceEntity": {
  "children": [
{
  "sviIf": {
    "attributes": {
      "id": "vlan1"
}}}]}},{
"ipv6Entity": {
  "children": [
{
  "ipv6Inst": {
    "children": [
{
"ipv6Dom": {
  "attributes": {
    "name": "default"
},
"children": [
{
  "ipv6If": {
    "attributes": {
      "forward": "enabled",
      "id": "vlan1"
}}}]}}]}}]}}]}}
{
    imdata:[]
}
<System>
  <intf-items>
    <svi-items>
      <If-list>
        <id>vlan2</id>
      </If-list>
    </svi-items>
  </intf-items>
  <ipv6-items>
    <inst-items>
      <dom-items>
        <Dom-list>
          <name>default</name>
          <if-items>
            <If-list>
              <id>vlan2</id>
              <forward>enabled</forward>
            </If-list>
          </if-items>
        </Dom-list>
      </dom-items>
    </inst-items>
  </ipv6-items>
</System>

Configures a VLAN interface as IPv6 forward.


CLI Commands

The CLI commands and options listed below are the 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 or the YANG tab to view the XML payload.

interface ethernet1/1
 ipv6 forward

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

Netstack Operational Command Examples

This section demonstrates many of the netstack operational command options shows how the NX-API REST API corresponds to the CLI commands.

Querying an IP Interface

Default VRF
GET https://<IP_Address>/api/mo/sys/ipv4/inst/dom-default/if-[vlan2].json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-id=1&batch-size=10
Non-Default VRF
GET https://<IP_Address>/api/mo/sys/ipv4/inst/dom-3/if-[vlan3].json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-id=1&batch-size=10


CLI Command

show ip interface { {{brief [include-secondary]} | [<interface>] | [<ip-addr>]}

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

Querying IP Traffic

Querying IP Traffic
GET https://<IP_Address>/api/mo/sys/ipv4/inst/iptrafficstat.json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-id=1&batch-size=10


CLI Command

show ip traffic

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

Querying IP Clients

All Clients
GET https://<IP_Address>/api/mo/sys/ipv4/inst.json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-id=1&batch-size=10
A Specific Client
GET https://<IP_Address>/api/mo/sys/ipv4/inst/client-pktmgr-proto-47.json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-id=1&batch-size=10


CLI Command

show ip client [<client-name>]

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

Querying a IP Processes

Default VRF
GET https://<IP_Address>/api/mo/sys/ipv4/inst/dom-default/pstat.json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-id=1&batch-size=10
Non-Default VRF
GET https://<IP_Address>/api/mo/sys/ipv4/inst/dom-3/pstat.json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-id=1&batch-size=10


CLI Command

show ip process [api] [vrf {<vrf-name> | <vrf-known-name> | all}]

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

Querying Netstack Log Levels

Querying Netstack Log Levels
GET https://<IP_Address>/api/mo/sys/ipv4/inst.json


CLI Command

show logging level netstack

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

Querying Load Sharing

Querying Load Sharing
GET https://<IP_Address>/api/mo/sys/ipv4/inst/loadstat.json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-id=1&batch-size=10


CLI Command

show ip load-sharing

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

Querying IPv6 Interfaces

Default VRF
GET https://<IP_Address>/api/mo/sys/ipv6/inst/dom-default/if-[vlan2].json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-id=1&batch-size=10
Non-Default VRF
GET https://<IP_Address>/api/mo/sys/ipv6/inst/dom-3/if-[vlan3].json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-id=1&batch-size=10


CLI Command

show ipv6 interface

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

Querying IPv6 Traffic

Querying IPv6 Traffic
GET https://<IP_Address>/api/mo/sys/ipv6/inst/dom-default/trafficstats.json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-id=1&batch-size=10


CLI Command

show ipv6 traffic [detail] [vrf {<vrf-name> | <vrf-known-name>}]

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

Querying IPv6 Clients

All Clients
GET https://<IP_Address>/api/mo/sys/ipv6/inst.json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-id=1&batch-size=10
A Specific Client
GET https://<IP_Address>/api/mo/sys/ipv6/inst/clientstats-tm-proto-0.json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-id=1&batch-size=10


CLI Command

show ipv6 client [<client-name>]

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

Querying IPv6 Fragments

Querying IPv6 Fragments
GET https://<IP_Address>/api/mo/sys/ipv6/inst/fragstats-[<srcAddr>]‘.json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-id=1&batch-size=20


CLI Command

show ipv6 fragments [<source-addr>]

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

Querying IPv6 Processes

Default VRF
GET https://<IP_Address>/api/mo/sys/ipv6/inst/dom-default/procstats.json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-id=1&batch-size=10
Non-Default VRF
GET https://<IP_Address>/api/mo/sys/ipv6/inst/dom-3/procstats.json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-id=1&batch-size=10


CLI Command

show ipv6 process [vrf {<vrf-name> | <vrf-known-name> | all}]

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

Querying IPv6 MTU Statistics

Querying IPv6 MTU Statistics
GET https://<IP_Address>/api/mo/sys/ipv6/inst/mtustats.json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-id=1&batch-size=20


CLI Command

show ipv6 mtu [statistics | vrf {<vrf-name> | <vrf-known-name> | all [detail]}]

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

Querying IPv6 Neighbor Static Interfaces

Querying IPv6 Neighbor Static Interfaces
GET https://<IP_Address>/api/mo/sys/ipv6/inst/dom-default/if-[vlan2].json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-id=1&batch-size=20


CLI Command

show ipv6 neighbor static [interface <interface>]

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

Querying Logging Levels for ICMPv6

Querying Logging Levels for ICMPv6
GET https://<IP_Address>/api/mo/sys/icmpv6/inst.json


CLI Command

show logging level ipv6 icmp

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

Querying IPv6 Global Traffic

Querying IPv6 Global Traffic
GET https://<IP_Address>/api/mo/sys/nd/inst/glblpktstats.json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-id=1&batch-size=20


CLI Command

show ipv6 {icmp | nd} global traffic

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

Querying IPv6 Interface Statistics for Prefixes and Routes

Default VRF (Prefix)
GET https://<IP_Address>/api/mo/sys/nd/inst/dom-default/if-[vlan2]/ifstats/pfx-[12:2:1::/96].json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-id=1&batch-size=20
Default VRF (Route)
GET  https://<IP_Address>/api/mo/sys/nd/inst/dom-default/if-[vlan2]/ifstats/rt-[102:102:102::102/128].json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-id=1&batch-size=20
Non-Default VRF (Prefix)
GET https://<IP_Address>/api/mo/sys/nd/inst/dom-3/if-[vlan3]/ifstats/pfx-[12:2:1::/96].json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-id=1&batch-size=20
Non-Default VRF (Route)
GET https://<IP_Address>/api/mo/sys/nd/inst/dom-3/if-[vlan3]/ifstats/rt-[102:102:102::102/128].json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-id=1&batch-size=20


CLI Command

show ipv6 {icmp | nd} interface [<interface>] {[prefix [full]] | [route] | [detail]} [vrf {<vrf-name> | <vrf-known-name> | all}]} | default-vrf

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

Querying IPv6 ICMP Off-List Statistics

Querying IPv6 ICMP Off-List Statistics
GET https://<IP_Address>/api/mo/sys/nd/inst/offliststat-<vlanID>-ip-[<addr>]‘.json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-id=1&batch-size=20


CLI Command

show ipv6 icmp off-list [vlan <vlan-id>]

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

Querying IPv6 ICMP vPC Statistics

Querying IPv6 ICMP vPC Statistics
GET https://<IP_Address>/api/mo/sys/nd/inst/vpcstat.json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-id=1&batch-size=20


CLI Command

show ipv6 icmp vpc-statistics

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

Querying IPv6 Router Statistics

Querying IPv6 Router Statistics
GET https://<IP_Address>/api/mo/sys/nd/inst/dom-<intf-vrf>/if-[<interface>]/rtrstat-[<routerAddr>]‘.json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-id=1&batch-size=20


CLI Command

show ipv6 routers [all-routers] [[interface <interface>] | [vrf {<vrf-name> | <vrf-known-name> | all}]]

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

vAddr Link-Local Address
GET https://<IP_Address>/api/mo/sys/nd/inst/vaddrllstat-[fe80::5:73ff:fea0:2].json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-id=1&batch-size=20
vAddr Globals
GET https://<IP_Address>/api/mo/sys/nd/inst/dom-default/vaddrstatglobal-[12:6:1::101].json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-id=1&batch-size=20


CLI Command

show ipv6 icmp vaddr { link-local [detail] | global | pt-tree}

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

Netstack Action Command Examples

This section contains payload examples and CLIs to demonstrate many of the netstack action command options and to show how the REST APIs correspond to the CLI commands

Clearing IP traffic

 Clearing IP traffic
POST http://<mgmt0_IP>/api/mo/sys/action.json
{    "actionLSubj": {
        "attributes": {
             "dn": "sys/action/lsubj-[sys]"
        }
         "children" : [{
             "ipv4InstClearTrafficStatLTask": {
               "attributes": {
                       "adminSt": "start",
                         "dn":
"sys/action/lsubj-[sys]/ipv4InstClearTrafficStatLTask",
                        "freq": "one-shot"
}}}]}}
{
    imdata:[]
}

Clears IP global statistics.

Note: This example was added in Release 7.0(3)I6(1).


CLI Command

The CLI command below is the equivalent to the payload example displayed in the pane on the right.

clear ip traffic

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

Clearing interface statistics

 Clearing interface statistics
POST http://<mgmt0_IP>/api/mo/sys/action.json
{    "actionLSubj": {
        "attributes": {
             "dn": "sys/action/lsubj-[sys]"
        }
         "children" : [{
             "ipv4InstClearIntfStatLTask": {
               "attributes": {
                       "adminSt": "start",
                       "interface": "<type-with-port>"
                         "dn":
"sys/action/lsubj-[sys]/ipv4InstClearIntfStatLTask",
                        "freq": "one-shot"
}}}]}}
{
    imdata:[]
}

Clears IP interface statistics.

Note: This example was added in Release 7.0(3)I6(1).


CLI Command

The CLI command below is the equivalent to the payload example displayed in the pane on the right.

clear ip interface statistics

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

Clearing IPv6 Traffic

 Clearing IPv6 Traffic
POST http://<mgmt0_IP>/api/mo/sys/action.json
{    "actionLSubj": {
        "attributes": {
             "dn": "sys/action/lsubj-[sys]"
        }
         "children" : [{
             "ipv6InstClearTrafficStatLTask": {
               "attributes": {
                       "adminSt": "start",
                         "dn":
"sys/action/lsubj-[sys]/ipv6InstClearTrafficStatLTask",
                        "freq": "one-shot"
}}}]}}
{
    imdata:[]
}

Clears IPv6 traffic.

Note: This example was added in Release 7.0(3)I6(1).


CLI Command

The CLI command below is the equivalent to the payload example displayed in the pane on the right. .

clear ipv6 traffic

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

Clearing IPv6 Statistics

 Clearing IPv6 Statistics
POST http://10.77.143.51/api/mo/sys/action.json
{    "actionLSubj": {
        "attributes": {
             "dn": "sys/action/lsubj-[sys]"
        }
         "children" : [{
             "ipv6InstClearGlobalStatLTask": {
               "attributes": {
                       "adminSt": "start",
                         "dn":
"sys/action/lsubj-[sys]/ipv6InstClearGlobalStatLTask",
                        "freq": "one-shot"
}}}]}}
{
    imdata:[]
}

Clears IPv6 statistics.

Note: This example was added in Release 7.0(3)I6(1).


CLI Command

The CLI command below is the equivalent to the payload example displayed in the pane on the right.

clear ipv6 statistics

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

Clearing IPv6 Interface Statistics

 Clearing IPv6 Interface Statistics
POST http://10.77.143.51/api/mo/sys/action.json
{    
"actionLSubj": {
  "attributes": {
     "dn": "sys/action/lsubj-[sys]"
 }
 "children" : [{
     "ipv6InstClearIntfStatLTask": {
       "attributes": {
           "adminSt": "start",
           "interface": "<type-with-port>"
             "dn":
    "sys/action/lsubj-[sys]/ipv6InstClearIntfStatLTask",
            "freq": "one-shot"
}}}]}}
{
    imdata:[]
}

Clears IPv6 interface statistics.

Note: This example was added in Release 7.0(3)I6(1).


CLI Command

The CLI command below is the equivalent to the payload example displayed in the pane on the right.

clear ipv6 interface statistics

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