1

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?

1 Answer 1

1

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.