0

I'm attempting to update my netplan config to use a routes directive instead of gateway6 since gateway6 is deprecated.

My working configuration file looks like this:

# /etc/netplan/51-cloud-init-ipv6.yaml
network:
    version: 2
    ethernets:
        eno1:
            dhcp6: no
            match:
              name: eno1
            addresses:
              - "2607:5300:60:2e26::1/128"
            gateway6: "2607:5300:0060:2eff:ff:ff:ff:ff"
            routes:
              - to: "2607:5300:0060:2eff:ff:ff:ff:ff"
                scope: link

While researching, I found this answer suggesting I update my config to look like this:

# /etc/netplan/51-cloud-init-ipv6.yaml
network:
    version: 2
    ethernets:
        eno1:
            dhcp6: no
            match:
              name: eno1
            addresses:
              - "2607:5300:60:2e26::1/128"
            routes:
              - to: default
                via: "2607:5300:0060:2eff:ff:ff:ff:ff"

However, with this configuration, ping6 fails with the error Temporary failure in name resolution.

I have tried multiple combinations of options for routes, including:

routes:
  - to: default
    via: "2607:5300:0060:2eff:ff:ff:ff:ff"
    scope: link

routes:

  • to: default via: "2607:5300:0060:2eff:ff:ff:ff:ff" scope: link

routes:

  • to: "2607:5300:0060:2eff:ff:ff:ff:ff" via: "2607:5300:0060:2eff:ff:ff:ff:ff"

etc. I am unsure of how to convert the gateway6 directive to a routes directive successfully. Any advice would be appreciated. Thanks!

Ralph
  • 103

1 Answers1

2

You previously had in your config:

        routes:
          - to: "2607:5300:0060:2eff:ff:ff:ff:ff"
            scope: link

This is a separate route from the default route. You should not drop or modify this when moving from gateway6 to routes.

Your final routes stanza should look like:

        routes:
          - to: "2607:5300:0060:2eff:ff:ff:ff:ff"
            scope: link
          - to: default
            via: "2607:5300:0060:2eff:ff:ff:ff:ff"
slangasek
  • 5,828