Frr: Connected route not advertised to neighbors

Created on 12 Apr 2020  路  13Comments  路  Source: FRRouting/frr

Connected route not advertised to neighbors

Host is Ubuntu 18.04
Route appears to be advertised with frr 6.0.3 release, but frr 7.3 and frr-7.4-dev-324-geb728e074 do not advertise the route.

[x] Did you check if this is a duplicate issue?
[x] Did you test it on the latest FRRouting/frr master branch?

To Reproduce

Relevant config:

router bgp 4212714420
 bgp bestpath as-path multipath-relax
 bgp bestpath compare-routerid
 neighbor leafs peer-group
 neighbor leafs remote-as external
 neighbor leafs capability extended-nexthop
 neighbor enp59s0f0 interface peer-group leafs
 neighbor enp59s0f1 interface peer-group leafs
 !
 address-family ipv4 unicast
  network 10.194.1.180/32
  redistribute connected route-map LOCAL_ROUTES
  neighbor leafs filter-list HOST_ORIGINATED_ROUTES out
 exit-address-family
 !
 address-family ipv6 unicast
  neighbor leafs activate
  neighbor leafs prefix-list DEFAULT_FILTER in
 exit-address-family
!
ip prefix-list DEFAULT_FILTER seq 10 permit 0.0.0.0/0
!
route-map LOCAL_ROUTES permit 10
 match interface dummy0
!
route-map SET_SOURCE permit 10
!

check connected route is present...

# show ip route 10.194.1.180/32 
Routing entry for 10.194.1.180/32
  Known via "connected", distance 0, metric 0, best
  Last update 00:00:29 ago
  * directly connected, dummy0

check that route-map is reasonable...

# show bgp ipv4 route-map LOCAL_ROUTES 
BGP table version is 187, local router ID is 10.194.1.180, vrf id 0
Default local pref 100, local AS 4212714420
Status codes:  s suppressed, d damped, h history, * valid, > best, = multipath,
               i internal, r RIB-failure, S Stale, R Removed
Nexthop codes: @NNN nexthop's vrf id, < announce-nh-self
Origin codes:  i - IGP, e - EGP, ? - incomplete

   Network          Next Hop            Metric LocPrf Weight Path
*  10.194.1.180/32  v56.local               0         32768 ?

Displayed  1 routes and 372 total paths

Look for route advertisement:

# show bgp neighbors enp59s0f0 advertised-routes
#

Expected behavior

# show ip bgp neighbors enp59s0f0 advertised-routes 
BGP table version is 536, local router ID is 10.194.1.180
Status codes: s suppressed, d damped, h history, * valid, > best, = multipath,
              i internal, r RIB-failure, S Stale, R Removed
Origin codes: i - IGP, e - EGP, ? - incomplete

   Network          Next Hop            Metric LocPrf Weight Path
*> 10.194.1.180/32  0.0.0.0                  0         32768 i

Total number of prefixes 1

Versions

  • OS Kernel: Linux v56.local 4.15.0-96-generic #97-Ubuntu SMP Wed Apr 1 03:25:46 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
  • FRR Version 7.3

Additional context

Struggling with this, because 6.0.3 has other issues for us. We have hosts working with the same config on frr 4.0, but they are Centos hosts.

Not seeing any indication in the changelogs as to why this might be happening.

bgp

Most helpful comment

All appears good substituting ip for bgp in the access-list looks like the fix.

Let me close this, since it appears from the directive changed between 6.0.3 and 7

All 13 comments

@robmbrooks -> Try show bgp ipv4 uni neighbor s enp59s0f0 advertised-routes

@donaldsharp

v56.local# show bgp ipv4 unicast neighbors enp59s0f0 advertised-routes 
v56.local#

full comparison...

# vtysh 

Hello, this is FRRouting (version 6.0.3).
Copyright 1996-2005 Kunihiro Ishiguro, et al.

v56.local# show bgp ipv4 unicast neighbors enp59s0f0 advertised-routes
BGP table version is 1, local router ID is 10.194.1.180, vrf id 0
Status codes:  s suppressed, d damped, h history, * valid, > best, = multipath,
               i internal, r RIB-failure, S Stale, R Removed
Nexthop codes: @NNN nexthop's vrf id, < announce-nh-self
Origin codes:  i - IGP, e - EGP, ? - incomplete

   Network          Next Hop            Metric LocPrf Weight Path
*> 10.194.1.180/32  0.0.0.0                  0         32768 i

Total number of prefixes 1

frr upgraded by apt and restarted...

# vtysh 

Hello, this is FRRouting (version 7.3).
Copyright 1996-2005 Kunihiro Ishiguro, et al.

v56.local# show bgp ipv4 unicast neighbors enp59s0f0 advertised-routes
v56.local#

as noted git release behaves the same.

I'll check this.

@robmbrooks I can't reproduce this with the following configuration:
r1:

router bgp 100
 neighbor leafs peer-group
 neighbor leafs remote-as external
 neighbor leafs capability extended-nexthop
 neighbor eth1 interface peer-group leafs
 !
 address-family ipv4 unicast
  redistribute connected route-map LOCAL_ROUTES
 exit-address-family
!
route-map LOCAL_ROUTES permit 10
 match interface dummy0
!
line vty
!

r2:

router bgp 200
 neighbor eth1 interface remote-as external
!

r1 advertised routes:

exit1-debian-9# sh ip bgp neighbors eth1 advertised-routes 
BGP table version is 1, local router ID is 192.168.0.1, vrf id 0
Default local pref 100, local AS 100
Status codes:  s suppressed, d damped, h history, * valid, > best, = multipath,
               i internal, r RIB-failure, S Stale, R Removed
Nexthop codes: @NNN nexthop's vrf id, < announce-nh-self
Origin codes:  i - IGP, e - EGP, ? - incomplete

   Network          Next Hop            Metric LocPrf Weight Path
*> 10.194.1.180/32  0.0.0.0                  0         32768 ?

Total number of prefixes 1
exit1-debian-9# 

r1 10.194.1.80/32 route:

exit1-debian-9# sh ip route 10.194.1.180/32
Routing entry for 10.194.1.180/32
  Known via "connected", distance 0, metric 0, best
  Last update 00:02:00 ago
  * directly connected, dummy0

r2 bgp route:

spine1-debian-9# sh ip bgp 
BGP table version is 6, local router ID is 192.168.3.2, vrf id 0
Default local pref 100, local AS 200
Status codes:  s suppressed, d damped, h history, * valid, > best, = multipath,
               i internal, r RIB-failure, S Stale, R Removed
Nexthop codes: @NNN nexthop's vrf id, < announce-nh-self
Origin codes:  i - IGP, e - EGP, ? - incomplete

   Network          Next Hop            Metric LocPrf Weight Path
*> 10.194.1.180/32  eth1                     0             0 100 ?

Displayed  1 routes and 1 total paths
spine1-debian-9# 

I need more details from you:

show ip bgp neighbor enp59s0f0
show access-list HOST_ORIGINATED_ROUTES

here we go...

v56.local# show ip bgp neighbor enp59s0f0
BGP neighbor on enp59s0f0: fe80::6600:6aff:fee5:7247, remote AS 65025, local AS 4212714420, external link
Hostname: leaf25-01
 Member of peer-group leafs for session parameters
  BGP version 4, remote router ID 10.252.0.25, local router ID 10.194.1.180
  BGP state = Established, up for 4d00h19m
  Last read 00:00:02, Last write 00:00:02
  Hold time is 9, keepalive interval is 3 seconds
  Neighbor capabilities:
    4 Byte AS: advertised and received
    AddPath:
      IPv4 Unicast: RX advertised IPv4 Unicast and received
      IPv6 Unicast: RX advertised IPv6 Unicast and received
    Extended nexthop: advertised and received
      Address families by peer:
                   IPv4 Unicast
    Route refresh: advertised and received(old & new)
    Address Family IPv4 Unicast: advertised and received
    Address Family IPv6 Unicast: advertised and received
    Address Family L2VPN EVPN: received
    Hostname Capability: advertised (name: v56.local,domain name: n/a) received (name: leaf25-01,domain name: n/a)
    Graceful Restart Capabilty: advertised and received
      Remote Restart timer is 120 seconds
      Address families by peer:
        none
  Graceful restart information:
    End-of-RIB send: IPv4 Unicast, IPv6 Unicast
    End-of-RIB received: IPv4 Unicast, IPv6 Unicast
  Message statistics:
    Inq depth is 0
    Outq depth is 0
                         Sent       Rcvd
    Opens:                  1          1
    Notifications:          0          0
    Updates:                2        341
    Keepalives:        115571     115577
    Route Refresh:          0          0
    Capability:             0          0
    Total:             115574     115919
  Minimum time between advertisement runs is 0 seconds

 For address family: IPv4 Unicast
  leafs peer-group member
  Update group 1, subgroup 1
  Packet Queue length 0
  Community attribute sent to this neighbor(all)
  Outbound path policy configured
  Outgoing update AS path filter list is HOST_ORIGINATED_ROUTES
  188 accepted prefixes

 For address family: IPv6 Unicast
  leafs peer-group member
  Update group 2, subgroup 2
  Packet Queue length 0
  Community attribute sent to this neighbor(all)
  Inbound path policy configured
  Incoming update prefix filter list is DEFAULT_FILTER
  0 accepted prefixes

  Connections established 1; dropped 0
  Last reset 4d00h19m,   Waiting for NHT
Local host: fe80::ba59:9fff:fede:3b10, Local port: 58990
Foreign host: fe80::6600:6aff:fee5:7247, Foreign port: 179
Nexthop: 169.254.166.55
Nexthop global: fe80::ba59:9fff:fede:3b10
Nexthop local: fe80::ba59:9fff:fede:3b10
BGP connection: shared network
BGP Connect Retry Timer in Seconds: 10
Read thread: on  Write thread: on  FD used: 25

second command give me issues...

v56.local# show access-list HOST_ORIGINATED_ROUTES
% Unknown command: show access-list HOST_ORIGINATED_ROUTES

these look close...

v56.local# show bgp as-path-access-list  HOST_ORIGINATED_ROUTES
v56.local# show ip as-path-access-list  HOST_ORIGINATED_ROUTES
v56.local#

but are not giving output...

the later is different on a working Centos host...

v55.local# show ip as-path-access-list  HOST_ORIGINATED_ROUTES
AS path access list HOST_ORIGINATED_ROUTES
    permit ^$
Outbound path policy configured
  Outgoing update AS path filter list is HOST_ORIGINATED_ROUTES

could you remove that AS path filter and check again?

And please show the full configuration: /etc/frr/frr.conf, because looks like something is missing here.

could you remove that AS path filter and check again?

v56.local(config)# router bgp 4212714420
v56.local(config-router)#  address-family ipv4 unicast
v56.local(config-router-af)# no  neighbor leafs filter-list HOST_ORIGINATED_ROUTES out
v56.local(config-router-af)# exit
v56.local(config-router)# exit
v56.local(config)# exit
v56.riskiq# show bgp ipv4 unicast neighbors enp59s0f0 advertised-routes
BGP table version is 193, local router ID is 10.194.1.180, vrf id 0
Default local pref 100, local AS 4212714420
Status codes:  s suppressed, d damped, h history, * valid, > best, = multipath,
               i internal, r RIB-failure, S Stale, R Removed
Nexthop codes: @NNN nexthop's vrf id, < announce-nh-self
Origin codes:  i - IGP, e - EGP, ? - incomplete

   Network          Next Hop            Metric LocPrf Weight Path
*> 0.0.0.0/0        ::                                     0 65025 64600 64500 i
*> 10.192.8.0/22    ::                                     0 65025 64600 i
*> 10.192.12.0/22   ::                                     0 65025 64600 i
*> 10.194.0.0/16    ::                                     0 65025 64600 64500 i
*> 10.194.1.50/32   ::                                     0 65025 64600 65122 4212714290 i
*> 10.194.1.51/32   ::                                     0 65025 64600 65122 4212714291 i
*> 10.194.1.52/32   ::                                     0 65025 64600 65122 4212714292 i
[...more routes...]
Total number of prefixes 190

And please show the full configuration: /etc/frr/frr.conf, because looks like something is missing here.

frr version 4.0+cl3u6
frr defaults datacenter
hostname v56.local
!
log file /var/log/frr/frr.log
!
log timestamp precision 6
!
interface enp59s0f0
 ipv6 nd ra-interval 10
 no ipv6 nd suppress-ra
!
interface enp59s0f1
 ipv6 nd ra-interval 10
 no ipv6 nd suppress-ra
!
router-id 10.194.1.180
!
router bgp 4212714420
 bgp bestpath as-path multipath-relax
 bgp bestpath compare-routerid
 neighbor leafs peer-group
 neighbor leafs remote-as external
 neighbor leafs capability extended-nexthop
 neighbor enp59s0f0 interface peer-group leafs
 neighbor enp59s0f1 interface peer-group leafs
 !
 address-family ipv4 unicast
  network 10.194.1.180/32
  neighbor leafs activate
  redistribute connected route-map LOCAL_ROUTES
  neighbor leafs filter-list HOST_ORIGINATED_ROUTES out
 exit-address-family
 !
 address-family ipv6 unicast
  neighbor leafs activate
  neighbor leafs prefix-list DEFAULT_FILTER in
 exit-address-family
 !
 address-family evpn
  neighbor leafs activate
  advertise-all-vni
 exit-address-family
!
ip prefix-list DEFAULT_FILTER seq 10 permit 0.0.0.0/0
!

!
route-map LOCAL_ROUTES permit 10
 match interface dummy0
!
route-map SET_SOURCE permit 10
  set src 10.194.1.180
!
ip protocol bgp route-map SET_SOURCE
!
line vty
!

Compared with the running conifg it looks like frr 7.3 does not accept:

ip as-path access-list HOST_ORIGINATED_ROUTES permit ^$

I see bgp as-path access-list but adding...

bgp as-path access-list HOST_ORIGINATED_ROUTES permit ^$

does not cause the route to be advertised.

Okay, let me check it with the latest info you provided.

@ton31337 I adjusted frr.conf with

bgp as-path access-list HOST_ORIGINATED_ROUTES permit ^$

And the route advertisement looks as expected after a restart, not entirely sure why adding the line via conf t did not produce the desired result :-/

So, the problem is gone?

All appears good substituting ip for bgp in the access-list looks like the fix.

Let me close this, since it appears from the directive changed between 6.0.3 and 7

Was this page helpful?
0 / 5 - 0 ratings

Related issues

louberger picture louberger  路  9Comments

thilse picture thilse  路  7Comments

hansengao picture hansengao  路  5Comments

ne-vlezay80 picture ne-vlezay80  路  5Comments

mshuttle76 picture mshuttle76  路  6Comments