Ubuntu Server 20.04-动态IPv4和静态IPv6的Netplan配置

TL; DR

是否有人可以在Ubuntu Server 20.04下使用有效的netplan配置来设置动态IPv4和静态IPv6?

什么有效

My provider (OVH) gave me a server with this configuration in /etc/netplan/50-cloud-init.yaml out of the box:

# This file is generated from information provided by the datasource.  Changes
# to it will not persist across an instance reboot.  To disable cloud-init's
# network configuration capabilities, write a file
# /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg with the following:
# network: {config: disabled}
network:
    version: 2
    ethernets:
        ens3:
            dhcp4: true
            match:
                macaddress: xx:yy:zz:aa:bb:cc
            mtu: 1500
            set-name: ens3

因此,服务器正在通过DHCP获取IPv4地址。一切都在这里工作。

问题

但是,他们还提供了一个静态IPv6(可从该服务器的Web控制台管理中找到),它不在netplan配置中。 我尝试使用如下代码段手动添加它:

network:
    version: 2
    ethernets:
        ens3:
            dhcp6: false
            match:
                name: ens3
            addresses:
              - "dead:beef:404:200::cafe/128"
            gateway6: "dead:beef:404:200::1"

但是没有任何效果:如果IPv4可以正常工作,那么我就没有IPv6,如果我得到了IPv6,它将撤销我的IPv4,并且无法访问服务器。

是否有人为动态IPv4和静态IPv6设置了有效的netplan配置?

It works when I set it manually using ip addr and ip route but I want a permanent configuration using netplan.

谢谢!