Duplicate default routes on VMs with multiple NICs
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
netplan |
Fix Released
|
High
|
Unassigned | ||
netplan.io (Ubuntu) |
Fix Released
|
High
|
Mathieu Trudel-Lapierre | ||
Bionic |
Fix Released
|
Undecided
|
Unassigned | ||
Cosmic |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
[Impact]
DHCP configurations where custom settings (routes) need to be applied. This is a subset of the changes presented in bug 1759014.
[Test case]
1) Configure netplan for the particulars of the network by configuring an appropriate dhcp{4,6}-override stanza:
network:
version: 2
ethernets:
engreen:
dhcp4: true
dhcp4-
use-routes: false
Additionally, if so required, add a custom routes to the configuration. e.g.
routes:
- to: 10.0.0.0/16
via: 13.4.55.78
(See https:/
2) Run 'netplan apply' or reboot to have the configuration applied.
3) Validate that the routes / DNS are properly ignored and/or replaced by the defined values.
[Regression potential]
Minimal; this adds new values to the configuration generated for networkd or NetworkManager. Existing configurations will remain unchanged, but new configurations using the dhcp{4,6}-overrides fields will benefit from additional flexibility.
---
I'm facing issues with OpenStack VMs built from Ubuntu 18.04 cloud image and configured with multiple NICs. I have a solution working on 16.04, which doesn't do any more since the introduction of netplan.
Requirements:
- Multiple interfaces connected to different networks.
- All NICs configured via DHCP to ensure IP address, but also parameters like MTU adapt to the environment automatically.
- Default route is supposed to use one specific NIC and network.
The solution on 16.04 was customization of /etc/dhcp/
option rfc3442-
send host-name = gethostname();
request subnet-mask, broadcast-address, time-offset,
interface "ens3" { request routers, domain-name, domain-
This does no longer work with netplan. I couldn't figure any netplan properties to configure DHCP client to that granularity. And /etc/dhcp/
How am I supposed to solve this on a netplan managed system?
Changed in netplan: | |
status: | New → Triaged |
importance: | Undecided → High |
assignee: | nobody → Mathieu Trudel-Lapierre (cyphermox) |
Ouch, that seems like a nasty bug.
I think the "netplan way" here would be to find a systemd-networkd and/or networkmanager config option, and expose that in the config file. I'll have a look and see if there's one that fits the bill.
Regards,
Daniel