Score:0

netplan - trouble converting gateway6 to "to/via" directive

rs flag

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!

Score:1
us flag

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"
RalphORama avatar
rs flag
this + `systemctl reboot` fixed my issue, thank you very much!
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.