I have a /48 IPv6 and would like to chop these up into /112's that I can assign to my VPSes. I know how to assign them manually, e.g.
vzctl set 1 --ipadd ipv6IP --save
But how could I assign, for example, a full /112 at once?
I have a /48 IPv6 and would like to chop these up into /112's that I can assign to my VPSes. I know how to assign them manually, e.g.
vzctl set 1 --ipadd ipv6IP --save
But how could I assign, for example, a full /112 at once?
That takes several steps:
In the CT0 (the "host"), add a veth to the VE (the "VM"):
vzctl set <CTID> --netif_add eth0
In the CT0, enable IPv6 forwarding (net.ipv6.conf.all.forwarding=1
will do that, temporarily. Consult the docs of your OS for how to make that permanent.)
In the CT0, add a route for the /112 to the VE's virtual interface. For example, assuming your VE has a CTID 1:
ip -6 route add IP6_NET/112 dev veth1.0
This concludes the setup in the CF0.
Now, finally, in your VE add addresses you want to use (from the subnet) to the VE's eth0:
ip -6 addr add IP6_IP dev eth0