2

I would like to add a static ip route to a device in my netplan configuration.

A normal route looks like this:

eth0:
    <stuff>
    routes:
      - to: 10.0.0.0/24
        via: 192.168.3.1

But instead of route to a via address, I would like to add a static route to a device. This can be done with the ip route command like such:

ip route add 10.0.0.0/24 dev eth0

How to achieve this with netplan?

kcid42
  • 21

1 Answers1

4

I struggled too and found your question before finding your answer, so here you go:

eth0:
    <stuff>
    routes:
      - to: 10.0.0.0/24
        scope: link

Apparently 'fixed' here : https://bugs.launchpad.net/netplan/+bug/1747455

MatthieuP
  • 141