ec435b955c
* Changes to add template support for copp.json. This is needed so that we can install differnt type of Traps based on Device Role (Tor/Leaf/Mgmt/etc...). Initial use case is to install DHCP/DHCPv6 tarp only for tor router. Signed-off-by: Abhishek Dosi <abdosi@microsoft.com> * Fixed based on review comments. Signed-off-by: Abhishek Dosi <abdosi@microsoft.com> * Fixed based on review comment.
86 lines
2.2 KiB
Django/Jinja
86 lines
2.2 KiB
Django/Jinja
[
|
|
{
|
|
"COPP_TABLE:default": {
|
|
"queue": "0",
|
|
"meter_type":"packets",
|
|
"mode":"sr_tcm",
|
|
"cir":"600",
|
|
"cbs":"600",
|
|
"red_action":"drop"
|
|
},
|
|
"OP": "SET"
|
|
},
|
|
{
|
|
"COPP_TABLE:trap.group.bgp.lacp": {
|
|
"trap_ids": "bgp,bgpv6,lacp",
|
|
"trap_action":"trap",
|
|
"trap_priority":"4",
|
|
"queue": "4"
|
|
},
|
|
"OP": "SET"
|
|
},
|
|
{
|
|
"COPP_TABLE:trap.group.arp": {
|
|
"trap_ids": "arp_req,arp_resp,neigh_discovery",
|
|
"trap_action":"copy",
|
|
"trap_priority":"4",
|
|
"queue": "4",
|
|
"meter_type":"packets",
|
|
"mode":"sr_tcm",
|
|
"cir":"600",
|
|
"cbs":"600",
|
|
"red_action":"drop"
|
|
},
|
|
"OP": "SET"
|
|
},
|
|
{% if DEVICE_METADATA is defined and DEVICE_METADATA['localhost'] is defined and DEVICE_METADATA['localhost']['type'] is defined and DEVICE_METADATA['localhost']['type'] != "ToRRouter" %}
|
|
{
|
|
"COPP_TABLE:trap.group.lldp.udld": {
|
|
"trap_ids": "lldp,udld",
|
|
"trap_action":"trap",
|
|
"trap_priority":"4",
|
|
"queue": "4"
|
|
},
|
|
"OP": "SET"
|
|
},
|
|
{% else %}
|
|
{
|
|
"COPP_TABLE:trap.group.lldp.dhcp.dhcpv6.udld": {
|
|
"trap_ids": "lldp,dhcp,dhcpv6,udld",
|
|
"trap_action":"trap",
|
|
"trap_priority":"4",
|
|
"queue": "4"
|
|
},
|
|
"OP": "SET"
|
|
},
|
|
{% endif %}
|
|
{
|
|
"COPP_TABLE:trap.group.ip2me": {
|
|
"trap_ids": "ip2me",
|
|
"trap_action":"trap",
|
|
"trap_priority":"1",
|
|
"queue": "1",
|
|
"meter_type":"packets",
|
|
"mode":"sr_tcm",
|
|
"cir":"6000",
|
|
"cbs":"6000",
|
|
"red_action":"drop"
|
|
},
|
|
"OP": "SET"
|
|
},
|
|
{
|
|
"COPP_TABLE:trap.group.nat": {
|
|
"trap_ids": "src_nat_miss,dest_nat_miss",
|
|
"trap_action":"trap",
|
|
"trap_priority":"1",
|
|
"queue": "1",
|
|
"meter_type":"packets",
|
|
"mode":"sr_tcm",
|
|
"cir":"600",
|
|
"cbs":"600",
|
|
"red_action":"drop"
|
|
},
|
|
"OP": "SET"
|
|
}
|
|
]
|