Page MenuHomeVyOS Platform

Rewrite "protocols vrf" tree in XML and Python
Closed, ResolvedPublicFEATURE REQUEST


One of my not so good decission was to "fast add" protocols vrf using the ancient node.def implementation.

THis turns out to have some limitations as discoverd in T2446. It should be migrated to XML and Python as the CLI nodes are rather new and not too complex (at a first glance).


Difficulty level
Hard (possibly days)
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Config syntax change (migratable)
Issue type
Internal change (not visible to end users)

Event Timeline

c-po removed c-po as the assignee of this task.Sep 13 2020, 4:11 PM
Viacheslav removed Viacheslav as the assignee of this task.
Viacheslav added a subscriber: Viacheslav.

So it turn's out, while looking at the current status more closely, there is a lot of redundancy available which should be migrated away.

VyOS 1.3 - which has the basic VRF functionality implements the following subsystems:

  • protocols vrf <name> route
  • protocols vrf <name> route6
  • protocols vrf <name> interface-route
  • protocols vrf <name> interface-route6

So route and interface-route are more or less the same except for the next-hop - the FRR syntax under the hood provides you:

vyos(config-vrf)# ip route
  A.B.C.D    IP gateway address
  INTERFACE  IP gateway interface name
     eth0 eth1 eth2 lo


  • Migrate the interface-route(6) tree to set protocols vrf <name> static route <network> interface <interface>
  • Drop interface-route(6)

If this works out as expected, the same should happen to the regular protocols static tree

This one looks much more reasonable:

vyos@vyos# set protocols vrf foo static route
Possible completions:
 > blackhole    Silently discard pkts when matched
   interface    IPv4 gateway interface name
+> next-hop     Next-hop router

vyos@vyos# set protocols vrf foo static route next-hop
Possible completions:
   disable      Temporary disable
   distance     Distance for this route
   interface    IPv4 gateway interface name
   vrf          VRF to leak route
c-po triaged this task as Normal priority.
c-po changed Difficulty level from Unknown (require assessment) to Hard (possibly days).
c-po changed Is it a breaking change? from Unspecified (possibly destroys the router) to Config syntax change (migratable).
erkin set Issue type to Internal change (not visible to end users).Aug 30 2021, 6:14 AM
erkin removed a subscriber: Active contributors.