1.2 rolling - static routes not working


#1

Hi there,

Using vyos-1.2.0-rolling+201903120337-amd64, problem when adding /24 static routes into VyOS so they propagate into BGP.

If I add a static route via conf it doesn’t propagate into the routing table:
# set pro static route 193.x.x.0/24 next-hop 10.254.254.2 distance 1
# commit
# save
# exit
$ sh ip route 193.x.x.0/24
% Network not in table
$ sh ip bgp 193.x.x.0/24
% Network not in table

But if I add the route via sudo, it appears as a kernel route, but not into BGP because we don’t allow kernel routes to redistribute:
$ sudo ip route add 193.x.x.0/24 via 10.254.254.2
$ sh ip route 193.x.x.0/24
Routing entry for 193.x.x.0/24
Known via "kernel", distance 0, metric 0, best
Last update 00:00:05 ago
* 10.254.254.2, via eth1
$ sh ip bgp 193.x.x.0/24
% Network not in table

The local IP on the router is 10.254.254.253, the next hop, 10.254.254.2 is directly connected on a flat ethernet segment, connectivity between the hosts is fine.

To me it seems that there’s something wrong with how static routes are being injected from config mode. I’ve found similar posts on here, and on google relating to Ubnt’s version of Vyatta, but nothing specific to VyOS 1.2, and nothing helpful as yet. Has anyone else seen this? any ideas?

PS - this works fine on VyOS 1.1.8

Thanks,
Stuart.


#2

What do you have in your route map allowed?


#3

The prefix is allowed in a prefix-list, the prefix list is allowed in the route-map, and the route-map is the export within BGP. The route however never gets injected into BGP because it needs to be in the routing table locally first :frowning:

# sh pol route-map 
 route-map BGP-Export-To-Carrier {
     rule 1 {
         action permit
         match {
             ip {
                 address {
                     prefix-list BGP-Export-To-Carrier
                 }
             }
         }
     }
     rule 2 {
         action permit
         match {
             ip {
                 address {
                     prefix-list BGP-Blackhole
                 }
             }
         }
     }
 }
# sh pol prefix-list BGP-Export-To-Carrier
<snip>
     rule 9 {
         action permit
         prefix 193.x.x.0/24
     }
<snip>

#4

Hello, @hahosting!
Could you show us a full configuration of your interfaces and protocols sections and output of the show ip route?