sonic-buildimage/files/image_config
prabhataravind 7e49530459
[copp]: Enable rate limiting for bgp, lacp, dhcp, lldp, macsec and udld (#14859)
Why I did it
It was observed that a flood of DHCP packets without rate-limiting can cause BGP flaps or lacp keepalive losses.
This change attempts to prevent or reduce such BGP flaps by enabling appropriate rate-limiting in SONiC for all traffic types.

Work item tracking
Microsoft ADO 17964421:

How I did it
Set a reasonable CIR/CBS value of 300 for queue4_group3 (dhcp, lldp, macsec) and 6000 for queue4_group1.
The value 300 was arrived at after testing with dhcp flooding using ptf (using multiple threads). Throttling at this rate was necessary to ensure that dhcp flooding does not cause BGP flaps.

How to verify it
Verified with this script running from ptf, that BGP flaps don't happen when CBS/CIR is set at 300 for queue4_group3.

 import threading
 from scapy.all import *
 
 def send_dhcp_discover(intf):
     dhcp_discover = Ether(dst='ff:ff:ff:ff:ff:ff',src=RandMAC()) \
                         /IP(src='1.1.1.1',dst='255.255.255.255') \
                         /UDP(sport=68,dport=67) \
                         /DHCP(options=[('message-type','discover'),('end')])
     sendp(dhcp_discover,count=100000,iface=intf)
 
 
 if __name__ == "__main__":
     t1 = threading.Thread(target=send_dhcp_discover, args=("eth1",))
     t2 = threading.Thread(target=send_dhcp_discover, args=("eth2",))
     t1.start()
     t2.start()
     t1.join()
     t2.join()

Verified on Arista-7260CX3-D108C8 running 202012 that the copp rule for queue4_group1 and queue4_group3 do NOT affect BGP packets. To verify this using PTF, the copp rules were modified to set the "CBS" and "CIR" for queue4_group1 and queue4_group3 at 600pps and 50k packets each of "BGP open" and "DHCP Discover" were simultaneously sent from the same PTF port to the DUT. It was verified using "show c cpu" that packets are hitting the cpu queue at 1200 pps (double the configured CIR/CBS for these packet types). This helped conclude that throttling rate is per trap (or packet type) and not per queue.

Verified with updated sonic-mgmt tests ([tests/copp]: Update copp mgmt tests to support new rate-limits sonic-mgmt#8199) on broadcom and mellanox platforms that these traffic types are rate-limited.

Signed-off-by: Prabhat Aravind <paravind@microsoft.com>
2023-10-25 10:49:24 -07:00
..
backend_acl [storage_backend] Add backend acl service (#14229) 2023-03-16 14:18:28 -07:00
bash Close console session due to user inactivity (#9890) 2022-02-02 09:41:21 +05:30
config-chassisdb [ChassisDB]: bring up ChassisDB service (#5283) 2020-10-14 15:15:24 -07:00
config-setup Fix CONFIG_DB_INITIALIZED flag check logic and set/reset flag for warmboot (#15685) 2023-08-04 16:00:26 -07:00
config-topology Add support for platform topology configuration service (#12066) 2023-02-01 12:53:45 -08:00
constants Add BGP configuration for BGPSentinel peer (#15714) 2023-07-21 09:32:29 +08:00
copp [copp]: Enable rate limiting for bgp, lacp, dhcp, lldp, macsec and udld (#14859) 2023-10-25 10:49:24 -07:00
corefile_uploader Replace os.system and remove subprocess with shell=True (#12177) 2022-11-04 10:48:51 -04:00
cron.d Replace logrotate cron file with (adapted) systemd timer file (#12921) 2022-12-08 14:13:11 -08:00
ebtables [baseimage]: Updates for Ebtables and support for multi-asic (#6542) 2021-01-27 08:36:10 -08:00
environment Update azure.github.io links to sonic-net.github.io (#12209) 2022-10-02 14:02:10 +08:00
fstrim [202012][fstrim] delay fstrim timer after sonic.target (#8737) 2021-09-13 07:37:46 -07:00
hostname Fix to improve hostname handling (#12064) 2022-10-25 14:51:02 -07:00
interfaces Fix potentially not having any loopback address on lo interface (#16490) 2023-09-14 12:55:50 -07:00
kdump [kdump] Fix kdump error message when a reboot is issued (#7985) 2021-07-01 11:52:38 -07:00
kubernetes [k8master]: Install nc cmd for k8s master network issue debug (#16745) 2023-09-30 01:16:51 -07:00
logrotate update rsyslog log size conf (#15821) 2023-07-14 15:44:17 +08:00
misc [docker-wait-any]: Exit worker thread if main thread is expected to exit (#12255) 2022-10-05 18:14:10 -07:00
monit [memory_checker] Add a specific log message in a case when the docker service is not running. (#16018) 2023-08-31 11:28:20 -07:00
ntp Finalize fast-reboot in warmboot finalizer (#14238) 2023-04-09 16:59:15 +03:00
pcie-check Support multiple pcie configuration file and change the pcie status table name to match with pcied changes (#7886) 2021-06-16 16:05:48 -07:00
platform Add override_config to load_minigraph in config-setup service (#14834) 2023-05-10 11:54:33 -07:00
rasdaemon [image_config] add rasdaemon.timer (#14300) 2023-04-17 08:58:45 -07:00
readline Disable brackted-paste mode off by default (#12285) 2022-10-06 07:55:09 -07:00
reset-factory Support Reset factory (#14105) 2023-07-11 16:14:17 -07:00
resolv-config [dns] Add support for static DNS configuration. (#14549) 2023-06-22 19:12:30 +03:00
rsyslog Add special rsyslog filter for MSN2700 platform (#16684) 2023-10-24 17:54:44 +03:00
secureboot Add override_config to load_minigraph in config-setup service (#14834) 2023-05-10 11:54:33 -07:00
snmp mvrf_avoid_snmp_yml_config: made changes to pass SNMP config from con… (#4057) 2020-01-28 17:41:21 -08:00
sudoers Improve sudo cat command for RO user. (#14428) 2023-03-27 17:08:14 -07:00
sysctl [netlink] Increse netlink buffer size from 3MB to 16MB (#13965) 2023-02-27 15:41:22 -08:00
syslog [baseimage]: /host unmount timeout issue during reboot. (#5032) 2020-07-25 01:27:58 -07:00
system-health [system-health] Add support for monitoring system health (#4835) 2020-10-12 11:12:49 +03:00
systemd Fix issue: systemctl daemon-reload would sporadically cause udev handler fail (#15253) 2023-06-25 16:58:14 -07:00
topology [multi-asic][vs]: Update topology script to retrieve hwsku from minigraph (#6219) 2021-02-18 22:02:29 -08:00
updategraph Remove minigraph loading in updategraph script (#11146) 2022-06-21 08:57:57 +08:00
warmboot-finalizer Fix CONFIG_DB_INITIALIZED flag check logic and set/reset flag for warmboot (#15685) 2023-08-04 16:00:26 -07:00
watchdog-control [sonic-utilities] Build and install as a Python wheel package (#5409) 2020-09-20 20:16:42 -07:00