Page MenuHomeVyOS Platform

Static route syntax should reflect `ip` command routing capabilities, if possible.
Closed, ResolvedPublicFEATURE REQUEST

Description

The ip command is capable of adding routes to the table that simultaneously define the next-hop and interface.
The current set protocols static route, set protocols static interface-route , and their respective IPv6 sister commands do not reflect this capability. Attempting to use both of these command sets at once causes weird routing table entries, while ip works as expected.

I suggest the following syntax:

set protocols static route <CIDR> next-hop <ADDR>/blackhole
set protocols static route <CIDR> interface <DEV>
set protocols static route <CIDR> distance <1-255>
set protocols static route <CIDR> dhcp-interface
set protocols static route <CIDR> disable

or

set protocols static route <CIDR> next-hop <ADDR>
set protocols static route <CIDR> interface <DEV>
set protocols static route <CIDR> distance <1-255>
set protocols static route <CIDR> dhcp-interface
set protocols static route <CIDR> status blackhole
set protocols static route <CIDR> status disable

or

set protocols static route <CIDR> next-hop <ADDR>
set protocols static route <CIDR> interface <DEV>
set protocols static route <CIDR> distance <1-255>
set protocols static route <CIDR> dhcp-interface
set protocols static route <CIDR> blackhole
set protocols static route <CIDR> disable

With any necessary changes also made to the ipv6 command variants.

I'm not familiar enough with the code base to tell if this is actually a limitation of Quagga or not.

Details

Difficulty level
Unknown (require assessment)
Version
-
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Unspecified (possibly destroys the router)
Issue type
Unspecified (please specify)

Event Timeline

dmbaturin triaged this task as Wishlist priority.May 22 2018, 5:55 AM
dmbaturin added a subscriber: dmbaturin.

Yes, since we let quagga manage static routes (and for a good reason — the kernel does not even try to restore routes if the interface they use flaps), we can only do what quagga allow now, or add something to quagga.

personally I like the below most. it will require quite an amount of work for migration.

set protocols static route <CIDR> next-hop <ADDR>
set protocols static route <CIDR> interface <DEV>
set protocols static route <CIDR> distance <1-255>
set protocols static route <CIDR> dhcp-interface
set protocols static route <CIDR> blackhole
set protocols static route <CIDR> disable

It fixed in 1.3 version. With "next-hop-interface "

[email protected]# set protocols static route 5.5.5.5/32 next-hop 10.230.230.2 next-hop-interface eth2
[edit]
[email protected]# commit

[email protected]# run show ip route 5.5.5.5
Routing entry for 5.5.5.5/32
  Known via "static", distance 1, metric 0, best
  Last update 00:00:35 ago
  * 10.230.230.2, via eth2, weight 1

Vtysh

[email protected]# vtysh -c "sh run" | match 5.5
ip route 5.5.5.5/32 10.230.230.2 eth2
dmbaturin set Is it a breaking change? to Unspecified (possibly destroys the router).
dmbaturin set Issue type to Unspecified (please specify).