frr
frr copied to clipboard
BGP failover with VRRP not working
Description
Setup : Two routers 1 and 2 with frr installed and vrrp enabled bgp configured, one acting as master and other as backup. Third router has bgp configured with frr, Followed steps in the document to create macvlan device on router with vrrp configuration The master vrrp router is not able to establish, bgp peering with the router which has bgp with frr installed.
Instead of communicating with macvlan interface, it is communicating with primary ip address eth1 interface. See the following error in logs 192.168.58.115 connection rejected(VRF default:1234:default) - not configured and not valid for dynamic
Version
7.5.1-1.1+deb11u2
How to reproduce
- Create 3 debian machines, with frr installed.
- Configure 2 machines with vrrp master, backup and bgp installed.
- Configure the third machine with vip configured in step 2 as bgp neighbor. and configure the vrrp master/backup with third machines ip as bgp neighbor
The master vrrp and third machine should connect via BGP and listed as neigbors. if the master is shutdown, the back should resume as master and get connected to third machine via BGP as neighbor.
Expected behavior
Master should form bgp peering with third router with vrrp vip
Actual behavior
Communication is happening through interfaces primary ip not the vip. Configuration of router 1 and 2 (vrrp master/backup) router 1 ip 192.168.58.115 router 2 ip 192.168.58.111 router 3 ip 192.168.58.12 vrrp ip 192.168.58.2
zebra.conf
! Auto Generated
! DO NOT EDIT. Changes will be overwritten
hostname Router
password zebra
enable password zebra
interface eth1
ip address 192.168.58.115/24
ipv6 nd suppress-ra
ip forwarding
line vty
vrrp.conf
interface eth1
vrrp 5
vrrp 5 version 3
vrrp 5 priority 100
vrrp 5 advertisement-interval 100
vrrp 5 ip 192.168.58.2
log stdout
command to configure macvlan bridge
ip link add vrrp4-2-1 link eth1 addrgenmode random type macvlan mode bridge
ip link set dev vrrp4-2-1 address 00:00:5e:00:01:05
ip addr add 192.168.58.2/24 dev vrrp4-2-1
ip link set dev vrrp4-2-1 up
bgpd conf
router bgp 1111 vrf default
bgp router-id 88.88.88.88
no bgp ebgp-requires-policy
no bgp network import-check
network 192.168.58.0/24
neighbor 192.168.58.12 remote-as 1234
neighbor 192.168.58.12 route-map set-nexthop out
neighbor 192.168.58.12 ebgp-multihop
neighbor 192.168.58.12 next-hop-self
route-map set-nexthop permit 10
log stdout
Configuration of router 3 with just bgp
hostname bgpd
password zebra
!enable password please-set-at-here
router bgp 1234
bgp router-id 192.168.58.12
no bgp ebgp-requires-policy
no bgp network import-check
network 192.168.2.0 mask 255.255.255.0
neighbor 192.168.58.2 remote-as 1111
neighbor 192.168.58.2 route-map set-nexthop out
neighbor 192.168.58.2 ebgp-multihop
neighbor 192.168.58.2 next-hop-self
route-map set-nexthop permit 10
log stdout
Additional context
Same configuration works with vrrp failover using keepalived and bgp with only frr No response
Checklist
- [X] I have searched the open issues for this bug.
- [X] I have not included sensitive information in this report.