mirror_frr/bgpd
Anuradha Karuppiah 74e2bd891d bgpd: support for DF election in EVPN-MH
DF (Designated forwarder) election is used for picking a single
BUM-traffic forwarded per-ES. RFC7432 specifies a mechanism called
service carving for DF election. However that mechanism has many
disadvantages -
1. LBs poorly.
2. Doesn't allow for a controlled failover needed in upgrade
scenarios.
3. Not easy to hw accelerate.

To fix the poor performance of service carving alternate DF mechanisms
have been proposed via the following drafts -
draft-ietf-bess-evpn-df-election-framework
draft-ietf-bess-evpn-pref-df

This commit adds support for the pref-df election mechanism which
is used as the default. Other mechanisms including service-carving
may be added later.

In this mechanism one switch on an ES is elected as DF based on the
preference value; higher preference wins with IP address acting
as the tie-breaker (lower-IP wins if pref value is the same).

Sample output
=============
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
torm-11# sh bgp l2vpn evpn es 03:00:00:00:00:01:11:00:00:01
ESI: 03:00:00:00:00:01:11:00:00:01
 Type: LR
 RD: 27.0.0.15:6
 Originator-IP: 27.0.0.15
 Local ES DF preference: 100
 VNI Count: 10
 Remote VNI Count: 10
 Inconsistent VNI VTEP Count: 0
 Inconsistencies: -
 VTEPs:
  27.0.0.16 flags: EA df_alg: preference df_pref: 32767
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
torm-11# sh bgp l2vpn evpn route esi 03:00:00:00:00:01:11:00:00:01
*> [4]:[03:00:00:00:00:01:11:00:00:01]:[32]:[27.0.0.15]
                    27.0.0.15                          32768 i
                    ET:8 ES-Import-Rt:00:00:00:00:01:11 DF: (alg: 2, pref: 100)
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
2020-10-26 10:26:21 -07:00
..
rfapi * : update signature of thread_cancel api 2020-10-23 08:59:34 -04:00
rfp-example Treewide: use ANSI function definitions 2019-01-24 11:21:59 +01:00
.gitignore *: cleanup .gitignore files 2018-09-08 21:30:42 +02:00
bgp_addpath_types.h bgpd: Re-use TX Addpath IDs where possible 2018-11-10 00:16:36 +00:00
bgp_addpath.c bgp: rename bgp_node to bgp_dest 2020-06-23 17:32:52 +02:00
bgp_addpath.h bgp: rename bgp_node to bgp_dest 2020-06-23 17:32:52 +02:00
bgp_advertise.c bgp: rename bgp_node to bgp_dest 2020-06-23 17:32:52 +02:00
bgp_advertise.h bgp: rename bgp_node to bgp_dest 2020-06-23 17:32:52 +02:00
bgp_aspath.c *: un-split strings across lines 2020-07-14 10:37:25 +02:00
bgp_aspath.h Merge pull request #5954 from ton31337/feature/rfc7607 2020-03-17 10:27:35 -04:00
bgp_attr_evpn.c bgpd: support for DF election in EVPN-MH 2020-10-26 10:26:21 -07:00
bgp_attr_evpn.h bgpd: support for DF election in EVPN-MH 2020-10-26 10:26:21 -07:00
bgp_attr.c bgpd: support for DF election in EVPN-MH 2020-10-26 10:26:21 -07:00
bgp_attr.h bgpd: support for DF election in EVPN-MH 2020-10-26 10:26:21 -07:00
bgp_bfd.c :* Convert prefix2str to %pFX 2020-10-22 09:07:41 +03:00
bgp_bfd.h bgpd: Convert lots of int type functions to bool/void 2020-03-21 14:59:18 +02:00
bgp_bmp.c bgpd: Prevent Null pointer usage 2020-07-27 06:59:45 -04:00
bgp_bmp.h bgpd: More bgp_node -> bgp_dest cleanup 2020-10-17 08:52:35 -04:00
bgp_btoa.c bgpd: Convert inet_ntoa to %pI4/inet_ntop 2020-10-18 11:22:30 +03:00
bgp_clist.c bgpd: correct community-list replace logic 2020-09-12 06:17:32 -07:00
bgp_clist.h bgpd, lib: Use bool instead of uint8_t for community/prefix-list "any" 2020-04-16 15:27:51 +03:00
bgp_community.c bgpd: Fix "malformed communities" for accept-own-nexthop 2020-05-29 14:36:07 -04:00
bgp_community.h bgpd: Use COMMUNITY_SIZE instead of just 4 2020-04-08 18:09:25 +03:00
bgp_damp.c * : update signature of thread_cancel api 2020-10-23 08:59:34 -04:00
bgp_damp.h bgpd: show < ip > bgp < ipv4 | ipv6 > all 2020-09-03 20:26:07 +05:30
bgp_debug.c :* Convert prefix2str to %pFX 2020-10-22 09:07:41 +03:00
bgp_debug.h bgpd: debug flags for MH 2020-08-05 06:46:12 -07:00
bgp_dump.c * : update signature of thread_cancel api 2020-10-23 08:59:34 -04:00
bgp_dump.h bgpd: hook for bgp peer status change events 2019-08-13 11:59:27 -07:00
bgp_ecommunity.c bgpd: support for DF election in EVPN-MH 2020-10-26 10:26:21 -07:00
bgp_ecommunity.h bgpd: support for DF election in EVPN-MH 2020-10-26 10:26:21 -07:00
bgp_encap_tlv.c *: remove null check before XFREE 2019-02-25 23:00:46 +00:00
bgp_encap_tlv.h
bgp_encap_types.h *: use C99 standard fixed-width integer types 2018-03-27 15:13:34 -04:00
bgp_errors.c bgpd: Add a better breadcrumb for when bgp is missconfiged 2020-02-19 10:52:14 -05:00
bgp_errors.h bgpd: Add a better breadcrumb for when bgp is missconfiged 2020-02-19 10:52:14 -05:00
bgp_evpn_mh.c bgpd: support for DF election in EVPN-MH 2020-10-26 10:26:21 -07:00
bgp_evpn_mh.h bgpd: support for DF election in EVPN-MH 2020-10-26 10:26:21 -07:00
bgp_evpn_private.h bgpd: support for DF election in EVPN-MH 2020-10-26 10:26:21 -07:00
bgp_evpn_vty.c bgpd: support for DF election in EVPN-MH 2020-10-26 10:26:21 -07:00
bgp_evpn_vty.h bgpd: numerical evpn type support to debug commands 2020-10-13 16:13:16 -04:00
bgp_evpn.c :* Convert prefix2str to %pFX 2020-10-22 09:07:41 +03:00
bgp_evpn.h bgpd: replace bgp_evpn_route2str with prefix2str 2020-10-16 11:54:30 +01:00
bgp_filter.c bgpd: print error when as-path filter doesn't exist 2020-10-14 23:10:48 +03:00
bgp_filter.h bgpd: Convert lots of int type functions to bool/void 2020-03-21 14:59:18 +02:00
bgp_flowspec_private.h bgpd, lib: support for flow_label flowspec type 2020-08-21 13:37:08 +02:00
bgp_flowspec_util.c :* Convert prefix2str to %pFX 2020-10-22 09:07:41 +03:00
bgp_flowspec_util.h bgpd: ipv6 flowspec address decoding and validation 2020-08-21 13:37:08 +02:00
bgp_flowspec_vty.c bgpd: Remove dest variable from route_out_vty_flowspec 2020-09-24 08:20:24 -04:00
bgp_flowspec.c bgpd, lib: support for flow_label flowspec type 2020-08-21 13:37:08 +02:00
bgp_flowspec.h bgpd: flowspec code support for ipv6 2020-08-21 13:37:08 +02:00
bgp_fsm.c *: unify thread/event cancel macros 2020-10-23 12:16:52 -04:00
bgp_fsm.h *: unify thread/event cancel macros 2020-10-23 12:16:52 -04:00
bgp_io.c Merge pull request #7194 from qlyoung/tracing 2020-10-24 16:50:35 -04:00
bgp_io.h bgpd: raise default & max r/w quanta to 64 2019-10-14 18:41:53 +00:00
bgp_keepalives.c *: generously apply const 2019-12-02 15:01:29 +01:00
bgp_keepalives.h
bgp_label.c :* Convert prefix2str to %pFX 2020-10-22 09:07:41 +03:00
bgp_label.h bgp: rename bgp_node to bgp_dest 2020-06-23 17:32:52 +02:00
bgp_labelpool.c lib, zebra: support label chunk requests for SRGB 2019-07-10 15:20:27 +02:00
bgp_labelpool.h bgpd: replace label pool fifo with DECLARE_LIST 2019-04-27 19:33:45 +02:00
bgp_lcommunity.c bgpd: Check to ensure community attributes exist before freeing them 2020-05-05 15:59:38 -04:00
bgp_lcommunity.h *: use the current project name (FRRouting) 2020-03-25 17:38:56 -04:00
bgp_mac.c bgp: rename bgp_node to bgp_dest 2020-06-23 17:32:52 +02:00
bgp_mac.h bgpd: Rework code to use const struct prefix 2020-03-24 07:51:41 -04:00
bgp_main.c bgpd: fix crash in the MH cleanup handling 2020-10-21 09:09:21 -07:00
bgp_memory.c bgpd: new memory types for MH 2020-08-05 06:46:12 -07:00
bgp_memory.h bgpd: new memory types for MH 2020-08-05 06:46:12 -07:00
bgp_mpath.c *: un-split strings across lines 2020-07-14 10:37:25 +02:00
bgp_mpath.h bgp: rename bgp_node to bgp_dest 2020-06-23 17:32:52 +02:00
bgp_mplsvpn.c :* Convert prefix2str to %pFX 2020-10-22 09:07:41 +03:00
bgp_mplsvpn.h bgpd: convert global config to transactional cli 2020-10-03 11:25:37 -07:00
bgp_nb_config.c *: unify thread/event cancel macros 2020-10-23 12:16:52 -04:00
bgp_nb.c bgpd: rename router bgp callbacks 2020-10-12 16:13:59 -07:00
bgp_nb.h bgpd: rename router bgp callbacks 2020-10-12 16:13:59 -07:00
bgp_network.c bgpd: associate listener with the appropriate bgp instance 2020-09-01 09:42:26 +01:00
bgp_network.h bgpd: associate listener with the appropriate bgp instance 2020-09-01 09:42:26 +01:00
bgp_nexthop.c bgpd: add %pBD for printing struct bgp_dest * 2020-10-17 08:52:35 -04:00
bgp_nexthop.h bgpd: do not unregister for prefix nexthop updates if nh exists 2020-08-31 09:11:47 +00:00
bgp_nht.c :* Convert prefix2str to %pFX 2020-10-22 09:07:41 +03:00
bgp_nht.h bgpd: turn off RAs when numbered peers are deleted 2020-04-27 17:49:41 +00:00
bgp_open.c Merge pull request #6589 from NaveenThanikachalam/gr_fixes 2020-09-04 18:39:26 +03:00
bgp_open.h bgpd: Remove trailing whitespaces from some header files 2019-09-17 11:28:48 +03:00
bgp_packet.c lib, bgpd: convert lttng tracepoints to frrtrace() 2020-10-23 15:13:51 -04:00
bgp_packet.h bgpd, lib: fix style from BGP GR code 2020-02-04 15:19:04 -05:00
bgp_pbr.c :* Convert prefix2str to %pFX 2020-10-22 09:07:41 +03:00
bgp_pbr.h bgpd: fallback proto icmp/v6 to appropriate l3 filter 2020-08-21 13:37:08 +02:00
bgp_rd.c bgpd: Convert inet_ntoa to %pI4/inet_ntop 2020-10-18 11:22:30 +03:00
bgp_rd.h bgpd: support for Ethernet Segments and Type-1/EAD routes 2020-08-05 06:46:12 -07:00
bgp_regex.c
bgp_regex.h
bgp_route.c Merge pull request #7194 from qlyoung/tracing 2020-10-24 16:50:35 -04:00
bgp_route.h Merge pull request #7345 from opensourcerouting/bgp-aggr-suppress 2020-10-23 15:02:57 +03:00
bgp_routemap.c Merge pull request #7345 from opensourcerouting/bgp-aggr-suppress 2020-10-23 15:02:57 +03:00
bgp_rpki.c :* Convert prefix2str to %pFX 2020-10-22 09:07:41 +03:00
bgp_snmp.c bgpd: implement bgpPeerTable accross VRFs 2020-08-06 18:04:44 +02:00
bgp_table.c bgpd: add %pBD for printing struct bgp_dest * 2020-10-17 08:52:35 -04:00
bgp_table.h *: Create/Use accessor functions for lock count 2020-10-17 13:39:10 -04:00
bgp_trace.c bgpd: add basic packet-related tracepoints 2020-10-23 15:13:51 -04:00
bgp_trace.h bgpd: clean up trace header style a bit 2020-10-23 15:23:12 -04:00
bgp_updgrp_adv.c bgpd: Convert inet_ntoa to %pI4/inet_ntop 2020-10-18 11:22:30 +03:00
bgp_updgrp_packet.c :* Convert prefix2str to %pFX 2020-10-22 09:07:41 +03:00
bgp_updgrp.c *: unify thread/event cancel macros 2020-10-23 12:16:52 -04:00
bgp_updgrp.h bgp: rename bgp_node to bgp_dest 2020-06-23 17:32:52 +02:00
bgp_vnc_types.h bgpd: #if ENABLE_BGP_VNC -> #ifdef ENABLE_BGP_VNC 2020-04-01 15:05:26 -04:00
bgp_vpn.c bgpd: Convert inet_ntoa to %pI4/inet_ntop 2020-10-18 11:22:30 +03:00
bgp_vpn.h bgpd/ospfd: make bgp and ospf json response a bit more consistent 2018-08-30 12:40:18 +00:00
bgp_vty.c bgpd: fix information strings for vtysh 2020-10-22 17:51:04 +02:00
bgp_vty.h bgpd: convert global config to transactional cli 2020-10-03 11:25:37 -07:00
bgp_zebra.c bgpd: support for DF election in EVPN-MH 2020-10-26 10:26:21 -07:00
bgp_zebra.h bgpd: set/unset bgpd no-rib option at runtime 2020-09-02 18:20:08 +02:00
bgpd.c Merge pull request #7343 from ton31337/fix/prefix2str_to_pFX 2020-10-22 08:07:57 -04:00
bgpd.conf.sample doc: Update documentation about multiple-instance 2019-06-18 09:31:35 -04:00
bgpd.conf.sample2
bgpd.conf.vnc.sample
bgpd.h bgpd: Make the process_queue per bgp process 2020-10-21 15:34:47 -04:00
IMPLEMENTATION.txt bgpd: Convert struct bgp_info to struct bgp_path_info 2018-10-09 14:14:25 -04:00
Makefile build: non-recursive bgpd & rfp 2018-09-08 21:25:59 +02:00
subdir.am bgpd: add basic packet-related tracepoints 2020-10-23 15:13:51 -04:00
valgrind.supp bgpd: suppress new libyang_1.0 related loss reports 2020-08-08 17:56:18 -04:00