IPv6 gateway outside of the subnet.

Krakox44

New Member
Oct 11, 2024
1
0
1
Hi guys, I'm trying to assign a /64 subnet for each VM that I create from a bigger /44, the issue is that the gateway I have is on a different block, how can I solve this?

Is link-local something viable?
 
Yes,

you can use the link-local address of the gateway as the default GW for the host, this is common practice. VMs then have the hosts Global Unicast Address as their gateway. Just make sure ipv6 forwarding is enabled on the host.
Code:
# add this to /etc/sysctl.conf
net.ipv6.conf.all.forwarding=1

# then
sysctl -p


So on the host you have
Code:
ip -6 route add default via fe80::external_gateway_ll%<IFACE>

and in the VMs it would look something like
Code:
ip -6 addr add 2001:db8:1::1/64 dev <VM_IFACE>
2001:db8:1::1 is a placeholder for whatever the Global Unicast Address of the PVE host is.

you can get the your GUA address of the host with
Code:
ip -6 addr show dev <IFACE>
 

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!