mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-05-01 19:37:13 +00:00

Local ethernet segments are held in a protodown or error-disabled state if access to the VxLAN overlay is not ready - 1. When FRR comes up the local-ESs/access-port are kept protodown for the startup-delay duration. During this time the underlay and EVPN routes via it are expected to converge. 2. When all the uplinks/core-links attached to the underlay go down the access-ports are similarly protodowned. The ES-bond protodown state is propagated to each ES-bond member and programmed in the dataplane/kernel (per-bond-member). Configuring uplinks - vtysh -c "conf t" vtysh -c "interface swp4" vtysh -c "evpn mh uplink" Configuring startup delay - vtysh -c "conf t" vtysh -c "evpn mh startup-delay 100" >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> EVPN protodown display - ======================== root@torm-11:mgmt:~# vtysh -c "show evpn" L2 VNIs: 10 L3 VNIs: 3 Advertise gateway mac-ip: No Advertise svi mac-ip: No Duplicate address detection: Disable Detection max-moves 5, time 180 EVPN MH: mac-holdtime: 60s, neigh-holdtime: 60s startup-delay: 180s, start-delay-timer: 00:01:14 <<<<<<<<<<<< uplink-cfg-cnt: 4, uplink-active-cnt: 4 protodown: startup-delay <<<<<<<<<<<<<<<<<<<<<<< >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> ES-bond protodown display - =========================== root@torm-11:mgmt:~# vtysh -c "show interface hostbond1" Interface hostbond1 is up, line protocol is down Link ups: 0 last: (never) Link downs: 1 last: 2020/04/26 20:38:03.53 PTM status: disabled vrf: default OS Description: Local Node/s torm-11 and Ports swp5 <==> Remote Node/s hostd-11 and Ports swp1 index 58 metric 0 mtu 9152 speed 4294967295 flags: <UP,BROADCAST,MULTICAST> Type: Ethernet HWaddr: 00:02:00:00:00:35 Interface Type bond Master interface: bridge EVPN-MH: ES id 1 ES sysmac 00:00:00:00:01:11 protodown: off rc: startup-delay <<<<<<<<<<<<<<<<< >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> ES-bond member protodown display - ================================== root@torm-11:mgmt:~# vtysh -c "show interface swp5" Interface swp5 is up, line protocol is down Link ups: 0 last: (never) Link downs: 3 last: 2020/04/26 20:38:03.52 PTM status: disabled vrf: default index 7 metric 0 mtu 9152 speed 10000 flags: <UP,BROADCAST,MULTICAST> Type: Ethernet HWaddr: 00:02:00:00:00:35 Interface Type Other Master interface: hostbond1 protodown: on rc: startup-delay <<<<<<<<<<<<<<<< root@torm-11:mgmt:~# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
122 lines
3.8 KiB
C
122 lines
3.8 KiB
C
/*
|
|
* Zebra Layer-2 interface Data structures and definitions
|
|
* Copyright (C) 2016, 2017 Cumulus Networks, Inc.
|
|
*
|
|
* This file is part of FRR.
|
|
*
|
|
* FRR is free software; you can redistribute it and/or modify it
|
|
* under the terms of the GNU General Public License as published by the
|
|
* Free Software Foundation; either version 2, or (at your option) any
|
|
* later version.
|
|
*
|
|
* FRR is distributed in the hope that it will be useful, but
|
|
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
* General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public License
|
|
* along with FRR; see the file COPYING. If not, write to the Free
|
|
* Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
|
* 02111-1307, USA.
|
|
*/
|
|
|
|
#ifndef _ZEBRA_L2_H
|
|
#define _ZEBRA_L2_H
|
|
|
|
#include <zebra.h>
|
|
|
|
#include "if.h"
|
|
#include "vlan.h"
|
|
#include "vxlan.h"
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
/* zebra L2 interface information - bridge slave (linkage to bridge) */
|
|
struct zebra_l2info_brslave {
|
|
ifindex_t bridge_ifindex; /* Bridge Master */
|
|
struct interface *br_if; /* Pointer to master */
|
|
ns_id_t ns_id; /* network namespace where bridge is */
|
|
};
|
|
|
|
struct zebra_l2info_bond {
|
|
struct list *mbr_zifs; /* slaves using this bond as a master */
|
|
};
|
|
|
|
/* zebra L2 interface information - bridge interface */
|
|
struct zebra_l2info_bridge {
|
|
uint8_t vlan_aware; /* VLAN-aware bridge? */
|
|
};
|
|
|
|
/* zebra L2 interface information - VLAN interface */
|
|
struct zebra_l2info_vlan {
|
|
vlanid_t vid; /* VLAN id */
|
|
};
|
|
|
|
/* zebra L2 interface information - VXLAN interface */
|
|
struct zebra_l2info_vxlan {
|
|
vni_t vni; /* VNI */
|
|
struct in_addr vtep_ip; /* Local tunnel IP */
|
|
vlanid_t access_vlan; /* Access VLAN - for VLAN-aware bridge. */
|
|
struct in_addr mcast_grp;
|
|
ifindex_t ifindex_link; /* Interface index of interface
|
|
* linked with VXLAN
|
|
*/
|
|
ns_id_t link_nsid;
|
|
};
|
|
|
|
struct zebra_l2info_bondslave {
|
|
ifindex_t bond_ifindex; /* Bridge Master */
|
|
struct interface *bond_if; /* Pointer to master */
|
|
};
|
|
|
|
union zebra_l2if_info {
|
|
struct zebra_l2info_bridge br;
|
|
struct zebra_l2info_vlan vl;
|
|
struct zebra_l2info_vxlan vxl;
|
|
};
|
|
|
|
/* NOTE: These macros are to be invoked only in the "correct" context.
|
|
* IOW, the macro VNI_FROM_ZEBRA_IF() will assume the interface is
|
|
* of type ZEBRA_IF_VXLAN.
|
|
*/
|
|
#define VNI_FROM_ZEBRA_IF(zif) (zif)->l2info.vxl.vni
|
|
#define VLAN_ID_FROM_ZEBRA_IF(zif) (zif)->l2info.vl.vid
|
|
|
|
#define IS_ZEBRA_IF_BRIDGE_VLAN_AWARE(zif) ((zif)->l2info.br.vlan_aware == 1)
|
|
|
|
extern void zebra_l2_map_slave_to_bridge(struct zebra_l2info_brslave *br_slave,
|
|
struct zebra_ns *zns);
|
|
extern void
|
|
zebra_l2_unmap_slave_from_bridge(struct zebra_l2info_brslave *br_slave);
|
|
extern void zebra_l2_bridge_add_update(struct interface *ifp,
|
|
struct zebra_l2info_bridge *bridge_info,
|
|
int add);
|
|
extern void zebra_l2_bridge_del(struct interface *ifp);
|
|
extern void zebra_l2_vlanif_update(struct interface *ifp,
|
|
struct zebra_l2info_vlan *vlan_info);
|
|
extern void zebra_l2_vxlanif_add_update(struct interface *ifp,
|
|
struct zebra_l2info_vxlan *vxlan_info,
|
|
int add);
|
|
extern void zebra_l2_vxlanif_update_access_vlan(struct interface *ifp,
|
|
vlanid_t access_vlan);
|
|
extern void zebra_l2_vxlanif_del(struct interface *ifp);
|
|
extern void zebra_l2if_update_bridge_slave(struct interface *ifp,
|
|
ifindex_t bridge_ifindex,
|
|
ns_id_t ns_id);
|
|
|
|
extern void zebra_l2if_update_bond_slave(struct interface *ifp,
|
|
ifindex_t bond_ifindex);
|
|
extern void zebra_vlan_bitmap_compute(struct interface *ifp,
|
|
uint32_t vid_start, uint16_t vid_end);
|
|
extern void zebra_vlan_mbr_re_eval(struct interface *ifp,
|
|
bitfield_t vlan_bitmap);
|
|
extern void zebra_l2if_update_bond(struct interface *ifp, bool add);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif /* _ZEBRA_L2_H */
|