summaryrefslogtreecommitdiff
path: root/zebra/zebra_vxlan_private.h
AgeCommit message (Collapse)Author
2023-02-17Merge pull request #12780 from opensourcerouting/spdx-license-idDonald Sharp
*: convert to SPDX License identifiers
2023-02-13zebra: install neigh entries on SVDStephen Worley
Install neigh entries always on SVD if it exists in zebra. If zebra is using a Single Vxlan Device, we must duplicate the install of our neigh entries to it so that vxlan communication can also work across it in the downstream VNI case. Signed-off-by: Stephen Worley <sworley@nvidia.com>
2023-02-13zebra: Refactoring changes for zebra_evpn_map_vlan zebra_evpn_from_svi and ↵Sharath Ramamurthy
zl3vni_from_svi Today to find the vni for a given (vlan, bridge) we walk over all interfaces and filter the vxlan device associated with the bridge. With multiple vlan aware bridge changes, we can derive the vni directly by looking up the hash table i.e. the vlan_table of the associated (vlan, bridge) which would give the vni. During vrf_terminate() call zebra_l2_bridge_if_cleanup if the interface that we are removing is of type bridge. In this case, we walk over all the vlan<->access_bd association and clean them up. zebra_evpn_t is modified to record (vlan, bridge) details and the corresponding vty is modified to print the same. zevpn_bridge_if_set and zl3vni_bridge_if_set is used to set/unset the association. Signed-off-by: Sharath Ramamurthy <sramamurthy@nvidia.com>
2023-02-13zebra: vxlan interface refactoring changesSharath Ramamurthy
This change refactors the zebra_vxlan_if related functionality to a new zebra_vxlan_if.c file. zebra_vxlan_if_up/down, zebra_vxlan_if_add/update/del is moved zebra_vxlan_if.c Signed-off-by: Sharath Ramamurthy <sramamurthy@nvidia.com>
2023-02-13zebra: multiple vlan aware bridge datastructure changes and vxlan device ↵Sharath Ramamurthy
iftype derivation from netlink This change set introduces data structure changes required for multiple vlan aware bridge functionality. A new structure zebra_l2_bridge_if encapsulates the vlan to access_bd association of the bridge. A vlan_table hash_table is used to record each instance of the vlan to access_bd of the bridge via zebra_l2_bridge_vlan structure. vxlan iftype derivation: netlink attribute IFLA_VXLAN_COLLECT_METADATA is used to derive the iftype of the vxlan device. If the attribute is present, then the vxlan interface is treated as single vxlan device, otherwise it would default to traditional vxlan device. zebra_vxlan_check_readd_vtep, zebra_vxlan_dp_network_mac_add/del is modified to be vni aware. mac_fdb_read_for_bridge - is modified to be (vlan, bridge) aware Signed-off-by: Sharath Ramamurthy <sramamurthy@nvidia.com>
2023-02-09*: auto-convert to SPDX License IDsDavid Lamparter
Done with a combination of regex'ing and banging my head against a wall. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2021-09-02zebra: Convert to `struct zebra_l3nvi` as per our internal standardDonald Sharp
We do not use typedef's to talk about structures as per our standard. Fixing. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2021-09-02zebra: Convert to `struct zebra_vxlan_sg` as per our internal standardDonald Sharp
We do not use typedef's to talk about structures as per our standard. Fixing. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2021-09-02zebra: Convert to `struct zebra_mac` as per our internal standardDonald Sharp
We do not use typedef's to talk about structures as per our standard. Fixing. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2021-09-02zebra: Convert to `struct zebra_evpn` as per our internal standardDonald Sharp
We do not use typedef's to talk about structures as per our standard. Fixing. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2021-06-07Zebra: FPM support for gateway IP overlay IndexAmeya Dharkar
FPM sends VNI to the data plane with the EVPN prefix. For pure type-5 EVPN route, nexthop interface of EVPN prefix is L3VNI SVI. Thus, we encode L3VNI corresponding to the nexthop vrf with rtmsg for this prefix. For EVPN type-5 route with gateway IP overlay index, we supporting asymmetric IRB. Thus, nexthop interface is L2VNI SVI. So, instead of fetching vrf VNI, fetch VNI corresponding to the nexthop SVI and encode it in the rtmsg for EVPN prefix. Signed-off-by: Ameya Dharkar <adharkar@vmware.com>
2021-03-17*: require semicolon after DEFINE_HOOK & co.David Lamparter
See previous commit. Signed-off-by: David Lamparter <equinox@diac24.net>
2020-11-24zebra: Keep DAD disabled if EVPN MH is turned onAnuradha Karuppiah
DAD is not supported currently with EVPN-MH so we turn it off internally when the first ES config is detected. PS: Note that when all local ESs are deleted DAD will stay off and will need to be cleared via a daemon restart. Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
2020-08-12zebra: extract evpn mac functions from zebra_vxlan.cPat Ruddy
Move MAC dB specific functions to zebra_evpn_mac.c Signed-off-by: Pat Ruddy <pat@voltanet.io>
2020-08-12zebra: rename vni to evpn where appropriatePat Ruddy
The main zebra_vni_t hash structure has been renamed to zebra_evpn_t to allow for other transport underlays. Rename functions and variables to reflect this change. Signed-off-by: Pat Ruddy <pat@voltanet.io>
2020-08-05zebra: support for MAC-IP sync routesAnuradha Karuppiah
MAC-IP routes are used for syncing local entries across redundant switches in an EVPN-MH setup. A path from a peer that has a local ES as destination is tagged as a SYNC path. The SYNC path results in the addition of local MAC and/or local neigh entry in zebra and in the dataplane. Implementation overview ======================= 1. Three new flags "local-inactive", "peer-active" and "peer-proxy" are maintained per-local-MAC and per-local-Neigh entry. 2. The "peer-XXX" flags are set and cleared via SYNC path updates from BGP. Proxy sync paths result in the setting of "peer-proxy" flag (and non-proxies result in the "peer-active"). 3. A neigh entry that has a "peer-XXX" flag set is programmed as "static" in the dataplane. 4. A MAC entry that has a "peer-XXX" flag set or is referenced by a sync-neigh entry (that has a "peer-XXX" flags set) is programmed as "static" in the dataplane. 5. The sync-seq number is used to normalize the MM seq number across all the redundant switches i.e. the max MM seq number across all switches is used by each of the switches. This commit also includes the changes needed for extended MM seq syncing. 6. A MAC/neigh entry has to be local-active or peer-active to sent to BGP. An entry that is NOT local-active is sent with the proxy flag (so BGP can "proxy" advertise it). 7. The "peer-active" flag is aged out by zebra by using a hold_timer (this is instead of being abruptly dropped on SYNC path delete). This age-out is needed to handle peer-switch restart (procedures are specified in draft-rbickhart-evpn-ip-mac-proxy-adv). The holdtime needs to be sufficiently long to allow an external neighmgr daemon or the dataplane component to independently probe and establish local reachability of a host. The MAC and neigh hold time values are configurable. PS: In the future this probing may happen in FRR itself. CLI changes to display sync info ================================ MAC === >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> root@torm-11:mgmt:~# net show evpn mac vni 1000 Number of MACs (local and remote) known for this VNI: 6 Flags: N=sync-neighs, I=local-inactive, P=peer-active, X=peer-proxy MAC Type Flags Intf/Remote ES/VTEP VLAN Seq #'s 00:02:00:00:00:25 local vlan1000 1000 0/0 02:02:00:00:00:02 local PI hostbond1 1000 0/0 02:02:00:00:00:06 remote 03:00:00:00:00:02:11:00:00:01 0/0 02:02:00:00:00:01 local X hostbond1 1000 0/0 00:00:00:00:00:11 local PI hostbond1 1000 0/0 02:02:00:00:00:05 remote 03:00:00:00:00:02:11:00:00:01 0/0 root@torm-11:mgmt:~# root@torm-11:mgmt:~# net show evpn mac vni 1000 mac 00:00:00:00:00:11 MAC: 00:00:00:00:00:11 ESI: 03:00:00:00:00:01:11:00:00:01 Intf: hostbond1(58) VLAN: 1000 Sync-info: neigh#: 0 local-inactive peer-active >>>>>>>>>>>> Local Seq: 0 Remote Seq: 0 Neighbors: No Neighbors root@torm-11:mgmt:~# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> neigh ===== >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> root@torm-11:mgmt:~# net show evpn arp vni 1003 Number of ARPs (local and remote) known for this VNI: 4 Flags: I=local-inactive, P=peer-active, X=peer-proxy Neighbor Type Flags State MAC Remote ES/VTEP Seq #'s 2001:fee1:0:3::6 local active 00:02:00:00:00:25 0/0 45.0.3.66 local P active 00:02:00:00:00:66 0/0 45.0.3.6 local active 00:02:00:00:00:25 0/0 fe80::202:ff:fe00:25 local active 00:02:00:00:00:25 0/0 root@torm-11:mgmt:~# root@torm-11:mgmt:~# net show evpn arp vni 1003 ip 45.0.3.66 IP: 45.0.3.66 Type: local State: active MAC: 00:02:00:00:00:66 Sync-info: peer-active >>>>>>>>>>>>>>>> Local Seq: 0 Remote Seq: 0 root@torm-11:mgmt:~# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
2020-08-05zebra: Ethernet segment management and support for MAC-ECMPAnuradha Karuppiah
1. Local ethernet segments are configured in zebra by attaching a local-es-id and sys-mac to a access interface - >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> ! interface hostbond1 evpn mh es-id 1 evpn mh es-sys-mac 00:00:00:00:01:11 ! >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> This info is then sent to BGP and used for the generation of EAD-per-ES routes. 2. Access VLANs associated with an (ES) access port are translated into ES-EVI objects and sent to BGP. This is used by BGP for the generation of EAD-EVI routes. 3. Remote ESs are imported by BGP and sent to zebra. A list of VTEPs is maintained per-remote ES in zebra. This list is used for the creation of the L2-NHG that is used for forwarding traffic. 4. MAC entries with a non-zero ESI destination use the L2-NHG associated with the ESI for forwarding traffic over the VxLAN overlay. Please see zebra_evpn_mh.h for the datastruct organization details. Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
2020-08-05evpn-netns: Revert PR5077, has been re-worked post-refactorPat Ruddy
Revert "zebra: support for macvlan interfaces" This reverts commit bf69e212fd053af3298fc3cba38458b396467849. Revert "doc: add some documentation about bgp evpn netns support" This reverts commit 89b97c33d7a6d9dc427d56fea52fa27334dde81d. Revert "zebra: dynamically detect vxlan link interfaces in other netns" This reverts commit de0ebb25404fe984f084a0d57b7f873618423876. Revert "bgpd: sanity check when updating nexthop from bgp to zebra" This reverts commit ee9633ed87f0ff5da1373a42d6c044f0a682c8d3. Revert "lib, zebra: reuse and adapt ns_list walk functionality" This reverts commit c4d466c830083e8ba58881d7ad03a90f6baf0754. Revert "zebra: local mac entries populated in correct netnamespace" This reverts commit 40424548910887f3bbbf544ce964d3b736048ae5. Revert "zebra: when parsing local entry against dad, retrieve config" This reverts commit 3acc394bc5e5c225e9258fd0d57a6cebea0c0ccd. Revert "bgpd: evpn nexthop can be changed by default" This reverts commit a2342a241253c41b798845cae155b4caab4bcda5. Revert "zebra: zvni_map_to_vlan() adaptation for all namespaces" This reverts commit db81d18647bbd81a2c335620c9a03e32e4a5b2be. Revert "zebra: add ns_id attribute to mac structure" This reverts commit 388d5b438e22cddc6740e362763c0922edbb242a. Revert "zebra: bridge layer2 information records ns_id where bridge is" This reverts commit b5b453a2d6af58692bee0e256fe1dffe99824801. Revert "zebra, lib: new API to get absolute netns val from relative netns val" This reverts commit b6ebab34f664ba1cc9479fc1287f127c12077509. Revert "zebra, lib: store relative default ns id in each namespace" This reverts commit 9d3555e06ccc68fe37e0a00100029ac4bad8dee2. Revert "zebra, lib: add an internal API to get relative default nsid in other ns" This reverts commit 97c9e7533bd22029ac19838c043cfca82d2f6eb3. Revert "zebra: map vxlan interface to bridge interface with correct ns id" This reverts commit 7c990878f20efff335c1211deda3ec50071ae2b5. Revert "zebra: fdb and neighbor table are read for all zns" This reverts commit f8ed2c5420106314a940cb67264494e0110fc4c0. Revert "zebra: zvni_map_to_svi() adaptation for other network namespaces" This reverts commit 2a9dccb6475bfc11af2b855c4c8ff9e500ba21f4. Revert "zebra: display interface slave type" This reverts commit fc3141393ad95651d31fccd144b5c029d00e5f3a. Revert "zebra: zvni_from_svi() adaptation for other network namespaces" This reverts commit 6fe516bd4b85569b3b8b4bcc2910afc5569aa026. Revert "zebra: importation of bgp evpn rt5 from vni with other netns" This reverts commit 28254125d06f65cc4344b6156eec76a37ec6aede. Revert "lib, zebra: update interface name at netlink creation" This reverts commit 1f7a68a2ff0ba1424131f30112e0cc1572f0bee3. Signed-off-by: Pat Ruddy <pat@voltanet.io>
2020-07-20zebra: evpn l3vni map to vrf nb changesChirag Shah
The set of northbound changes for l3vni configuration command under vrf. vrf x vni 1000 prefix-routes-only { "frr-vrf:lib": { "vrf": [ { "name": "vrf1", "frr-zebra:zebra": { "l3vni-id": 4001 } }, { "name": "vrf2", "frr-zebra:zebra": { "l3vni-id": 4002, "prefix-only": true } } ] } } Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
2020-05-18zebra: add ns_id attribute to mac structurePhilippe Guibert
this information is necessary for local information, because the interface associated to the mac address is stored with its ifindex, and the ifindex may not be enough to get to the right interface when it comes with multiple network namespaces. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2020-04-14zebra: adapt and export rmac netlink functionsRafael Zalamena
Those functions are going to be used by the new data plane plugin for netlink FPM. Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2020-01-07zebra: remove cast from l3vni XMALLOCQuentin Young
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2019-11-22zebra: print rmac and sys mac valuesChirag Shah
"show vrf vni" and "show evpn vni <l3vni>" commands need to display correct router mac value. "show evpn vni <l3vni>" detail l3vni needs to display system mac as in PIP scenario value can be different. Syste MAC would be derived from SVI interface MAC wherelse Router MAC would be derived from macvlan interface MAC value. Ticket:CM-26710 Reviewed By:CCR-9334 Testing Done: TORC11# show evpn vni 4001 VNI: 4001 Type: L3 Tenant VRF: vrf1 Local Vtep Ip: 36.0.0.11 Vxlan-Intf: vx-4001 SVI-If: vlan4001 State: Up VNI Filter: none System MAC: 00:02:00:00:00:2e Router MAC: 44:38:39:ff:ff:01 L2 VNIs: 1000 TORC11# show vrf vni VRF VNI VxLAN IF L3-SVI State Rmac vrf1 4001 vx-4001 vlan4001 Up 44:38:39:ff:ff:01 TORC11# show evpn vni 4001 json { "vni":4001, "type":"L3", "localVtepIp":"36.0.0.11", "vxlanIntf":"vx-4001", "sviIntf":"vlan4001", "state":"Up", "vrf":"vrf1", "sysMac":"00:02:00:00:00:2e", "routerMac":"44:38:39:ff:ff:01", "vniFilter":"none", "l2Vnis":[ 1000, ] } Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
2019-11-22bgpd: evpn pip handle svi ip routeChirag Shah
By default announct Self Type-2 routes with system IP as nexthop and system MAC as nexthop. An API to check type-2 is self route via checking ipv4/ipv6 address from connected interfaces list. An API to extract RMAC and nexthop for type-2 routes based on advertise-svi-ip knob is enabled. When advertise-pip is enabled/disabled, trigger type-2 route update. For self type-2 routes to use anycast or individual (rmac, nexthop) addresses. Ticket:CM-26190 Reviewed By: Testing Done: Enable 'advertise-svi-ip' knob in bgp default instance. the vrf instance svi ip is advertised with nexthop as default instance router-id and RMAC as system MAC. Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
2019-11-22zebra: evpn pip extract vrr macChirag Shah
Extract mac-vlan interface mac when a l3vni add is sent to bgp Per L3VNI maintain vrr interface. An api to extract vrr mac address from a vlan id, associated master svi device. When a l3vni operational up event is sent to bgpd, extract vrr rmac along with svi rmac. Ticket:CM-26190 Reviewed By: Testing Done: Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
2019-06-17Zebra: Handle RMAC add/delete operation and add fpm_mac_info_tAmeya Dharkar
- Define a hook "zebra_mac_update" which can be registered by multiple data plane components (e.g. FPM, dplane). DEFINE_HOOK(zebra_rmac_update, (zebra_mac_t *rmac, zebra_l3vni_t *zl3vni, bool delete, const char *reason), (rmac, zl3vni, delete, reason)) - While performing RMAC add/delete for an L3VNI, call "zebra_mac_update" hook. - This hook call triggers "zfpm_trigger_rmac_update". In this function, we do a lookup for the RMAC in fpm_mac_info_table. If already present, this node is updated with the latest RMAC info. Else, a new fpm_mac_info_t node is created and inserted in the queue and hash data structures. Signed-off-by: Ameya Dharkar <adharkar@vmware.com>
2019-05-17Zebra: Handle VxLAN encap in netlink rtmsg for FPMAmeya Dharkar
- For data plane processing of VxLAN routes, add encap type and L3VNI info to rtmsg message for FPM. - Add "RTA_ENCAP_TYPE" attribute for VxLAN encap with value 100. This value is not currently used for RTA_ENCAP_TYPE for any encap. - If "RTA_ENCAP_TYPE" is 100, add "RTA_ENCAP" attribute with "RTA_VNI" as a nested attribute of RTA_ENCAP Format of RTA_VNI attribute: Len(2 bytes) type (2 bytes) Value(4 bytes)(VNI) 00 08 : 00 00 : 1000 RTA_VNI attribute is a custom attribute. Signed-off-by: Ameya Dharkar <adharkar@vmware.com>
2019-04-20zebra: maintain mcast tunnel origination and termination SG entriesAnuradha Karuppiah
Each multicast tunnel is associated with a - 1. Tunnel origination mroute that is used for forwarding the VxLAN encapsulated flow - S - local VTEP-IP G - BUM mcast-group 2. And a tunnel termination entry - S - * (any remote VTEP) G - BUM mcast-group Multiple L2 VNIs can share the same BUM mcast group (and local-VTEP-IP). Zebra maintains an mcast (SG) hash table to pass this info to pimd for subsequent MDT setup. Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
2019-04-20zebra: install flood FDB entry only if the remote VTEP asked for HERAnuradha Karuppiah
Remote VTEPs advertise the flood mode via IMET and the ingress VTEP needs to perform head-end-replication of BUM packets to it only if the PMSI tunnel type is set to ingress-replication. If a type-3 route is not rxed or rxed with a mode other than ingress-replication we can skip installation of the flood fdb entry for that L2-VNI. In that case the remote VTEP is either not interested in BUM traffic or is using a "static-config" based replication mode like PIM. Sample output with HER - ======================= root@TORS1:~# vtysh -c "show evpn vni 1000" |grep "Remote\|flood" Remote VTEPs for this VNI: 27.0.0.8 flood: HER root@TORS1:~# Sample output with PIM-SM - ========================= root@TORS2:~# vtysh -c "show evpn vni 1000" |grep "Remote\|flood" Remote VTEPs for this VNI: 27.0.0.7 flood: - root@TORS2:~# Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
2019-04-20zebra: header changes for l2 vni bum-mcast-grp handlingAnuradha Karuppiah
The multicast group ip address for BUM traffic is configurable per-l2-vni. One way to configure that is to setup a vxlan device that per-l2-vni and specify the address against that vxlan device - root@TORS1:~# vtysh -c "show interface vx-1000" |grep -i vxlan Interface Type Vxlan VxLAN Id 1000 VTEP IP: 27.0.0.15 Access VLAN Id 1000 Mcast 239.1.1.100 root@TORS1:~# vtysh -c "show evpn vni 1000" |grep Mcast Mcast group: 239.1.1.100 root@TORS1:~# Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
2019-03-25add cplusplus guards to all zebra headersEmanuele Di Pascale
Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
2019-02-06zebra: advertise svi ip as macip route changesChirag Shah
In Asymmetric and symetric routing scenario in EVPN where each VTEP pair having different set of addresses for the SVIs. This knob allows reachability (ping connectivity) of SVI IPs and resolve ARP resoultion VTEPs across racks. This knob should not be used when same SVI IPs configured on VTEPs across racks or when advertise default gateway is configured. Ticket:CM-23782 Testing Done: Bring up EVPN symmetric routing topology with different SVI IPs on different VTEPs. Enable advertise svi ip at each VTEP, remote VTEPs installs arp entry for SVI IPs via EVPN type-2 route exchange. Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
2019-01-25zebra: propagate inactive neigh deletes to bgpdAnuradha Karuppiah
When a local neigh is added with a MAC that is remote or absent the neigh is kept in zebra as local/in-active. But not propagated to bgpd. Similarly when an inactive neigh is deleted the del-msg is not propagated to bgpd. Without this change bgp and zebra would fall out of sync as that bgp would not know to rerun bestpath and for it to reinstall a known remote path for the mac-ip in question. To fix this we now propagate inactive neigh deletes to bgpd. Ticket: CM-23018 Testing Done: 1. evpn-min 2. manually triggered the out-of-sync state and verified the fix Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
2018-11-17zebra: dup addr detect operation commandsChirag Shah
Display duplicate detected list of MACs and VNIs. - Per VNI - Across all VNIs Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
2018-11-17zebra: dup addr detect freeze actionChirag Shah
Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
2018-11-17zebra: dup addr detect warn-onlyChirag Shah
Duplicate address detection warning only action upon an address detected as duplicate. Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
2018-08-20bgpd, zebra: EVPN extended mobility supportvivek
Implement procedures similar to what is specified in https://tools.ietf.org/html/draft-malhotra-bess-evpn-irb-extended-mobility in order to support extended mobility scenarios in EVPN. These are scenarios where a host/VM move results in a different (MAC,IP) binding from earlier. For example, a host with an address assignment (IP1, MAC1) moves behind a different PE (VTEP) and has an address assignment of (IP1, MAC2) or a host with an address assignment (IP5, MAC5) has a different assignment of (IP6, MAC5) after the move. Note that while these are described as "move" scenarios, they also cover the situation when a VM is shut down and a new VM is spun up at a different location that reuses the IP address or MAC address of the earlier instance, but not both. Yet another scenario is a MAC change for an attached host/VM i.e., when the MAC of an attached host changes from MAC1 to MAC2. This is necessary because there may already be a non-zero sequence number associated with MAC2. Also, even though (IP, MAC1) is withdrawn before (IP, MAC2) is advertised, they may propagate through the network differently. The procedures continue to rely on the MAC mobility extended community specified in RFC 7432 and already supported by the implementation, but augment it with a inheritance mechanism that understands the relationship of the host MACIP (ARP/neighbor table entry) to the underlying MAC (MAC forwarding database entry). In FRR, this relationship is understood by the zebra component which doubles as the "host mobility manager", so the MAC mobility sequence numbers are determined through interaction between bgpd and zebra. Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com> Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com> Reviewed-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
2018-07-24Merge pull request #2665 from chiragshah6/evpn_devRuss White
bgpd: support evpn nd ext community
2018-07-17bgpd: support evpn nd ext communityChirag Shah
EVPN ND ext community support NA flag R-bit, to have proxy ND. Set R-bit in EVPN NA if a given router is default gateway or there is a local router attached, which can be determine based on local neighbor entry. Implement BGP ext community attribute to generate and parse R-bit and pass along zebra to program neigh entry in kernel. Upon receiving MAC/IP update with community type 0x06 and sub_type 0x08, pass the R-bit to zebra to program neigh entry. Set NTF_ROUTER in neigh entry and inform kernel to do proxy NA for EVPN. Ref: https://tools.ietf.org/html/draft-ietf-bess-evpn-na-flags-01 Ticket:CM-21712, CM-21711 Reviewed By: Testing Done: Configure Local vni enabled L3 Gateway, which would act as router, checked show evpn arp-cache vni x ip <ip of svi> on originated and remote VTEPs. "Router" flag is set. Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
2018-07-09zebra: install EVPN gateway MAC as static/stickyAnuradha Karuppiah
SVI interface ip/hw address is advertised by the GW VTEP (say TORC11) with the default-GW community. And the rxing VTEP (say TORC21) installs the GW MAC as a dynamic FDB entry. The problem with this is a rogue packet from a server with the GW MAC as source can cause a station move resulting in TORC21 hijacking the GW MAC address and blackholing all inter rack traffic. Fix is to make the GW MAC "sticky" pinning it to the GW VTEP (TORC11). This commit does it by installing the FDB entry as static if the MACIP route is received with the default-GW community (mimics handling of mac-mobility-with-sticky community) Sample output with from TORC12 with TORC11 setup as gateway - root@TORC21:~# net show evpn mac vni 1004 mac 00:00:5e:00:01:01 MAC: 00:00:5e:00:01:01 Remote VTEP: 36.0.0.11 Remote-gateway Mac Neighbors: 45.0.4.1 fe80::200:5eff:fe00:101 2001:fee1:0:4::1 root@TORC21:~# bridge fdb show |grep 00:00:5e:00:01:01|grep 1004 00:00:5e:00:01:01 dev vx-1004 vlan 1004 master bridge static 00:00:5e:00:01:01 dev vx-1004 dst 36.0.0.11 self static root@TORC21:~# Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com> Ticket: CM-21508
2018-05-21zebra: Cleanup some nits from Review CommentsDonald Sharp
1) Small formating mistake fixed 2) Rename of a variable to give it a slightly better name Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-05-17zebra: The neigh host_list is expensive tooDonald Sharp
The neighbor host_list is expensive as well. Modify the code to take advantage of a rb_tree as well. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-05-17zebra: Convert zrmac->host_list list to a RB TreeDonald Sharp
The host_list when we attempt to use it at scale, ends up spending a non-trivial amount of time finding and sorting entries for the host list. Convert to a rb tree. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-03-27*: use C99 standard fixed-width integer typesQuentin Young
The following types are nonstandard: - u_char - u_short - u_int - u_long - u_int8_t - u_int16_t - u_int32_t Replace them with the C99 standard types: - uint8_t - unsigned short - unsigned int - unsigned long - uint8_t - uint16_t - uint32_t Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2018-03-06*: conform with COMMUNITY.md formatting rules, via 'make indent'Lou Berger
Signed-off-by: Lou Berger <lberger@labn.net>
2018-02-10zebra, bgp: Support type-5 routes with asymmetric routingMitesh Kanjariya
Asymmetric routing is an ideal choice when all VLANs are cfged on all leafs. It simplifies the routing configuration and eliminates potential need for advertising subnet routes. However, we need to reach the Internet or global destinations or to do subnet-based routing between PODs or DCs. This requires EVPN type-5 routes but those routes require L3 VNI configuration. This task is to support EVPN type-5 routes for prefix-based routing in conjunction with asymmetric routing within the POD/DC. It is done by providing an option to use the L3 VNI only for prefix routes, so that type-2 routes (host routes) will only use the L2 VNI. Signed-off-by: Mitesh Kanjariya <mitesh@cumulusnetworks.com>
2018-01-23bgpd: advertise VNI subnetMitesh Kanjariya
In EVPN symmetric routing, not all subnets are presents everywhere. We have multiple scenarios where a host might not get learned locally. 1. GARP miss 2. SVI down/up 3. Silent host We need a mechanism to resolve such hosts. In order to achieve this, we will be advertising a subnet route from a box and that box will help in resolving the ARP to such hosts. Signed-off-by: Mitesh Kanjariya <mitesh@cumulusnetworks.com>
2018-01-23bgpd/zebra/lib: Add Default Gateway extended communityMitesh Kanjariya
1. Added default gw extended community 2. code modification to handle sticky-mac/default-gw-mac as they go together 3. show command support for newly added extended community 4. State in zebra to reflect if a mac/neigh is default gateway 5. show command enhancement to refelect the same in zebra commands Ticket: CM-17428 Review: CCR-6580 Testing: Manual Signed-off-by: Mitesh Kanjariya <mitesh@cumulusnetworks.com>
2017-12-14zebra/bgpd: cleanup l3vni on no advertise-all-vniMitesh Kanjariya
EVPN is only enabled when user configures advertise-all-vni. All VNIs (L2 and L3) should be cleared upon removal of this config. Signed-off-by: Mitesh Kanjariya <mitesh@cumulusnetworks.com>
2017-12-14bgpd: set vrf originator ip to kernels local-ipmitesh
For EVPN type-5 route the NH in the NLRI is set to the local tunnel ip. This information has to be obtained from kernel notification. We need to pass this info from zebra to bgp in l3vni call flow. This patch doesn't handle the tunnel-ip change. Signed-off-by: Mitesh Kanjariya <mitesh@cumulusnetworks.com>