How to assign a whole /64 IPv6 block to a single VM (No DHCP)?

somnath31

Member
Oct 9, 2020
13
0
6
32
Hello!
Is there any way to assign a whole /64 IPv6 block to each VM?

I am using a IPAM software to assign IPs automatically to a VM

I need solution for Static IP and not DHCP

I want something like this

I have a /48 IPv6 block.
I am using a IPAM software to create and assign static IPs to new VM automatically


So I want when the software create the VM it will assign a whole /64 subnet to the VM instead of a single IPv6 address.

I know /64 is a lot of IPv6 but I want this

Any help??
 
Any feedback about how to configure ipv6 in a dedicated machine in order to use it with containers / vm?
 
Any feedback about how to configure ipv6 in a dedicated machine in order to use it with containers / vm?
For that you have to eddit your /etc/network/interfaces

# nano /etc/network/interfaces

edit the files something like this

auto vmbr0
iface vmbr0 inet static
address your IPv4/24
gateway Gateway
bridge-ports eth0
bridge-stp off
bridge-fd 0

iface vmbr0 inet6 static
address your IPv6/64
gateway Gateway
 
yes, i already did it.
I've some questions.

1. My ipv6/64 = 2001:XXX:XXX:219::/64
So i need to edit like this?
iface vmbr0 inet6 static
address 2001:XXX:XXX:219::/64
gateway 2001:XXX:XXX:219::1

2. Do i need to user any ipv6 iptables?
3. How to use ipv6 in my vm / containers?
 
Last edited:
Hey there
we are using Netbox with some custom fields..
I‘m adding a new subnet in netbox and in the custom field i add the MAC address of the vm
a small Script in our Router reads the data from the netbox and creates a Route for the subnet to the LLA of the VMs MAC address...
in the VM you configure the IP like this

auto ens18
iface ens18 inet static
address 2a02:xxx::5/64
gateway fe80::1

this solution has some advantages
1. the subnet is bounded to the VM, no other customer for example can use the ip of another customer
2. the subnet is routed to the VM, so you can route that block forward for example for docker or VPN...
....
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!