Configuring Control Plane Policing

Control Plane Policing (CoPP) allows a policy map to be applied to the control plane. The policy map is applied to all traffic entering the switch from a non-management port in order to prevent DoS attacks from impacting performance.

This section contains payload examples and CLIs to demonstrate how to use the NX-API REST API to configure COPP on Cisco Nexus 3000 and 9000 Series switches and to show how the REST APIs correspond to the CLI commands. For more information about ARP, see the Cisco Nexus 9000 Series NX-OS Security Configuration Guide.

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

Creating a Class Map

Creating a Class Map
POST http://<IP_Address>/api/node/mo/sys/copp.json
{
  "coppEntity": {
    "children": [
      {
        "coppClass": {
          "attributes": {
            "cName": "cmap1",
            "flag": "no"
}}},{
        "coppClass": {
          "attributes": {
            "cName": "match-any",
            "matchOption": "MatchAny"
}}}]}}

This example creates a class-map and a 'match-any' class.

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 Class Map

Configuring a Class Map
POST http://<IP_Address>/api/node/mo/sys/copp.json
{
  "coppClass": {
    "attributes": {
      "cName": "cmap1",
      "flag": "no"
    },
    "children": [
      {
        "coppMulticast": {
          "attributes": {
            "flag": "no",
            "mcastOption": "rpf-failure"
}}},{
        "coppExeOptions": {
          "attributes": {
            "flag": "no",
            "option": "mtu-failure"
}}},{
        "coppIp": {
          "attributes": {
            "flag": "no",
            "options": "yes"
}}},{
        "coppIpv6Icmp": {
          "attributes": {
            "flag": "no",
            "option": "unreachable"
}}},{
        "coppProtocol": {
          "attributes": {
            "flag": "no",
            "type": "arp"
}}}]}}

This example configures the class map.


CLI Commands

The CLI commands and options listed below are the equivalent to the payload example displayed in the pane on the right.

match protocol arp
match exception mtu-failure
match exception ip option
match exception ipv6 icmp unreachable
match exception multicast rpf-failure

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/

Configuring a Match for IPv4 Option Exception Packets

Configuring a Match for IPv4 Option Exception Packets 
POST http://<mgmt0_IP>/api/mo/sys/copp.json
{
"coppEntity": {
  "children": [
    {
      "coppClass": {
        "attributes": {
          "cName": "CMAP",
          "flag": "no"
        },
        "children": [
          {
            "coppIp": {
              "attributes": {
                "flag": "no",
                "options": "yes"
}}}]}}]}}
{
    imdata:[]
}
<System>
  <copp-items>
    <classp-items>
      <Class-list>
        <cName>CMAP</cName>
        <flag>false</flag>
        <ip-items>
          <flag>false</flag>
          <options>true</options>
        </ip-items>
      </Class-list>
    </classp-items>
  </copp-items>
</System>


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.

class-map type control-plane CMAP
 match exception ip option

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/media/dme/index.html

Deleting a Match for IPv4 Option Exception Packets

Deleting a Match for IPv4 Option Exception Packets 
DELETE http://<mgmt0_IP>/api/mo/sys/copp/classp-CMAP/ip
{
    imdata:[]
}


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.

class-map type control-plane CMAP
 no match exception ip option

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/media/dme/index.html

Configuring a Match for Redirected IPv4 ICMP Redirect Packets

 Configuring a Match for Redirected IPv4 ICMP Redirect Packets 
POST http://<mgmt0_IP>/api/mo/sys/copp.json
{
  "coppEntity": {
    "children": [
      {
        "coppClass": {
          "attributes": {
            "cName": "CMAP",
            "flag": "no"
          },
          "children": [
            {
              "coppIpIcmp": {
                "attributes": {
                  "flag": "no",
                  "option": "redirect"
}}}]}}]}}
{
    imdata:[]
}
<System>
  <copp-items>
    <classp-items>
      <Class-list>
        <cName>CMAP</cName>
        <flag>false</flag>
        <icmp-items>
          <IpIcmp-list>
            <option>redirect</option>
            <flag>false</flag>
          </IpIcmp-list>
        </icmp-items>
      </Class-list>
    </classp-items>
  </copp-items>
</System>


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.

class-map type control-plane CMAP
 match exception ip icmp redirect

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/media/dme/index.html

Deleting a Match for Redirected IPv4 ICMP Redirect Packets

 Deleting a Match for Redirected IPv4 ICMP Redirect Packets 
DELETE http://<mgmt0_IP>/api/mo/sys/copp/classp-CMAP/icmp-redirect.json
{
    imdata:[]
}


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.

class-map type control-plane CMAP
 no match exception ip icmp redirect

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/media/dme/index.html

Configuring a Match for Unreachable IPv4 ICMP Redirect Packets

 Configuring a Match for Unreachable IPv4 ICMP Redirect Packets 
POST http://<mgmt0_IP>/api/mo/sys/copp.json
{
  "coppEntity": {
    "children": [
      {
        "coppClass": {
          "attributes": {
            "cName": "CMAP",
            "flag": "no"
          },
          "children": [
            {
              "coppIpIcmp": {
                "attributes": {
                  "flag": "no",
                  "option": "unreachable"
}}}]}}]}}
{
    imdata:[]
}
<System>
  <copp-items>
    <classp-items>
      <Class-list>
        <cName>CMAP</cName>
        <flag>false</flag>
        <icmp-items>
          <IpIcmp-list>
            <option>unreachable</option>
            <flag>false</flag>
          </IpIcmp-list>
        </icmp-items>
      </Class-list>
    </classp-items>
  </copp-items>
</System>


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.

class-map type control-plane CMAP
 match exception ip icmp 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/media/dme/index.html

Deleting a Match for Unreachable IPv4 ICMP Redirect Packets

 Deleting a Match for Unreachable IPv4 ICMP Redirect Packets 
DELETE http://<mgmt0_IP>/api/mo/sys/copp/classp-CMAP/icmp-unreachable.json
{
    imdata:[]
}


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.

class-map type control-plane CMAP
 no match exception ip icmp 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/media/dme/index.html

Configuring a Match for IPv6 Option Exception Packets

 Configuring a Match for IPv6 Option Exception Packets 
POST http://<mgmt0_IP>/api/mo/sys/copp.json
{
  "coppEntity": {
    "children": [
      {
        "coppClass": {
          "attributes": {
            "cName": "CMAP",
            "flag": "no"
          },
          "children": [
            {
              "coppIpv6": {
                "attributes": {
                  "flag": "no",
                  "options": "yes"
}}}]}}]}}
{
    imdata:[]
}
<System>
  <copp-items>
    <classp-items>
      <Class-list>
        <cName>CMAP</cName>
        <flag>false</flag>
        <ipv6-items>
          <flag>false</flag>
          <options>true</options>
        </ipv6-items>
      </Class-list>
    </classp-items>
  </copp-items>
</System>


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.

class-map type control-plane CMAP
 match exception ipv6 option

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/media/dme/index.html

Deleting a Match for IPv6 Option Exception Packets

 Deleting a Match for IPv6 Option Exception Packets 
POST http://<mgmt0_IP>/api/mo/sys/copp/classp-CMAP/ipv6.json
{
    imdata:[]
}


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.

class-map type control-plane CMAP
 no match exception ipv6 option

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/media/dme/index.html

Configuring a Match for IPv6 ICMP Redirect Packets

 Configuring a Match for IPv6 ICMP Redirect Packets 
POST http://<mgmt0_IP>/api/mo/sys/copp.json
{
  "coppEntity": {
    "children": [
      {
        "coppClass": {
          "attributes": {
            "cName": "CMAP",
            "flag": "no"
          },
          "children": [
            {
              "coppIpv6Icmp": {
                "attributes": {
                  "flag": "no",
                  "option": "redirect"
}}}]}}]}}
{
    imdata:[]
}
<System>
  <copp-items>
    <classp-items>
      <Class-list>
        <cName>CMAP</cName>
        <flag>false</flag>
        <icmpv6-items>
          <Ipv6Icmp-list>
            <option>redirect</option>
            <flag>false</flag>
          </Ipv6Icmp-list>
        </icmpv6-items>
      </Class-list>
    </classp-items>
  </copp-items>
</System>


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.

class-map type control-plane CMAP
 match exception ipv6 icmp redirect

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/media/dme/index.html

Deleting a Match for IPv6 ICMP Redirect Packets

 Deleting a Match for IPv6 ICMP Redirect Packets 
DELETE http://<mgmt0_IP>/api/mo/sys/copp/classp-CMAP/icmpv6-redirect.json
{
    imdata:[]
}


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.

class-map type control-plane CMAP
 no match exception ipv6 icmp redirect

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/media/dme/index.html

Configuring a Match for Unreachable IPv6 ICMP Redirect Packets

 Configuring a Match for Unreachable IPv6 ICMP Redirect Packets 
POST http://<mgmt0_IP>/api/mo/sys/copp.json
{
  "coppEntity": {
    "children": [
      {
        "coppClass": {
          "attributes": {
            "cName": "CMAP",
            "flag": "no"
          },
          "children": [
            {
              "coppIpv6Icmp": {
                "attributes": {
                  "flag": "no",
                  "option": "unreachable"
}}}]}}]}}
{
    imdata:[]
}
<System>
  <copp-items>
    <classp-items>
      <Class-list>
        <cName>CMAP</cName>
        <flag>false</flag>
        <icmpv6-items>
          <Ipv6Icmp-list>
            <option>unreachable</option>
            <flag>false</flag>
          </Ipv6Icmp-list>
        </icmpv6-items>
      </Class-list>
    </classp-items>
  </copp-items>
</System>


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.

class-map type control-plane CMAP
 match exception ipv6 icmp 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/media/dme/index.html

Deleting a Match for Unreachable IPv6 ICMP Redirect Packets

 Deleting a Match for Unreachable IPv6 ICMP Redirect Packets 
DELETE http://<mgmt0_IP>/api/mo/sys/copp/classp-CMAP/icmpv6-redirect.json
{
    imdata:[]
}


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.

class-map type control-plane CMAP
 no match exception ipv6 icmp 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/media/dme/index.html

Configuring a Match for Exception Packets Failed in TTL

 Configuring a Match for Exception Packets Failed in TTL 
POST http://<mgmt0_IP>/api/mo/sys/copp.json
{
  "coppEntity": {
    "children": [
      {
        "coppClass": {
          "attributes": {
            "cName": "CMAP",
            "flag": "no"
          },
          "children": [
            {
              "coppExeOptions": {
                "attributes": {
                  "flag": "no",
                  "option": "ttl-failure"
}}}]}}]}}
{
    imdata:[]
}
<System>
  <copp-items>
    <classp-items>
      <Class-list>
        <cName>CMAP</cName>
        <flag>false</flag>
        <excep-items>
          <ExeOptions-list>
            <option>ttl-failure</option>
            <flag>false</flag>
          </ExeOptions-list>
        </excep-items>
      </Class-list>
    </classp-items>
  </copp-items>
</System>


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.

class-map type control-plane CMAP
 match exception ttl-failure

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/media/dme/index.html

Deleting a Match for Exception Packets Failed in TTL

 Deleting a Match for Exception Packets Failed in TTL 
DELETE http://<mgmt0_IP>/api/mo/sys/copp/classp-CMAP/excep-ttl-failure.json
{
    imdata:[]
}


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.

class-map type control-plane CMAP
 no match exception ttl-failure

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/media/dme/index.html

Configuring a Match for Glean Exception Packets

 Configuring a Match for Glean Exception Packets 
POST http://<mgmt0_IP>/api/mo/sys/copp.json
{
  "coppEntity": {
    "children": [
      {
        "coppClass": {
          "attributes": {
            "cName": "CMAP",
            "flag": "no"
          },
          "children": [
            {
              "coppExeOptions": {
                "attributes": {
                  "flag": "no",
                  "option": "glean"
}}}]}}]}}
{
    imdata:[]
}
<System>
  <copp-items>
    <classp-items>
      <Class-list>
        <cName>CMAP</cName>
        <flag>false</flag>
        <excep-items>
          <ExeOptions-list>
            <option>glean</option>
            <flag>false</flag>
          </ExeOptions-list>
        </excep-items>
      </Class-list>
    </classp-items>
  </copp-items>
</System>


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.

class-map type control-plane CMAP
 match exception glean

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/media/dme/index.html

Deleting a Match for Glean Exception Packets

 Deleting a Match for Glean Exception Packets 
DELETE http://<mgmt0_IP>/api/mo/sys/copp/classp-CMAP/excep-glean.json
{
    imdata:[]
}


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.

class-map type control-plane CMAP
 no match exception glean

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/media/dme/index.html

Configuring a Match for MTU-Failed Exception Packets

 Configuring a Match for MTU-Failed Exception Packets 
POST http://<mgmt0_IP>/api/mo/sys/copp.json
{
  "coppEntity": {
    "children": [
      {
        "coppClass": {
          "attributes": {
            "cName": "CMAP",
            "flag": "no"
          },
          "children": [
            {
              "coppExeOptions": {
                "attributes": {
                  "flag": "no",
                  "option": "mtu-failure"
}}}]}}]}}
{
    imdata:[]
}
<System>
  <copp-items>
    <classp-items>
      <Class-list>
        <cName>CMAP</cName>
        <flag>false</flag>
        <excep-items>
          <ExeOptions-list>
            <option>mtu-failure</option>
            <flag>false</flag>
          </ExeOptions-list>
        </excep-items>
      </Class-list>
    </classp-items>
  </copp-items>
</System>


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.

class-map type control-plane CMAP
 match exception mtu-failure

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/media/dme/index.html

Deleting a Match for MTU-Failed Exception Packets

 Deleting a Match for MTU-Failed Exception Packets 
DELETE http://<mgmt0_IP>/api/mo/sys/copp/classp-CMAP/excep-mtu-failure.json
{
    imdata:[]
}


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.

class-map type control-plane CMAP
 no match exception mtu-failure

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/media/dme/index.html

Configuring a Match for IPv4 Software NAT Flow Packets

 Configuring a Match for IPv4 Software NAT Flow Packets 
POST http://<mgmt0_IP>/api/mo/sys/copp.json
{
  "coppEntity": {
    "children": [
      {
        "coppClass": {
          "attributes": {
            "cName": "CMAP",
            "flag": "no"
          },
          "children": [
            {
              "coppExeOptions": {
                "attributes": {
                  "flag": "no",
                  "option": "nat-flow"
}}}]}}]}}
{
    imdata:[]
}
<System>
  <copp-items>
    <classp-items>
      <Class-list>
        <cName>CMAP</cName>
        <flag>false</flag>
        <excep-items>
          <ExeOptions-list>
            <option>nat-flow</option>
            <flag>false</flag>
          </ExeOptions-list>
        </excep-items>
      </Class-list>
    </classp-items>
  </copp-items>
</System>


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.

class-map type control-plane CMAP
 match exception nat-flow

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/media/dme/index.html

Deleting a Match for IPv4 Software NAT Flow Packets

 Deleting a Match for IPv4 Software NAT Flow Packets 
DELETE http://<mgmt0_IP>/api/mo/sys/copp/classp-CMAP/excep-nat-flow.json
{
    imdata:[]
}


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.

class-map type control-plane CMAP
 no match exception nat-flow

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/media/dme/index.html

Configuring a Match for Multicast RPF Check Failure Packets

 Configuring a Match for Multicast RPF Check Failure Packets 
POST http://<mgmt0_IP>/api/mo/sys/copp.json
{
  "coppEntity": {
    "children": [
      {
        "coppClass": {
          "attributes": {
            "cName": "CMAP",
            "flag": "no"
          },
          "children": [
            {
              "coppMulticast": {
                "attributes": {
                  "flag": "no",
                  "mcastOption": "rpf-failure"
}}}]}}]}}
{
    imdata:[]
}
<System>
  <copp-items>
    <classp-items>
      <Class-list>
        <cName>CMAP</cName>
        <flag>false</flag>
        <mcast-items>
          <Multicast-list>
            <mcastOption>rpf-failure</mcastOption>
            <flag>false</flag>
          </Multicast-list>
        </mcast-items>
      </Class-list>
    </classp-items>
  </copp-items>
</System>


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.

class-map type control-plane CMAP
 match exception multicast rpf-failure

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/media/dme/index.html

Deleting a Match for Multicast RPF Check Failure Packets

 Deleting a Match for Multicast RPF Check Failure Packets 
DELETE http://<mgmt0_IP>/api/mo/sys/copp/classp-CMAP/mcast-rpf-failure.json
{
    imdata:[]
}


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.

class-map type control-plane CMAP
 no match exception multicast rpf-failure

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/media/dme/index.html

Configuring a Match for Multicast SG RPF Check Failure Packets

 Configuring a Match for Multicast SG RPF Check Failure Packets 
POST http://<mgmt0_IP>/api/mo/sys/copp.json
{
  "coppEntity": {
    "children": [
      {
        "coppClass": {
          "attributes": {
            "cName": "CMAP",
            "flag": "no"
          },
          "children": [
            {
              "coppMulticast": {
                "attributes": {
                  "flag": "no",
                  "mcastOption": "sg-rpf-failure"
}}}]}}]}}
{
    imdata:[]
}
<System>
  <copp-items>
    <classp-items>
      <Class-list>
        <cName>CMAP</cName>
        <flag>false</flag>
        <mcast-items>
          <Multicast-list>
            <mcastOption>sg-rpf-failure</mcastOption>
            <flag>false</flag>
          </Multicast-list>
        </mcast-items>
      </Class-list>
    </classp-items>
  </copp-items>
</System>


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.

class-map type control-plane CMAP
 match exception multicast sg-rpf-failure

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/media/dme/index.html

Deleting a Match for Multicast SG RPF Check Failure Packets

 Deleting a Match for Multicast SG RPF Check Failure Packets 
DELETE http://<mgmt0_IP>/api/mo/sys/copp/classp-CMAP/mcast-sg-rpf-failure.json
{
    imdata:[]
}


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.

class-map type control-plane CMAP
 no match exception multicast sg-rpf-failure

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/media/dme/index.html

Configuring a Match for Layer 3 Multicast Destination Lookup Failures

 Configuring a Match for Layer 3 Multicast Destination Lookup Failures
POST http://<mgmt0_IP>/api/mo/sys/copp.json
{
  "coppEntity": {
    "children": [
      {
        "coppClass": {
          "attributes": {
            "cName": "CMAP",
            "flag": "no"
          },
          "children": [
            {
              "coppMulticast": {
                "attributes": {
                  "flag": "no",
                  "mcastOption": "dest-miss"
}}}]}}]}}
{
    imdata:[]
}
<System>
  <copp-items>
    <classp-items>
      <Class-list>
        <cName>CMAP</cName>
        <flag>false</flag>
        <mcast-items>
          <Multicast-list>
            <mcastOption>dest-miss</mcastOption>
            <flag>false</flag>
          </Multicast-list>
        </mcast-items>
      </Class-list>
    </classp-items>
  </copp-items>
</System>


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.

class-map type control-plane CMAP
 match exception multicast dest-miss

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/media/dme/index.html

Deleting a Match for Layer 3 Multicast Destination Lookup Failures

 Deleting a Match for Layer 3 Multicast Destination Lookup Failures 
DELETE http://<mgmt0_IP>/api/mo/sys/copp/classp-CMAP/mcast-dest-miss.json
{
    imdata:[]
}


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.

class-map type control-plane CMAP
 no match exception multicast dest-miss

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

Configuring a Match for IPv6 Multicast RPF Check Failures

 Configuring a Match for IPv6 Multicast RPF Check Failures 
POST http://<mgmt0_IP>/api/mo/sys/copp.json
{
  "coppEntity": {
    "children": [
      {
        "coppClass": {
          "attributes": {
            "cName": "CMAP",
            "flag": "no"
          },
          "children": [
            {
              "coppMulticast": {
                "attributes": {
                  "flag": "no",
                  "mcastOption": "ipv6-rpf-failure"
}}}]}}]}}
{
    imdata:[]
}
<System>
  <copp-items>
    <classp-items>
      <Class-list>
        <cName>CMAP</cName>
        <flag>false</flag>
        <mcast-items>
          <Multicast-list>
            <mcastOption>ipv6-rpf-failure</mcastOption>
            <flag>false</flag>
          </Multicast-list>
        </mcast-items>
      </Class-list>
    </classp-items>
  </copp-items>
</System>


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.

class-map type control-plane CMAP
 match exception multicast ipv6-rpf-failure

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/media/dme/index.html

Deleting a Match for IPv6 Multicast RPF Check Failures

 Deleting a Match for IPv6 Multicast RPF Check Failures 
DELETE http://<mgmt0_IP>/api/mo/sys/copp/classp-CMAP/mcast-ipv6-rpf-failure.json
{
    imdata:[]
}


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.

class-map type control-plane CMAP
 no match exception multicast ipv6-rpf-failure

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

Configuring a Match for IPv6 Multicast SG RPF Check Failures

 Configuring a Match for IPv6 Multicast SG RPF Check Failures 
POST http://<mgmt0_IP>/api/mo/sys/copp.json
{
  "coppEntity": {
    "children": [
      {
        "coppClass": {
          "attributes": {
            "cName": "CMAP",
            "flag": "no"
          },
          "children": [
            {
              "coppMulticast": {
                "attributes": {
                  "flag": "no",
                  "mcastOption": "ipv6-sg-rpf-failure"
}}}]}}]}}
{
    imdata:[]
}
<System>
  <copp-items>
    <classp-items>
      <Class-list>
        <cName>CMAP</cName>
        <flag>false</flag>
        <mcast-items>
          <Multicast-list>
            <mcastOption>ipv6-sg-rpf-failure</mcastOption>
            <flag>false</flag>
          </Multicast-list>
        </mcast-items>
      </Class-list>
    </classp-items>
  </copp-items>
</System>


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.

class-map type control-plane CMAP
 match exception multicast ipv6-sg-rpf-failure

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/media/dme/index.html

Deleting a Match for IPv6 Multicast SG RPF Check Failures

 Deleting a Match for IPv6 Multicast SG RPF Check Failures 
DELETE http://<mgmt0_IP>/api/mo/sys/copp/classp-CMAP/mcast-ipv6-sg-rpf-failure.json
{
    imdata:[]
}


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.

class-map type control-plane CMAP
 no match exception multicast ipv6-sg-rpf-failure

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

Configuring a Match for IPv6 L3 Multicast Destination Lookup Failures

 Configuring a Match for IPv6 L3 Multicast Destination Lookup Failures 
POST http://<mgmt0_IP>/api/mo/sys/copp.json
{
  "coppEntity": {
    "children": [
      {
        "coppClass": {
          "attributes": {
            "cName": "CMAP",
            "flag": "no"
          },
          "children": [
            {
              "coppMulticast": {
                "attributes": {
                  "flag": "no",
                  "mcastOption": "ipv6-dest-miss"
}}}]}}]}}
{
    imdata:[]
}
<System>
  <copp-items>
    <classp-items>
      <Class-list>
        <cName>CMAP</cName>
        <flag>false</flag>
        <mcast-items>
          <Multicast-list>
            <mcastOption>ipv6-dest-miss</mcastOption>
            <flag>false</flag>
          </Multicast-list>
        </mcast-items>
      </Class-list>
    </classp-items>
  </copp-items>
</System>


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.

class-map type control-plane CMAP
 match exception multicast ipv6-dest-miss

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/media/dme/index.html

Creating a Policy Map

Creating a Policy Map
POST http://<IP_Address>/api/node/mo/sys/copp/policy-[pmap1].json
{
  "coppPolicy": {
    "attributes": {
      "flag": "no",
      "name": "pmap1"
    },
    "children": [
      {
        "coppClassp": {
          "attributes": {
            "flag": "no",
            "name": "cmap1"
          },
          "children": [
            {
              "coppLogging": {
                "attributes": {
                  "levelRange": "2",
                  "threshold": "1345"
}}},{
              "coppSetCos": {
                "attributes": {
                  "cosVal": "3",
                  "flag": "no"
}}},{
              "coppPolicerAction": {
                "attributes": {
                  "burstC": "500",
                  "burstUnit": "packets",
                  "cirUnit": "pps",
                  "cirVal": "1345",
                  "conformAction": "transmit",
                  "flag": "no",
                  "violateAction": "drop"
}}}]}}]}}

This example creates a policy-map with class-map that sets the COS, has a logging action, and has a policing action.


CLI Commands

The CLI commands and options listed below are the equivalent to the payload example displayed in the pane on the right.

policy-map type control-plane pmap1
class cmap1
set cos 3
logging drop threshold 1345 level 2
police cir 1345 pps bc 500 packets conform transmit violate drop

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/

Deleting a Policy Map

Deleting a Policy Map
HTTP DELETE
http://<IP_Address>/api/node/mo/sys/copp/policy-[pmap1].json

This example deletes a policy map.

Creating a Service Policy

Creating a Service Policy
POST http://<IP_Address>/api/node/mo/sys/copp/service-[pmap1].json
{
  "coppService": {
    "attributes": {
      "name": "pmap1"
    }
  }
}
POST http://<IP_Address>/api/node/mo/sys/copp/service-[{service_policy_name}].json

This example creates a service policy.

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/

Deleting a Service Policy

Deleting a Service Policy
HTTP DELETE
http://<IP_Address>/api/node/mo/sys/copp/service-[pmap1].json

This example deletes a service policy.

Changing the Default CoPP Policy

Changing the Default CoPP Policy
POST http://<IP_Address>/api/node/mo/sys/copp/profile.json
{
  "coppProfile": {
    "attributes": {
      "prof": "moderate"
    }
  }
}

This example applies a moderate default CoPP policy.

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/

Applying a Scale Factor

Applying a Scale Factor
POST http://<IP_Address>/api/node/mo/sys/copp/scale-[1].json
{
  "coppScale": {
    "attributes": {
      "module": "1",
      "scaleVal": "1.3"
    }
  }
}

This example applies a scale factor.

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/

Deleting a Scale Factor

Deleting a Scale Factor
HTTP DELETE
http://<IP_Address>/api/node/mo/sys/copp/scale-[1].json