Skip to content

Incorrect FRR configuration occurs if we set up import VRF routing after the FRR service is restarted in version 9.0.2/10.0.0/master #16355

Closed
@skyblueted

Description

@skyblueted

Description

Scenario: [Router A] <--iBGP, AS 64600, vrf: default--> [Router B] <--iBGP, AS65500, vrf: vrf1--> [Router C]

We want to establish two iBGP peers. Router B and Router C will establish a peer connection through VRF vrf1, and then import the routing information from Router B to Router A's default VRF.

Everything works as expected initially, until we restart the FRR service. After the restart, the running config is different from FRR configuration. If we run the 'vtysh -b' command, we will get 'BGP is already running; AS is XXXXX'

Additionally, when we remove the 'import vrf vrf1' configuration and then restart the FRR service, the FRR configuration returns to normal.

Version

FRR version: 9.0.2/10.0.0
Kernel version: 6.2.0-39-generic

How to reproduce

Using frr version 9.0.2 or 10.0.0

  • Set up vrf table in linux kernel by iproute2

    ip link add vrf1 type table (table ID)
    ip link set vrf1 up
    ip link set eno5 master vrf1

  • Establish two sets of iBGP peers using two different AS numbers: one in the default VRF (AS 64600) and the other in VRF1 (AS 65500)

  • Restart FRR service

  • vtysh -b
    It will return the result

BGP is already running; AS is 64600
line 63: Failure to communicate[13] to bgpd, line: router bgp 65500 vrf vrf1
line 64: % Unknown command[4]: bgp router-id 10.10.10.46
line 65: % Unknown command[4]: neighbor vm_fabric peer-group
line 66: % Unknown command[4]: neighbor vm_fabric remote-as 65500
line 67: % Unknown command[4]: neighbor vm_fabric description Internal VM Network
line 68: % Unknown command[4]: neighbor vm_fabric bfd
line 69: % Unknown command[4]: neighbor vm_fabric bfd profile bfd_template

Expected behavior

Restarting the FRR service should not affect the FRR configuration file

router bgp 64600
bgp router-id 10.10.10.46
neighbor fabric peer-group
neighbor fabric remote-as 64600
neighbor fabric timers connect 10
neighbor fabric capability extended-nexthop
neighbor eno5 interface peer-group fabric
!
address-family ipv4 unicast
redistribute kernel route-map route_filter
redistribute connected route-map route_filter
neighbor fabric soft-reconfiguration inbound
maximum-paths 64
maximum-paths ibgp 64
import vrf vrf1
exit-address-family
!
address-family ipv6 unicast
redistribute kernel route-map v6_filter
redistribute connected route-map v6_filter
neighbor fabric activate
neighbor fabric soft-reconfiguration inbound
maximum-paths 64
maximum-paths ibgp 64
import vrf vrf1
exit-address-family
exit
!
router bgp 65500 vrf vrf1
bgp router-id 10.10.10.46
neighbor vrf1_fabric peer-group
neighbor vrf1_fabric remote-as 65500
neighbor vrf1_fabric timers connect 10
neighbor vrf1_fabric capability extended-nexthop
neighbor br interface peer-group vrf1_fabric
!
address-family ipv4 unicast
redistribute kernel route-map route_filter
redistribute connected route-map route_filter
neighbor vrf1_fabric default-originate
neighbor vrf1_fabric soft-reconfiguration inbound
maximum-paths 64
maximum-paths ibgp 64
exit-address-family
!
address-family ipv6 unicast
redistribute kernel route-map v6_filter
redistribute connected route-map v6_filter
neighbor vrf1_fabric activate
neighbor vrf1_fabric default-originate
neighbor vrf1_fabric soft-reconfiguration inbound
maximum-paths 64
maximum-paths ibgp 64
exit-address-family
exit

Actual behavior

The FRR configuration settings disappeared, and the AS number changed from 65500 to 64600.

router bgp 64600
bgp router-id 10.10.10.46
neighbor fabric peer-group
neighbor fabric remote-as 64600
neighbor fabric timers connect 10
neighbor fabric capability extended-nexthop
neighbor eno5 interface peer-group fabric
!
address-family ipv4 unicast
redistribute kernel route-map route_filter
redistribute connected route-map route_filter
neighbor fabric soft-reconfiguration inbound
maximum-paths 64
maximum-paths ibgp 64
import vrf vrf1
exit-address-family
!
address-family ipv6 unicast
redistribute kernel route-map v6_filter
redistribute connected route-map v6_filter
neighbor fabric activate
neighbor fabric soft-reconfiguration inbound
maximum-paths 64
maximum-paths ibgp 64
import vrf vrf1
exit-address-family
exit
!
> router bgp 64600 vrf vrf1
exit

Additional context

No response

Checklist

  • I have searched the open issues for this bug.
  • I have not included sensitive information in this report.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions