Crux - system default gateway: syntax changed?



Guys, really confused and not clear what is wrong with my actions, yet I don’t see system->gateway-address:

vyos@crux# set system
Possible completions:

Configuration management settings
conntrack Connection tracking engine options
console Serial console configuration
Disable DHCP updates of DNS settings
domain-name System domain name
Domain Name Server (DNS) domain completion order
Event-handler configuration
Flow accounting settings
host-name System host name (default: vyos)
ip IPv4 settings
ipv6 IPv6 settings
login User login

  • name-server Domain Name Server (DNS)

ntp Network Time Protocol (NTP) configuration
options System options
Map host names to addresses
sysctl Sysctl options
syslog System logging
Task scheduler settings
time-zone Local time zone
Wireless regulatory domain (mandatory if using the VyOS wireless subsystem)
vyos@crux# run sh ver
Version: VyOS 1.2.0
Built by: Sentrium S.L.
Built on: Sun 27 Jan 2019 19:08 UTC
Build ID: 795d6338-c1ce-4ebb-992f-d064f5af9309

Architecture: x86_64
Boot via: installed image
System type: VMware guest

I’ve added protocols->static for routing all via my def gateway, yet it also doesn’t work, for sure. WTH I’m doing wrong, help please?


There is no “system default-gateway” command anymore. It was a bad idea from the start. We’ve made a script that automatically converts it to a normal “protocols static route” syntax.

As of routes not working, you might have run into
We are still trying to track down its root causes, so any feedback is valuable. If possible, please paste your complete config (anonymyzed).


Well. Fixed my static route from table x (not clear why exactly I’ve used such variant being highly confused by def gateway missing) to just regular static route

vyos@crux# sh protocols
static {
route { next-hop { } } }

So it works ok now, not my case, thank you.

Frankly, not clear why gateway-address such a bad idea even if it is just a wrapper for a “static route” setting. As for me it was much easier to check it out, and it comes over even from juniper os, not only vyatta…

That script, does it work for old version config conversions?


Glad you’ve fixed it. The “protocols static table $num …” is for policy-based routing, routes from non-default tables are only applied to traffic processed by PBR rules.

not clear why gateway-address such a bad idea
Well, three main reasons:

  1. It makes old Occam reach for his razor
  2. It’s a common gotcha when reviewing someone else’s config (where’s that route coming from?)
  3. Setting both a route in protocols and system default-gateway creates unintentional ECMP, and that’s the kind of action at a distance we try to avoid

Also, having settings of the same application (FRR) in multiple config subtrees is a maintenance headache and it complicates script ordering.

Yes, the script checks if a config has the system default-gateway and converts it to a route in “protocols static”. If you ever run into problems with it, please create a bug report.