Page MenuHomeVyOS Platform

BGP peer-group commit error and reboot conifg not found .
Open, HighPublicBUG

Description

VyOS 1.2.5

Config :
set protocols bgp 65001 neighbor xxx.xxx.100.2 address-family ipv4-unicast route-map export 'ROUTE-V4'
set protocols bgp 65001 neighbor xxx.xxx.100.2 peer-group 'ibgpv4'
set protocols bgp 65001 neighbor xxxx:xxxx:002::2 address-family ipv6-unicast route-map export 'ROUTER-V6'
set protocols bgp 65001 neighbor xxxx:xxxx:002::2 peer-group 'ibgpv6'
set protocols bgp 65001 parameters default no-ipv4-unicast
set protocols bgp 65001 parameters log-neighbor-changes
set protocols bgp 65001 parameters router-id 'xxx.xxx.100.1'
set protocols bgp 65001 peer-group ibgpv4 address-family ipv4-unicast nexthop-self
set protocols bgp 65001 peer-group ibgpv4 address-family ipv4-unicast route-reflector-client
set protocols bgp 65001 peer-group ibgpv4 remote-as '65002'
set protocols bgp 65001 peer-group ibgpv6 address-family ipv6-unicast nexthop-self
set protocols bgp 65001 peer-group ibgpv6 address-family ipv6-unicast route-reflector-client
set protocols bgp 65001 peer-group ibgpv6 remote-as '65002'

commit & save

we get error message " % No BGP neighbors found " or bgp config not found after reboot server

Details

Difficulty level
Unknown (require assessment)
Version
1.2.5
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Unspecified (possibly destroys the router)
Issue type
Unspecified (please specify)

Event Timeline

Unknown Object (User) added a subscriber: Unknown Object (User).May 25 2020, 5:36 PM

Hello @lawrencepan , can you explain, why you need different AS for route-reflector-client?
Can you add your route-maps ROUTE-V4 and 'ROUTER-V6?

@Dmitry

BGP Router ASN 65001 .
PeerGroup ipv4 & ipv6 ASN65002

ROUTE-V4 & ROUTE-V6

route-map sample :
set policy route-map ROUTE-V4 rule 20 action 'permit'
set policy route-map ROUTE-V4 rule 20 match ip address prefix-list 'IP01-DC-V4'
set policy route-map ROUTE-V4 rule 23 action 'permit'
set policy route-map ROUTE-V4 rule 23 match ip address prefix-list 'IP02-DC-V4'

@lawrencepan your configuration not committed because,

  1. "route-reflector-client" can be used only when remote-as and local-as are equal

Try to check your commit.
You wiil see

vyos@r-roll# commit
[ protocols bgp 65001 peer-group ibgpv4 address-family ipv4-unicast route-reflector-client ]
remote-as must equal local-as

So your configuration commit not applied.
And after reboot you don't see any bgp configuration.

  1. We really have a bug with ipv6 + groups when set route-map

From bellow configuration, the ipv4 part works fine. Problem with ipv6 + peer-group

set policy route-map ROUTE-V4 rule 10 action 'permit'
set policy route-map ROUTE-V6 rule 10 action 'permit'

set protocols bgp 65001 neighbor 10.10.100.2 address-family ipv4-unicast route-map export 'ROUTE-V4'
set protocols bgp 65001 neighbor 10.10.100.2 peer-group 'ibgpv4'
set protocols bgp 65001 parameters default no-ipv4-unicast
set protocols bgp 65001 parameters log-neighbor-changes
set protocols bgp 65001 parameters router-id '10.10.100.1'
set protocols bgp 65001 peer-group ibgpv4 address-family ipv4-unicast nexthop-self
set protocols bgp 65001 peer-group ibgpv4 address-family ipv4-unicast route-reflector-client
set protocols bgp 65001 peer-group ibgpv4 remote-as '65001'

set protocols bgp 65001 neighbor fcee:eeee:002::2 address-family ipv6-unicast route-map export 'ROUTE-V6'
set protocols bgp 65001 neighbor fcee:eeee:002::2 peer-group 'ibgpv6'
set protocols bgp 65001 peer-group ibgpv6 address-family ipv6-unicast nexthop-self
set protocols bgp 65001 peer-group ibgpv6 address-family ipv6-unicast route-reflector-client
set protocols bgp 65001 peer-group ibgpv6 remote-as '65001'

Commit

vyos@vyos# commit
[ protocols bgp 65001 ]
[ protocols bgp 65001 neighbor fcee:eeee:002::2 ]
  must set remote-as or address-family ipv6-unicast peer-group with remote-as defined

[edit]
vyos@vyos#
  1. We have 2 places for peer-group. I think it will be fixed with default parameter "default no-ipv4-unicast" and replace command syntax.
set protocols bgp 65001 neighbor fcee:eeee:002::2 peer-group 'ibgpv6'
set protocols bgp 65001 neighbor fcee:eeee:002::2 address-family ipv6-unicast peer-group 'ibgpv6'
  1. Commit with route-map in afi-ipv6, in this case (peer-group), don't work
vyos@r-roll# set protocols bgp 65001 neighbor fcee:eeee:002::2 address-family ipv6-unicast route-map export 'ROUTE-V6'
[edit]
vyos@r-roll# commit
[ protocols bgp 65001 ]
[ protocols bgp 65001 neighbor fcee:eeee:002::2 ]
  parameter route-map export is incompatible with a neighbor in a peer-group

[edit]
vyos@r-roll#

I did some tests and the only problem appears when adding a route-map to ipv6.

set policy route-map ROUTE-V4 rule 10 action 'permit'
set policy route-map ROUTE-V6 rule 10 action 'permit'

set protocols bgp 65001 neighbor 10.10.100.2 address-family ipv4-unicast route-map export 'ROUTE-V4'
set protocols bgp 65001 neighbor 10.10.100.2 peer-group 'ibgpv4'
set protocols bgp 65001 neighbor fcee:eeee:002::2 peer-group 'ibgpv6'
set protocols bgp 65001 parameters default no-ipv4-unicast
set protocols bgp 65001 parameters router-id '10.10.100.1'
set protocols bgp 65001 peer-group ibgpv4 address-family ipv4-unicast nexthop-self
set protocols bgp 65001 peer-group ibgpv4 address-family ipv4-unicast route-reflector-client
set protocols bgp 65001 peer-group ibgpv4 remote-as '65001'
set protocols bgp 65001 peer-group ibgpv6 address-family ipv6-unicast nexthop-self
set protocols bgp 65001 peer-group ibgpv6 address-family ipv6-unicast route-reflector-client
set protocols bgp 65001 peer-group ibgpv6 remote-as '65001'

vyos@r-roll# commit
[edit]
vyos@r-roll#

Add route-map to neighbor

set protocols bgp 65001 neighbor fcee:eeee:002::2 address-family ipv6-unicast route-map export 'ROUTE-V6'

vyos@r-roll# commit
[ protocols bgp 65001 ]
[ protocols bgp 65001 neighbor fcee:eeee:002::2 ]
  must set remote-as or address-family ipv6-unicast peer-group with remote-as defined

[edit]
vyos@r-roll#

The problem with this check https://github.com/vyos/vyatta-cfg-quagga/blob/current/scripts/bgp/vyatta-bgp.pl#L1576

	    die "[ protocols bgp $as neighbor $neighbor ]\n  must set remote-as or address-family ipv6-unicast peer-group"
               ." with remote-as defined\n"
		if ($config->exists("$as neighbor $neighbor address-family ipv6-unicast") && 
                   (!defined($peergroup6as) && !defined($remoteas)));

If you comment this check, commit work fine.
@c-po Сan you take a look?

dmbaturin set Issue type to Unspecified (please specify).