Please allow netplan to specify route proto
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Netplan |
Triaged
|
Wishlist
|
Unassigned |
Bug Description
TL;DR:
The following Netplan config
```
routes:
- to: 10.100.1.15/32
scope: link
```
produces route
```
10.100.1.15 dev mynet-shim proto static scope link
```
However I want this instead (note the absent `proto static`):
```
10.100.0.15 dev mynet-shim scope link
```
Which was produced using:
```
ip route add 10.100.0.15/32 dev mynet-shim
```
Background:
I am using a network shim to connect to an IP address of a local Docker container. The Docker container has IP 10.100.0.15. Technique described here: https:/
Here's my routing workaround script `/etc/networkd-
```
#!/bin/sh
/sbin/ip route add 10.100.0.15/32 dev mynet-shim
```
Info on route proto boot vs route proto static: https:/
This seems to be supported by systemd-networkd, generally ("proto static" being the default): https:/ /www.freedeskto p.org/software/ systemd/ man/latest/ systemd. network. html#Protocol=
Do you know if the Protocol field can be set via NetworkManager, too? What's the config option?
Can you please give some more context on the usecase, why you want to change this setting? It seems to be mostly for informational purposes for the sysadmin (about the route origin, e.g. "kernel", "dhcp", "boot", "static", "ra"). Maybe it should be set to "proto netplan" implicitly, instead of making it a dynamic config option?
I'm marking it as a wishlist item, additional details could also be discussed in a future pull-request.