Skip to content

[enhancement]: Disable IPv4 to setup a IPv6 only network by cloud-init with netplan or Networkmanager #6685

@ruishuangw

Description

@ruishuangw

Enhancement

We previously submitted a PR regarding a similar issue in cloud-init (see #5452). @blackboxsw suggested customizing the VM without IPv4 settings in the network config and provided a sample for an IPv6-only configuration (specifically for the sysconfig renderer).

However, while implementing this feature in cloud-init, we discovered that this approach only works for sysconfig. The netplan and NetworkManager renderers continue to enable DHCPv4 by default.

We are reopening this PR to seek further guidance. Specifically, we hope cloud-init can provide a native way to disable IPv4, such as adding a disable_ipv4 (or disablev4) option to the network configuration schema(v1 & v2).
V1:

Subnet types are one of the following:
dhcp4: Configure this interface with IPv4 dhcp.
dhcp: Alias for dhcp4.
dhcp6: Configure this interface with IPv6 dhcp.
static: Configure this interface with a static IPv4.
static6: Configure this interface with a static IPv6.
ipv6_dhcpv6-stateful: Configure this interface with dhcp6.
ipv6_dhcpv6-stateless: Configure this interface with SLAAC and DHCP.
ipv6_slaac: Configure address with SLAAC.
manual : Manual configure this interface.

V2:

dhcp4: <(bool)>
Enable DHCP for IPv4. Off by default.
dhcp6: <(bool)>
Enable DHCP for IPv6. Off by default.

Alternatively, we would appreciate any other recommended workarounds that ensure IPv4 is completely disabled across all renderers. This would significantly improve the end-user experience by providing cleaner network control.

We value your expertise and ongoing support in helping us refine this approach. Thanks again for your time and guidance!

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestincompleteAction required by submitter

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions