Crux - system default gateway: syntax changed?

vyos-1-2

#1

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:

config-management
Configuration management settings
conntrack Connection tracking engine options
console Serial console configuration
disable-dhcp-nameservers
Disable DHCP updates of DNS settings
domain-name System domain name
domain-search
Domain Name Server (DNS) domain completion order
event-handler
Event-handler configuration
flow-accounting
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
static-host-mapping
Map host names to addresses
sysctl Sysctl options
syslog System logging
task-scheduler
Task scheduler settings
time-zone Local time zone
wifi-regulatory-domain
Wireless regulatory domain (mandatory if using the VyOS wireless subsystem)
[edit]
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 0.0.0.0/0 via my def gateway, yet it also doesn’t work, for sure. WTH I’m doing wrong, help please?


#2

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 https://phabricator.vyos.net/T1218
We are still trying to track down its root causes, so any feedback is valuable. If possible, please paste your complete config (anonymyzed).


#3

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 0.0.0.0/0 { next-hop 192.168.10.1 { } } }

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?


#4

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.