netplan icon indicating copy to clipboard operation
netplan copied to clipboard

routing-policy: add 'iif' and 'oif' keys to routing-policy entry

Open aldobrrrr opened this issue 10 months ago • 3 comments

Description

It's now possible to specify the incoming interface and the outgoing interface for a routing policy entry.

Example:

 network:
  version: 2
  ethernets:
    if0: {}
    eth0:
      dhcp4: true
      routing-policy:
        - table: 101
          iif: eth0
        - table: 101
          oif: if0

Checklist

  • [x] Runs make check successfully.
  • [x] Retains code coverage (make check-coverage).
  • [x] New/changed keys in YAML format are documented.
  • [ ] (Optional) Adds example YAML for new feature.
  • [ ] (Optional) Closes an open bug in Launchpad.

aldobrrrr avatar Feb 20 '25 18:02 aldobrrrr

This would close the languishing Bug 1798417 provided one adds a (symmetric, one hopes) implementation for oif as well :)

Grissess avatar Feb 25 '25 18:02 Grissess

This would close the languishing Bug 1798417 provided one adds a (symmetric, one hopes) implementation for oif as well :)

As you suggested, I added the 'oif' key, thank you!

aldobrrrr avatar Feb 25 '25 23:02 aldobrrrr

@slyon looks like there's a second PR for the same feature here: https://github.com/canonical/netplan/pull/557

guerby avatar Sep 09 '25 19:09 guerby