VRF create weird default route + incorrect syntax

Hi,

I’m trying to setup VRF for my management interface to introduce specific routing scheme.

configure
set vrf name mgmt table 1000
set interfaces eth0 vrf mgmt
set interfaces eth0 address x.x.x.x

Then, documentation says that to add a route inside my VRF, I should use this syntax :

 set protocols vrf <name> static route <subnet> next-hop <address> 

But this does not exist (anymore?). Here is the syntax I found out :

set vrf name mgmt protocols static route  <subnet> next-hop <address>

->

set vrf name mgmt protocols static route 1.2.3.0/24 next-hop x.x.x.254
commit

After I add this route, it’s not displayed within routing table (sh ip route vrf mgmt) :

 K>* 0.0.0.0/0 [255/8192] unreachable...
 C>* 1.2.3.0/24 is directory connected

Problems :

  • My specific route is not displayed
  • A dummy default route appears in my routing table after VRF create
  • Syntax does not match the doc

Here is generated routing config :

Screenshot 2021-03-24 065657

Thanks

Will be fixed in the next rolling
https://phabricator.vyos.net/T3423

Upgraded to latest build (VyOS 1.4-rolling-202103251004). Route is now correctly displayed inside VRF (syntax still does not match doc btw).

But VRF routing still showing unreachable default route :

vyos@vyos:~$ sh ip route vrf mgmt
Codes: K - kernel route, C - connected, S - static, R - RIP,
       O - OSPF, I - IS-IS, B - BGP, E - EIGRP, N - NHRP,
       T - Table, v - VNC, V - VNC-Direct, A - Babel, D - SHARP,
       F - PBR, f - OpenFabric,
       > - selected route, * - FIB route, q - queued, r - rejected, b - backup

VRF mgmt:
K>* 0.0.0.0/0 [255/8192] unreachable (ICMP unreachable), 00:05:29
S>* 10.10.5.0/24 [1/0] via 10.20.252.254, eth0, weight 1, 00:00:18
C>* 10.20.252.0/24 is directly connected, eth0, 00:00:18

I have the feeling that this default route is inherited from outside VRF.

https://www.kernel.org/doc/Documentation/networking/vrf.txt

 This high metric value ensures that the default unreachable route can
   be overridden by a routing protocol suite.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.