1. Home
  2. Knowledge Base
  3. Product
  4. Networking
  5. Configure IPv6 on a Cloud VM (Netplan)

Configure IPv6 on a Cloud VM (Netplan)

Knowledge Base  ·  Networking
Configure IPv6 on a Cloud VM (Netplan)
Manually assign a static IPv6 address via Netplan on Ubuntu and prevent cloud-init from overwriting it on every reboot.
⏱ 5–10 minutes👤 All Users🌐 Ubuntu 24.04 · Netplan📍 IN-WEST3 Region
🌐
What You’ll Accomplish
This guide walks you through getting your IPv6 address from the CloudPe dashboard, disabling cloud-init network regeneration, editing your Netplan YAML config to add the static IPv6 address and route, applying the changes live, and verifying connectivity — all without rebooting or losing access to your VM.
Prerequisites
Ensure these are in place before you begin
💻
Running Cloud VM
Ubuntu 24.04 VM already deployed on CloudPe
🔐
Root / sudo Access
SSH into the VM as root or a sudo-capable user
🌐
IPv6 Enabled Region
VM is in a region that provides IPv6 (e.g. IN-WEST3)
1
Get Your IPv6 Address from the Dashboard
CloudPe Console → Virtual Machines → VM Overview → Network
1
Open the VM Overview page
Log in to cmp.dashboard.controlcloud.app. From the left sidebar navigate to Compute → Virtual Machines and click on your VM name to open its overview.
2
Note down both IP addresses from the Network card
In the Overview tab, locate the Network card (highlighted in green). Write down both your IPv4 address and your IPv6 address — you will need them in Step 3.
CloudPe CMP — VM Overview
Overview
Volumes (1)
Network Interfaces (1)
Audit Log
ubuntu24.04
Ubuntu-24.04
U
Storage
30 GiB
💾
Network
188.241.61.13
2405:7140:4::1eb
🌐
Performance
1 vCPU
4 GiB RAM
Region
🇮🇳 IN-WEST3
📍
ID1a177cdb-8c8e-4082-b6af-bac10f0e8130
Fig 1.1 — VM Overview showing the Network card with IPv4 and IPv6 addresses highlighted in green.
ℹ Note your addressesYou need both: the IPv4 address (e.g. 188.241.61.13) and the IPv6 address (e.g. 2405:7140:4::1eb). Both go into the Netplan config in Step 3.
2
Disable Cloud-Init Network Management
Prevents Netplan from being overwritten on every reboot
By default, cloud-init regenerates /etc/netplan/50-cloud-init.yaml on every reboot, wiping any manual changes. Disable this before editing Netplan.
⚠ Do this firstComplete this step before editing the Netplan file — otherwise your changes will be lost after the next reboot.
1
SSH into your VM and run the following commands
Navigate to the cloud-init config directory and rename the auto-netplan file to disable it:
bash — root@vm
# Navigate to cloud-init config directory
cd /etc/cloud/cloud.cfg.d/
# Rename to disable auto netplan regeneration
mv 99-run-auto-netplan.cfg 99-run-auto-netplan.cfg.disabled
✓ Reboot-safeYour manual Netplan config will now survive reboots. To re-enable cloud-init later, rename the file back by removing the .disabled suffix.
3
Edit the Netplan Configuration File
/etc/netplan/50-cloud-init.yaml
1
Open the file in a text editor
The file already contains your IPv4 settings. You will add the IPv6 address and route to it.
bash — root@vm
nano /etc/netplan/50-cloud-init.yaml
2
Replace the file contents with the following YAML
Keep your actual IPv4 address in the addresses list and substitute your IPv6 address if it differs.
yaml — /etc/netplan/50-cloud-init.yaml
network:
version: 2
ethernets:
enp1s0:
dhcp4: true
dhcp6: false
optional: true
addresses:
188.241.61.13/24
2405:7140:4::1eb/64
routes:
– to: ::/0
via: 2405:7140:4::1
root@vm:/etc/cloud/cloud.cfg.d# cat /etc/netplan/50-cloud-init.yaml
network:
version: 2
ethernets:
enp1s0:
dhcp4: true
dhcp6: false
optional: true
addresses:
– 188.241.61.13/24
– 2405:7140:4::1eb/64
routes:
– to: ::/0
via: 2405:7140:4::1
root@vm:/etc/cloud/cloud.cfg.d#
Fig 3.1 — Final Netplan YAML config with IPv4 and IPv6 addresses, and the IPv6 default route.
⚠ YAML Indentation WarningYAML is whitespace-sensitive. Use 2-space indentation throughout — tabs will cause a parse error. The addresses and routes blocks must be indented under enp1s0.
4
Apply the Netplan Configuration
Makes changes live without rebooting
Apply your changes immediately using netplan apply. This reconfigures the network interface without requiring a reboot — your SSH session stays alive.
bash — root@vm
netplan apply
ℹ Syntax error recoveryIf Netplan reports a YAML syntax error, run netplan try instead — it applies changes with a 120-second auto-revert timer if something goes wrong.
5
Verify the IPv6 Address is Assigned
Confirm everything is working correctly
Run the following commands to confirm the IPv6 address has been assigned and is reachable.
bash — root@vm
# Check IPv6 is assigned (look for your 2405:… address)
ip -6 addr show enp1s0
# Check IPv6 routing table
ip -6 route show
# Ping to confirm connectivity
ping6 2405:7140:4::1eb
A successful setup shows your 2405:7140:4::1eb address listed as scope global (not link-local) in the ip addr output.
Expected IPv6 address
2405:7140:4::1eb/64
Expected scope
scope global
Default IPv6 route
::/0 via 2405:7140:4::1
Cloud-init disabled
99-run-auto-netplan.cfg.disabled
✓ Setup completeIf ping6 returns responses, your IPv6 is fully configured and will persist across reboots.
?
Frequently Asked Questions
Common issues and answers
Why must I disable cloud-init before editing Netplan?
Cloud-init writes a fresh 50-cloud-init.yaml on every boot using metadata from the cloud provider. If you edit the file first without disabling cloud-init, your changes will be overwritten on the next reboot.
My SSH connection dropped after running netplan apply — what happened?
This usually means the IPv4 configuration changed unexpectedly. Use netplan try instead of netplan apply — it auto-reverts after 120 seconds if connectivity is lost.
I see the IPv6 address but ping6 fails — why?
Check that your Security Group allows ICMPv6 traffic. In the CloudPe dashboard go to Networking → Security Groups, edit the group attached to your VM, and add an inbound rule for IPv6 ICMP (protocol 58).
Will this config survive a reboot?
Yes — provided you completed Step 2 (disabling cloud-init) before editing the file. The renamed 99-run-auto-netplan.cfg.disabled file prevents cloud-init from regenerating the Netplan config on subsequent boots.
What does dhcp6: false do?
Setting dhcp6: false prevents the system from trying to auto-assign an IPv6 address via DHCPv6, which would conflict with our static assignment. The IPv6 address is assigned manually via the addresses list.
CloudPe Knowledge Base  ·  Networking  ·  April 2026
Ubuntu 24.04NetplanIPv6
Was this article helpful?

Related Articles

Need Support?

Can't find the answer you're looking for?
Contact Support
This is a staging environment