mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-05-25 02:32:18 +00:00

CM-10435 Issue: IBGP BFD sessions are created as multi-hop even though peer is single-hop away. This is causing an interop issue with ICOS. Root Cause: By design all IBGP peers are registered with BFD as multi-hop. Fix: • Changed the default behavior of always treating IBGP BFD sessions as mult-hop. shared_network variable is used to determine whether the IBGP peer is single hop or multi-hop away. The logic for determining whether EBGP peer is single hop or multi-hop has not been changed. • Since the default behavior has been changed, it will cause interop issues between 2.5 and 3.0 IBGP BFD sessions. A new hidden command “bfd multihop/singlehop” has been introduced to overcome the interop issues. dell-s6000-10(config-router)# neighbor 30.0.2.6 bfd <2-255> Detect Multiplier <cr> dell-s6000-10(config-router)# neighbor 30.0.2.6 bfd multihop dell-s6000-10(config-router)# no neighbor 30.0.2.6 bfd multihop dell-s6000-10(config-router)# dell-s6000-10(config-router)# neighbor 30.0.2.6 bfd multihop dell-s6000-10(config-router)# do show running-config ! router bgp 100 neighbor igroup peer-group neighbor igroup bfd 5 500 500 neighbor igroup bfd multihop neighbor 30.0.2.2 remote-as 100 neighbor 30.0.2.2 peer-group igroup neighbor 3101🔤bcad::2 remote-as 100 neighbor 3101🔤bcad::2 peer-group igroup neighbor 30.0.2.6 remote-as 200 neighbor 30.0.2.6 bfd multihop neighbor 3102🔤bcad::6 remote-as 200 neighbor 3102🔤bcad::6 bfd neighbor 3102🔤bcad::6 ebgp-multihop 255 ! CM-10260 Issue: “Unable to connect to socket” message keeps getting logged when ptmd process doesn’t exist. Root Cause: BFD clients (bgpd, ospfd and ospf6d) during initialization try to register with BFD/PTM by default. This results in continuous logging If PTM does not exist since there is no max on number of retries. Fix: • Stop the retries to connect to PTM after max reconnect timer of 5 mins is reached. • Added zebra debug event wrapper to message logging to prevent it from showing by default. CM-4541 Issue: Addition of a new command "ptm-enable" or "no ptm-enable" per interface to enable/disable PTM link status checks for an interface. Fix: Currently there is only one ptm-enable global command that enables/disables PTM status updates for all interfaces. This new command will give the handle to individually stop interface from reacting on the PTM status updates. • by default interface uses the ptm-enable global configuration • "no ptm-enable" on an interface will disable PTM status updates from taking affect for that interface. This can bring the interface up if it was brought down due to PTM status update. • "ptm-enable" on an interface will cause the interface to fallback to the global ptm-enable configuration value and will bring the interface up or down based on the last stored PTM status update if global ptm is enabled. Ticket: CM-10435, CM-10260 and CM-4541 Signed-off-by: Radhika Mahankali Reviewed-by: Donald Sharp, Kanna Rajagopal
111 lines
3.5 KiB
C
111 lines
3.5 KiB
C
/**
|
|
* bfd.h: BFD definitions and structures
|
|
*
|
|
* @copyright Copyright (C) 2015 Cumulus Networks, Inc.
|
|
*
|
|
* This file is part of GNU Zebra.
|
|
*
|
|
* GNU Zebra 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.
|
|
*
|
|
* GNU Zebra 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 GNU Zebra; 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_BFD_H
|
|
#define _ZEBRA_BFD_H
|
|
|
|
#include "lib/json.h"
|
|
|
|
#define BFD_CMD_DETECT_MULT_RANGE "<2-255> "
|
|
#define BFD_CMD_MIN_RX_RANGE "<50-60000> "
|
|
#define BFD_CMD_MIN_TX_RANGE "<50-60000>"
|
|
#define BFD_CMD_TYPE "(multihop|singlehop)"
|
|
|
|
#define BFD_DEF_MIN_RX 300
|
|
#define BFD_MIN_MIN_RX 50
|
|
#define BFD_MAX_MIN_RX 60000
|
|
#define BFD_DEF_MIN_TX 300
|
|
#define BFD_MIN_MIN_TX 50
|
|
#define BFD_MAX_MIN_TX 60000
|
|
#define BFD_DEF_DETECT_MULT 3
|
|
#define BFD_MIN_DETECT_MULT 2
|
|
#define BFD_MAX_DETECT_MULT 255
|
|
|
|
#define BFD_FLAG_PARAM_CFG (1 << 0) /* parameters have been configured */
|
|
#define BFD_FLAG_BFD_REG (1 << 1) /* Peer registered with BFD */
|
|
#define BFD_FLAG_BFD_TYPE_MULTIHOP (1 << 2) /* Peer registered with BFD as multihop */
|
|
|
|
#define BFD_STATUS_UNKNOWN (1 << 0) /* BFD session status never received */
|
|
#define BFD_STATUS_DOWN (1 << 1) /* BFD session status is down */
|
|
#define BFD_STATUS_UP (1 << 2) /* BFD session status is up */
|
|
|
|
enum bfd_sess_type {
|
|
BFD_TYPE_NOT_CONFIGURED,
|
|
BFD_TYPE_SINGLEHOP,
|
|
BFD_TYPE_MULTIHOP
|
|
};
|
|
|
|
struct bfd_info
|
|
{
|
|
u_int16_t flags;
|
|
u_int8_t detect_mult;
|
|
u_int32_t desired_min_tx;
|
|
u_int32_t required_min_rx;
|
|
time_t last_update;
|
|
u_int8_t status;
|
|
enum bfd_sess_type type;
|
|
};
|
|
|
|
extern struct bfd_info *
|
|
bfd_info_create(void);
|
|
|
|
extern void
|
|
bfd_info_free(struct bfd_info **bfd_info);
|
|
|
|
extern int
|
|
bfd_validate_param(struct vty *vty, const char *dm_str, const char *rx_str,
|
|
const char *tx_str, u_int8_t *dm_val, u_int32_t *rx_val,
|
|
u_int32_t *tx_val);
|
|
|
|
extern void
|
|
bfd_set_param (struct bfd_info **bfd_info, u_int32_t min_rx, u_int32_t min_tx,
|
|
u_int8_t detect_mult, int defaults, int *command);
|
|
extern void
|
|
bfd_peer_sendmsg (struct zclient *zclient, struct bfd_info *bfd_info,
|
|
int family, void *dst_ip, void *src_ip, char *if_name,
|
|
int ttl, int multihop, int command, int set_flag,
|
|
vrf_id_t vrf_id);
|
|
|
|
extern const char *
|
|
bfd_get_command_dbg_str(int command);
|
|
|
|
extern struct interface *
|
|
bfd_get_peer_info (struct stream *s, struct prefix *dp, struct prefix *sp,
|
|
int *status, vrf_id_t vrf_id);
|
|
|
|
const char *
|
|
bfd_get_status_str(int status);
|
|
|
|
extern void
|
|
bfd_show_param(struct vty *vty, struct bfd_info *bfd_info, int bfd_tag,
|
|
int extra_space, u_char use_json, json_object *json_obj);
|
|
|
|
extern void
|
|
bfd_show_info(struct vty *vty, struct bfd_info *bfd_info, int multihop,
|
|
int extra_space, u_char use_json, json_object *json_obj);
|
|
|
|
extern void
|
|
bfd_client_sendmsg (struct zclient *zclient, int command);
|
|
|
|
#endif /* _ZEBRA_BFD_H */
|