Page MenuHomeVyOS Platform

deleting address-family under neighbor will disable neighbor
Closed, ResolvedPublic

Description

Hi,

I have following configuration:

set protocols bgp 1000 neighbor 192.168.8.179 remote-as '2000'
set protocols bgp 1000 parameters router-id '123.123.123.123'
set protocols bgp 1000 neighbor 192.168.8.179 address-family ipv4-unicast soft-reconfiguration inbound
set protocols bgp 1000 neighbor 192.168.8.179 address-family ipv4-unicast allowas-in number 10
set protocols bgp 1000 neighbor 192.168.8.179 address-family ipv4-unicast weight 1000

When I want to delete all configuration under address-family, I just issue following command:

delete  protocols bgp 1000 neighbor 192.168.8.179 address-family
or 
delete  protocols bgp 1000 neighbor 192.168.8.179 address-family ipv4-unicast

unfortunately, either of them just deactivate the bgp neighbor which didn't meet the expectation.

I checked frr configuration:

router bgp 1000
 bgp router-id 123.123.123.123
 neighbor 192.168.8.179 remote-as 2000
 !
 address-family ipv4 unicast
  no neighbor 192.168.8.179 activate
 exit-address-family

When I delete configuration under address-family under neighbor, I just mean that I don't want to configure these parameters rather then disable the neighbor at all, so please help to fix the problem.

best regards.

Details

Difficulty level
Unknown (require assessment)
Version
1.2.x
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Unspecified (possibly destroys the router)
Issue type
Bug (incorrect behavior)

Event Timeline

syncer changed the task status from Open to Needs testing.Mar 28 2020, 12:03 PM
syncer assigned this task to Viacheslav.
syncer triaged this task as Normal priority.
syncer edited projects, added VyOS 1.3 Equuleus; removed VyOS 1.2 Crux.

The reason it such script https://github.com/vyos/vyatta-cfg-quagga/blob/d962ef0f2c15333411e719f7d1b02dd7575ebdee/scripts/bgp/vyatta-bgp.pl#L385
That do

router bgp xxx
 address-family ipv4 unicast 
 no neighbor x.x.x.x activate

I can't find a solution to delete neighbor from AFI (in old perl style), because FRR full delete neighbor if we tried to delete it just from address-family

!
router bgp 64500
 bgp router-id 192.0.2.1
 no bgp ebgp-requires-policy
 no bgp network import-check
 neighbor 192.0.2.2 remote-as 64501
 !
 address-family ipv4 unicast
  neighbor 192.0.2.2 soft-reconfiguration inbound
  neighbor 192.0.2.2 allowas-in 10
  neighbor 192.0.2.2 weight 100
 exit-address-family
!

Delete neighbor from afi

router bgp 64500
  address-family ipv4 unicast 
  no neighbor 192.0.2.2

bgp config after deleting

!
router bgp 64500
 bgp router-id 192.0.2.1
 no bgp ebgp-requires-policy
 no bgp network import-check
!

It seems it is an FRR bug/feature

On the other hand, FRR used AFI ipv4 unicast by default for all neighbors
So if we delete it from AFI 4 it delete neigbhor.

Viacheslav changed the task status from Needs testing to Confirmed.May 27 2021, 12:04 PM
erkin set Issue type to Bug (incorrect behavior).Aug 31 2021, 5:52 PM