Skip to content
Ask AI

COPP-Netconf

YANG Pathget/get-configedit-configrpc
/clear-counters-copp——Y
/copps/{name}Ymerge, replace, create, delete—
/show-counters-copp——Y

This chapter provides examples on how to use Netconf to manage COPP configurations on AsterNOS devices.

The default COPP entries are pre-configured on device.

Request example to get all copp entry via get-config.

<filter type="subtree">
<top>
<copps>
</copps>
</top>
</filter>

Response example

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:99ba9bb2-7b1f-4b7a-b21b-b9dc21557722">
<data>
<top>
<copps xmlns="http://asterfusion.com/ns/yang/asternos-copp">
<copp>
<name>acl</name>
<trap-action>trap</trap-action>
<cir>1250</cir>
</copp>
<copp>
<name>default</name>
<trap-action>trap</trap-action>
<cir>2500</cir>
</copp>
<copp>
<name>mtu_error</name>
<trap-action>drop</trap-action>
<cir>150</cir>
</copp>
<copp>
<name>ttl_error</name>
<trap-action>trap</trap-action>
<cir>150</cir>
</copp>
<copp>
<name>iccp</name>
<trap-action>trap</trap-action>
<cir>3750</cir>
</copp>
<copp>
<name>ip2me</name>
<trap-action>trap</trap-action>
<cir>2500</cir>
</copp>
<copp>
<name>snmp</name>
<trap-action>trap</trap-action>
<cir>2500</cir>
</copp>
<copp>
<name>ssh</name>
<trap-action>trap</trap-action>
<cir>3750</cir>
</copp>
<copp>
<name>telnet</name>
<trap-action>trap</trap-action>
<cir>2500</cir>
</copp>
<copp>
<name>igmp</name>
<trap-action>trap</trap-action>
<cir>1250</cir>
</copp>
<copp>
<name>mld</name>
<trap-action>trap</trap-action>
<cir>1250</cir>
</copp>
<copp>
<name>pim</name>
<trap-action>trap</trap-action>
<cir>1250</cir>
</copp>
<copp>
<name>ptp</name>
<trap-action>trap</trap-action>
<cir>1250</cir>
</copp>
<copp>
<name>sample_packet</name>
<trap-action>trap</trap-action>
<cir>1250</cir>
</copp>
<copp>
<name>dhcp</name>
<trap-action>copy</trap-action>
<cir>4500</cir>
</copp>
<copp>
<name>dhcpv6</name>
<trap-action>copy</trap-action>
<cir>4500</cir>
</copp>
<copp>
<name>bgp</name>
<trap-action>trap</trap-action>
<cir>4500</cir>
</copp>
<copp>
<name>isis</name>
<trap-action>trap</trap-action>
<cir>1250</cir>
</copp>
<copp>
<name>lbdt</name>
<trap-action>copy</trap-action>
<cir>125</cir>
</copp>
<copp>
<name>lldp</name>
<trap-action>trap</trap-action>
<cir>400</cir>
</copp>
<copp>
<name>arp</name>
<trap-action>copy</trap-action>
<cir>4500</cir>
</copp>
<copp>
<name>icmp</name>
<trap-action>trap</trap-action>
<cir>1250</cir>
</copp>
<copp>
<name>ndp</name>
<trap-action>copy</trap-action>
<cir>4500</cir>
</copp>
<copp>
<name>eapol</name>
<trap-action>trap</trap-action>
<cir>1000</cir>
</copp>
<copp>
<name>lacp</name>
<trap-action>trap</trap-action>
<cir>800</cir>
</copp>
<copp>
<name>ldp</name>
<trap-action>copy</trap-action>
<cir>4500</cir>
</copp>
<copp>
<name>snp</name>
<trap-action>trap</trap-action>
<cir>4500</cir>
</copp>
<copp>
<name>stp</name>
<trap-action>trap</trap-action>
<cir>800</cir>
</copp>
<copp>
<name>bfd</name>
<trap-action>trap</trap-action>
<cir>2000</cir>
</copp>
<copp>
<name>bfdv6</name>
<trap-action>trap</trap-action>
<cir>2000</cir>
</copp>
<copp>
<name>ospf</name>
<trap-action>trap</trap-action>
<cir>4500</cir>
</copp>
<copp>
<name>ospfv6</name>
<trap-action>trap</trap-action>
<cir>4500</cir>
</copp>
<copp>
<name>vrrp</name>
<trap-action>copy</trap-action>
<cir>1250</cir>
</copp>
<copp>
<name>vrrpv6</name>
<trap-action>copy</trap-action>
<cir>1250</cir>
</copp>
</copps>
</top>
</data>
</rpc-reply>

Request example to create user copp entry via edit-config.

<config><top>
<copps>
<copp operation="create">
<name>lldp</name>
<trap-action>trap</trap-action>
<cir>3000</cir>
</copp>
</copps>
</top></config>

Response example

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:8a106b86-2889-4d07-81cf-622baea503ed">
<ok/>
</rpc-reply>

Request example to modify copp entry via edit-config.

<config><top>
<copps>
<copp>
<name>lldp</name>
<trap-action>trap</trap-action>
<cir>4000</cir>
</copp>
</copps>
</top></config>

Response example

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:162dc446-c70d-4189-8634-68e9bfe0bbdb">
<ok/>
</rpc-reply>

Only user copp entries can be deleted, default copp entries cannot be deleted. Deleting the configuration only restores the copp entry to its default state.

Request example to delete user copp entry via edit-config.

<config><top>
<copps>
<copp operation="delete">
<name>lldp</name>
</copp>
</copps>
</top></config>

Response example

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:091c6864-6f3a-4d0d-960b-18a8876fac59">
<ok/>
</rpc-reply>

Request example to show copp statistics via rpc show-counters-copp

<show-counters-copp>
</show-counters-copp>

Response example

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:f12093ab-b235-4b02-8700-512c06d2ac04">
<data xmlns="http://asterfusion.com/ns/yang/asternos-copp">
PROTOCOL Total/pkts Trap/pkts Trap/pps Drop/pkts Drop/pps
------------- ------------ ----------- ---------- ----------- ----------
acl 0 0 0.00 0 0.00
default 0 0 0.00 0 0.00
mtu_error 0 0 0.00 0 0.00
ttl_error 0 0 0.00 0 0.00
ip2me 0 0 0.00 0 0.00
snmp 0 0 0.00 0 0.00
ssh 0 0 0.00 0 0.00
telnet 0 0 0.00 0 0.00
igmp 0 0 0.00 0 0.00
mld 2 2 0.00 0 0.00
pim 0 0 0.00 0 0.00
ptp 0 0 0.00 0 0.00
sample_packet 0 0 0.00 0 0.00
dhcp 0 0 0.00 0 0.00
dhcpv6 0 0 0.00 0 0.00
bgp 0 0 0.00 0 0.00
isis 0 0 0.00 0 0.00
lbdt 0 0 0.00 0 0.00
lldp 86 86 0.50 0 0.00
arp 0 0 0.00 0 0.00
icmp 0 0 0.00 0 0.00
ndp 0 0 0.00 0 0.00
eapol 0 0 0.00 0 0.00
iccp 0 0 0.00 0 0.00
lacp 0 0 0.00 0 0.00
ldp 0 0 0.00 0 0.00
snp 0 0 0.00 0 0.00
stp 0 0 0.00 0 0.00
bfd 0 0 0.00 0 0.00
bfdv6 0 0 0.00 0 0.00
ospf 0 0 0.00 0 0.00
ospfv6 0 0 0.00 0 0.00
vrrp 0 0 0.00 0 0.00
vrrpv6 0 0 0.00 0 0.00
Total 88 88 0.50 0 0.00
</data>
</rpc-reply>

Request example to clear copp statistics via rpc clear-counters-copp

<clear-counters-copp>
</clear-counters-copp>

Response example

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:9b857956-60c2-4764-93fb-6cce03011bdc">
<data xmlns="http://asterfusion.com/ns/yang/asternos-copp">Clear and update saved counters
</data>
</rpc-reply>

Tree Diagram

module: asternos-copp
+--rw copps
+--rw copp* [name]
+--rw name copp-packet-type
+--ro trap-ids* identityref
+--rw trap-action copp-packet-action
+--ro trap-priority? uint8
+--ro queue? uint8
+--ro mode? traffic-behavior:policy-mode
+--ro meter-type? traffic-behavior:meter-type
+--ro cbs? uint32
+--rw cir uint32
+--ro red-packet-action? copp-packet-action

Table of Properties

NameRequiredType/RangeDescription
coppsMPath-only node, has no configurable value.
COPP group configuration
coppMPath-only node, has no configurable value.
List of COPP group
nameO”acl"
"arp"
"bfd"
"bfdv6"
"bgp"
"default"
"dhcp"
"dhcpv6"
"eapol"
"ftp"
"iccp"
"icmp"
"igmp"
"ip2me"
"isis"
"mtu_error"
"lacp"
"ldp"
"lldp"
"mld"
"ndp"
"ospf"
"ospfv6"
"pim"
"ptp"
"sample_packet"
"snmp"
"snp"
"ssh"
"stp"
"telnet"
"tftp"
"ttl_error"
"vrrp"
"vrrpv6"
"lbdt”
COPP group class name
trap-idsRO”stp"
"mld_v2_report"
"acl"
"arp_resp"
"eapol"
"telnet"
"bfdv6"
"ip2me"
"ttl_error"
"igmp_leave"
"ospfv6"
"mld_v1_v2"
"bgp"
"igmp_query"
"lacp"
"igmp_v1_report"
"ssh"
"sample_packet"
"ospf"
"bfd"
"tftp"
"dhcp"
"bgpv6"
"ptp"
"vrrpv6"
"snmp"
"isis"
"mld_v1_report"
"ldp"
"icmp_echo"
"mld_v1_done"
"arp_req"
"vrrp"
"igmp_v2_report"
"l3_mtu_error"
"igmp_v3_report"
"neigh_discovery"
"lldp"
"iccp"
"snp"
"lbdt"
"dhcpv6"
"pim"
"ftp”
Name of trap ids
trap-actionM”drop"
"trap"
"copy"
"forward”
COPP trap action refers to how a network device responds when it detects traffic that exceeds the configured limits or matches specific policies
trap-priorityROintegerTrap priority
queueRO0..7CPU Rx queue
modeROtraffic-behavior:policy-modePolicer mode
meter-typeROtraffic-behavior:meter-typePolicer meter type
cbsROintegerCommitted burst size for the dual-rate token bucket policer.

This value represents the depth of the token bucket.
cirM125..10000Committed information rate for the dual-rate token bucket policer.

This value represents the rate at which tokens are added to the primary bucket.
red-packet-actionRO”drop"
"trap"
"copy"
"forward”
Red packet action refers to a specific action taken when packets that are deemed critical or potentially harmful are detected

Tree Diagram

module: asternos-copp
rpcs:
+---x clear-counters-copp
+--ro output
+--ro data? <anydata>

Table of Properties

NameRequiredType/RangeDescription
clear-counters-coppO
dataODisplay the clear counters copp result.

Tree Diagram

module: asternos-copp
rpcs:
+---x show-counters-copp
+---w input
| +---w packet-type? copp-packet-type
+--ro output
+--ro data? <anydata>

Table of Properties

NameRequiredType/RangeDescription
show-counters-coppO
packet-typeO”acl"
"arp"
"bfd"
"bfdv6"
"bgp"
"default"
"dhcp"
"dhcpv6"
"eapol"
"ftp"
"iccp"
"icmp"
"igmp"
"ip2me"
"isis"
"mtu_error"
"lacp"
"ldp"
"lldp"
"mld"
"ndp"
"ospf"
"ospfv6"
"pim"
"ptp"
"sample_packet"
"snmp"
"snp"
"ssh"
"stp"
"telnet"
"tftp"
"ttl_error"
"vrrp"
"vrrpv6"
"lbdt”
type of packet.
dataODisplay the copp counters of each protocol.

PROTOCOL Total/pkts Trap/pkts Trap/pps Drop/pkts Drop/pps

------------- ------------ ----------- ---------- ----------- ---------- mtu_error 0 0 0 0 0 ttl_error 0 0 0 0 0 acl 0 0 0 0 0