'gateway4' is cumbersome

Bug #1756590 reported by Mark Shuttleworth
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Netplan
Fix Released
Medium
Mathieu Trudel-Lapierre

Bug Description

Most of us still live in an IPv4 world, and being explicit about that seems cumbersome. Could the syntax for netplan accommodate these:

  gateway: v4-addr
  gateway: v6-addr
  gateway: [ v4-addr, v6-addr ]

In other words, either give the one, or the other, or a list of both?

Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote :

The list looks to me like a support case waiting to happen. It might have people think they can add more ipv4 addresses as "gateway", and then they might not get the behavior they expect (should it be multiple gateways at the same metric? only the last applies? etc.)

I wonder if it would work well to deprecate that syntax and instead push for people to write routes: ; provided we make it easier and clearer to write a default route.

Changed in netplan:
status: New → Triaged
importance: Undecided → Medium
assignee: nobody → Mathieu Trudel-Lapierre (cyphermox)
Revision history for this message
Mark Shuttleworth (sabdfl) wrote :

I don't think the risk is very high, since 'netplan generate' would surely provide helpful feedback ;)

Revision history for this message
Lukas Märdian (slyon) wrote :

After some more discussion with the netplan team, we decided to deprecate the 'gateway4/6' fields in favor of using 'default' routes. The 'to: default' stanza was introduced to the routing configuration, which is a shortcut that works in the same way for IPv4 and IPv6.

The documentation was updated accordingly, and if somebody uses the (now deprecated) gateway4/6 fields it will still work, but print a warning.

https://github.com/canonical/netplan/pull/216

This is available as of netplan.io 0.103

Changed in netplan:
status: Triaged → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.