88e94d3957
- Why I did it Currently dhcp packets are disabled by the COPP manager for non ToRRouter type switches. Even if the feature is enabled, DHCP packets wont hook to the CPU since the COPP manager will not trap this packets. This change is to disable dhcp_relay by default for non ToRRouter switches from init_cfg.json. With this approach, if the user want to enable the feature for non ToRRouter switches, manual enablement is required by the 'feature' configuration. This is to keep the current approach for MSFT production issue with dhcp relay for non ToRRouter switched and allow the user to decide if to use it or not. - How I did it Configure dhcp_relay 'disabled' by default on init_cfg.json for non ToRRouter switches. Remove the exclusion of dhcp packets on copp_cfg.json - How to verify it Enable dhcp_relay feature on a non ToRRouter switch. Unit-tests modified so the default values on mocked CONFIG DB in 'test_vectors.py' for dhcp_relay will be 'disabled'. This is by the change for 'init_cfg.json.j2'. For ToRRouter the state will change from 'disabled' to 'enabled'. Another test case added for a 'ToR' switch type, this is to test the state is 'enabled' if the user configured it to be so.
104 lines
2.2 KiB
Django/Jinja
Executable File
104 lines
2.2 KiB
Django/Jinja
Executable File
{
|
|
"COPP_GROUP": {
|
|
"default": {
|
|
"queue": "0",
|
|
"meter_type":"packets",
|
|
"mode":"sr_tcm",
|
|
"cir":"600",
|
|
"cbs":"600",
|
|
"red_action":"drop"
|
|
},
|
|
"queue4_group1": {
|
|
"trap_action":"trap",
|
|
"trap_priority":"4",
|
|
"queue": "4"
|
|
},
|
|
"queue4_group2": {
|
|
"trap_action":"copy",
|
|
"trap_priority":"4",
|
|
"queue": "4",
|
|
"meter_type":"packets",
|
|
"mode":"sr_tcm",
|
|
"cir":"600",
|
|
"cbs":"600",
|
|
"red_action":"drop"
|
|
},
|
|
"queue4_group3": {
|
|
"trap_action":"trap",
|
|
"trap_priority":"4",
|
|
"queue": "4"
|
|
},
|
|
"queue1_group1": {
|
|
"trap_action":"trap",
|
|
"trap_priority":"1",
|
|
"queue": "1",
|
|
"meter_type":"packets",
|
|
"mode":"sr_tcm",
|
|
"cir":"6000",
|
|
"cbs":"6000",
|
|
"red_action":"drop"
|
|
},
|
|
"queue1_group2": {
|
|
"trap_action":"trap",
|
|
"trap_priority":"1",
|
|
"queue": "1",
|
|
"meter_type":"packets",
|
|
"mode":"sr_tcm",
|
|
"cir":"600",
|
|
"cbs":"600",
|
|
"red_action":"drop"
|
|
},
|
|
"queue2_group1": {
|
|
"cbs": "1000",
|
|
"cir": "1000",
|
|
"genetlink_mcgrp_name": "packets",
|
|
"genetlink_name": "psample",
|
|
"meter_type": "packets",
|
|
"mode": "sr_tcm",
|
|
"queue": "2",
|
|
"red_action": "drop",
|
|
"trap_action": "trap",
|
|
"trap_priority": "1"
|
|
|
|
}
|
|
},
|
|
"COPP_TRAP": {
|
|
"bgp": {
|
|
"trap_ids": "bgp,bgpv6",
|
|
"trap_group": "queue4_group1"
|
|
},
|
|
"lacp": {
|
|
"trap_ids": "lacp",
|
|
"trap_group": "queue4_group1"
|
|
},
|
|
"arp": {
|
|
"trap_ids": "arp_req,arp_resp,neigh_discovery",
|
|
"trap_group": "queue4_group2"
|
|
},
|
|
"lldp": {
|
|
"trap_ids": "lldp",
|
|
"trap_group": "queue4_group3"
|
|
},
|
|
"dhcp_relay": {
|
|
"trap_ids": "dhcp,dhcpv6",
|
|
"trap_group": "queue4_group3"
|
|
},
|
|
"udld": {
|
|
"trap_ids": "udld",
|
|
"trap_group": "queue4_group3"
|
|
},
|
|
"ip2me": {
|
|
"trap_ids": "ip2me",
|
|
"trap_group": "queue1_group1"
|
|
},
|
|
"nat": {
|
|
"trap_ids": "src_nat_miss,dest_nat_miss",
|
|
"trap_group": "queue1_group2"
|
|
},
|
|
"sflow": {
|
|
"trap_group": "queue2_group1",
|
|
"trap_ids": "sample_packet"
|
|
}
|
|
}
|
|
}
|