Page MenuHomeVyOS Platform

BGP neighbor not generating the correct frr configuration when moved to peer-group
Closed, WontfixPublicBUG

Description

It seems that bgp neighbors / peer-group / address-family has to be configured in a specific order in order to generate the correct frr config.

Steps to reproduce.

configure ipv6 peer with remote-as
commit
The configuration after first commit

olof@o6-internet-3# show protocols | commands 
set bgp 4200010000 neighbor 2001:db8::2 remote-as '65500'

Then delete ipv6 peer remote-as
configure ipv6 peer-group with remote-as
commit

The configuration in VyOS after commit

olof@o6-internet-3# show protocols | commands 
set bgp 4200010000 address-family ipv6-unicast redistribute connected route-map 'REDISTRIBUTE-INTO-BGP'
set bgp 4200010000 address-family ipv6-unicast redistribute static route-map 'REDISTRIBUTE-INTO-BGP'
set bgp 4200010000 neighbor 2001:db8::2 address-family ipv6-unicast
set bgp 4200010000 neighbor 2001:db8::2 peer-group 'CUST_CR_IPV6'
set bgp 4200010000 peer-group CUST_CR_IPV6 address-family ipv6-unicast route-map export 'OUT-CR'
set bgp 4200010000 peer-group CUST_CR_IPV6 address-family ipv6-unicast route-map import 'IN-CR'
set bgp 4200010000 peer-group CUST_CR_IPV6 remote-as '65500'

it will generate a warning

olof@o6-internet-3# commit
[ protocols bgp 4200010000 ]
[ protocols bgp 4200010000 neighbor 2001:db8::2 ]
  must set remote-as or address-family ipv6-unicast peer-group with remote-as defined

And the configure generated in frr
#VTYSH

router bgp 4200010000
 no bgp ebgp-requires-policy
 no bgp network import-check
 neighbor 2001:db8::2 remote-as 65500
 !
 address-family ipv6 unicast
  neighbor 2001:db8::2 activate
 exit-address-family
!
ipv6 prefix-list IN-CR-IPV6 seq 10 permit ::/0
ipv6 prefix-list CUST-PUBLIC-IPV6 seq 10 permit 2001:db8::/32 le 64
!
route-map IN-CR permit 20
 match ipv6 address prefix-list IN-CR-IPV6
!
route-map OUT-CR permit 20
 match ipv6 address prefix-list CUST-PUBLIC-IPV6
!
route-map REDISTRIBUTE-INTO-BGP permit 20
 match ipv6 address prefix-list CUST-PUBLIC-IPV6
!

As you can see, this part is missing from the expected configuration in frr.

address-family ipv6 unicast
 redistribute connected route-map REDISTRIBUTE-INTO-BGP
 redistribute static route-map REDISTRIBUTE-INTO-BGP
 neighbor CUST_CR_IPV6 activate
 neighbor CUST_CR_IPV6 route-map IN-CR in
 neighbor CUST_CR_IPV6 route-map OUT-CR out

Details

Difficulty level
Unknown (require assessment)
Version
1.3-beta-202108221610
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Unspecified (possibly destroys the router)

Event Timeline

Viacheslav changed the task status from Open to Confirmed.Aug 29 2021, 11:43 AM
syncer triaged this task as Normal priority.

Still bug for 1.3.5

set protocols bgp 4200010000 address-family ipv6-unicast redistribute connected
set protocols bgp 4200010000 address-family ipv6-unicast redistribute static
set protocols bgp 4200010000 neighbor 2001:db8::2 address-family ipv6-unicast
set protocols bgp 4200010000 neighbor 2001:db8::2 peer-group 'CUST_CR_IPV6'
set protocols bgp 4200010000 peer-group CUST_CR_IPV6 address-family ipv6-unicast
set protocols bgp 4200010000 peer-group CUST_CR_IPV6 remote-as '65500'

commit:

vyos@r1# commit
[ protocols bgp 4200010000 ]
[ protocols bgp 4200010000 neighbor 2001:db8::2 ]
  must set remote-as or address-family ipv6-unicast peer-group with remote-as defined

[edit protocols]
dmbaturin added a subscriber: dmbaturin.

Trying to fix it is too risky because it may stop other not-quite-valid configuration from loading and we don't know how big the impact is going to be. 1.4 doesn't have the issue, and 1.3 is in the maintenance phase.

You can use the next type of configuration

set protocols bgp 4200010000 neighbor 2001:db8::2 address-family ipv6-unicast peer-group 'CUST_CR_IPV6'
set protocols bgp 4200010000 parameters default no-ipv4-unicast
set protocols bgp 4200010000 peer-group CUST_CR_IPV6 address-family ipv6-unicast
set protocols bgp 4200010000 peer-group CUST_CR_IPV6 remote-as '65500'

But we recommend to check the result in FRR configuration.