Page MenuHomeVyOS Platform

BGP route-map filtering out valid prefix
Closed, ResolvedPublicBUG

Description

With a route-map in place to allow a given prefix, that prefix is filtered out on export.

With the route map in place, no routes are advertised:

brooks@border# run show ip bgp neighbors 10.10.10.1 advertised-routes
[edit]

But if the route-map is deleted:

brooks@border# delete protocols bgp 397143 neighbor 10.10.10.1 address-family ipv4-unicast route-map
[edit]
brooks@border# commit
[edit]

Everything works as expected:

brooks@border# run show ip bgp neighbors 10.10.10.1 advertised-routes
BGP table version is 1, local router ID is 10.0.100.1, 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
*> 23.157.160.0/24  0.0.0.0                  0    100  32768 i

Total number of prefixes 1

Here is the relevant configuration:

brooks@border# show protocols bgp 397143 neighbor 10.10.10.1
 address-family {
     ipv4-unicast {
         nexthop-self
         route-map {
             export vultr-export
         }
         soft-reconfiguration {
             inbound
         }
     }
     ipv6-unicast {
         nexthop-self
         route-map {
             export vultr-export
         }
         soft-reconfiguration {
             inbound
         }
     }
 }
 description Vultr
 remote-as 397143
brooks@border# show protocols bgp 397143 address-family
 ipv4-unicast {
     network 23.157.160.0/24 {
     }
 }
 ipv6-unicast {
     network 2602:fe2e::/36 {
     }
 }
brooks@border# show policy route-map vultr-export
 rule 10 {
     action permit
     match {
         ip {
             address {
                 prefix-list neptune-networks-prefixes4
             }
         }
         ipv6 {
             address {
                 prefix-list neptune-networks-prefixes6
             }
         }
     }
 }
brooks@border# show policy prefix-list neptune-networks-prefixes4
 rule 10 {
     action permit
     description NEPTUNE-NETWORKS-V4
     prefix 23.157.160.0/24
 }
brooks@border# show policy prefix-list6
 prefix-list6 neptune-networks-prefixes6 {
     rule 10 {
         action permit
         description NEPTUNE-NETWORKS-V6
         le 128
         prefix 2602:fe2e::/36
     }
 }
brooks@border# show protocols static route 23.157.160.0/24
 blackhole {
 }
brooks@border# show protocols static route6 2602:fe2e::/36
 blackhole {
 }

Details

Difficulty level
Unknown (require assessment)
Version
1.2.0-rc6
Why the issue appeared?
Will be filled on close

Event Timeline

I have confirmed this does not happen in 1.1.8. Here is a sample working config in 1.1.8:

policy {
    prefix-list neptune-networks-prefixes4 {
        rule 10 {
            action permit
            prefix 23.157.160.0/24
        }
    }
    route-map vultr-export {
        rule 10 {
            action permit
            match {
                ip {
                    address {
                        prefix-list neptune-networks-prefixes4
                    }
                }
            }
        }
    }
}
protocols {
    bgp 397143 {
        neighbor 10.0.80.62 {
            nexthop-self
            remote-as 397143
            route-map {
                export vultr-export
            }
            soft-reconfiguration {
                inbound
            }
        }
        network 23.157.160.0/24 {
        }
        parameters {
            router-id 10.0.80.61
        }
    }
    static {
        route 23.157.160.0/24 {
            blackhole {
            }
        }
    }
}
vyos@vyos# run show ip bgp neighbors 10.0.80.62 advertised-routes
BGP table version is 0, local router ID is 10.0.80.61
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              r RIB-failure, S Stale, R Removed
Origin codes: i - IGP, e - EGP, ? - incomplete

   Network          Next Hop            Metric LocPrf Weight Path
*> 23.157.160.0/24  10.0.80.61               0    100  32768 i

Total number of prefixes 1

Ah, I see the problem. You can't have both ip and ipv6 in the same route-map match rule.