dhcp to assign whole /64 to each vm from a single /48 IPv6 block

somnath31

Member
Oct 9, 2020
13
0
6
32
Hello!
Is there any way using DHCP to assign /64 IPv6 block to each vm from a single /48 IPv6 block?

Is there any way to achieve this?


I did try everything but nothing works

I am using same DHCP server to assign single IPv4 to vm and they work

But when I try IPv6 nothing happen

Here's the config inside my DHCP server's dhcpd6.conf

# nano /etc/dhcp/dhcpd6.conf


Code:
#
# DHCPv6 Server Configuration file.
#   see /usr/share/doc/dhcp*/dhcpd6.conf.example
#   see dhcpd.conf(5) man page
#


subnet6 2j0f:XXXX::/48 {
        option dhcp6.name-servers 2j0f:XXXX::1;
        option dhcp6.domain-search "dhcp.viridweb.com";
        prefix6 2j0f:XXXX:: 2j0f:XXXX:0000:ffff:: /64;
}


I this case lets assume 2j0f:XXXX::/48 is the main IPv6 block from which I want to assign /64 IPv6 to each and every vm after splitting it automatically


So is there any way?






You can also check the IPv4 config on my dhcpd.conf file

# nano /etc/dhcp/dhcpd.conf


Code:
#
# DHCP Server Configuration file.
#   see /usr/share/doc/dhcp*/dhcpd.conf.example
#   see dhcpd.conf(5) man page
#


subnet 45.XXX.126.0 netmask 255.255.255.0 {
        option routers                  45.XXX.126.1;
        option subnet-mask              255.255.255.0;
        option domain-search              "dhcp.viridweb.com";
        option domain-name-servers       45.XXX.126.1;
        range 45.XXX.126.6 45.XXX.126.254;
}


subnet 45.XXX.127.0 netmask 255.255.255.0 {
        option routers                  45.XXX.126.1;
        option subnet-mask              255.255.255.0;
        option domain-search              "dhcp.viridweb.com";
        option domain-name-servers       45.XXX.126.1;
        range 45.XXX.127.1 45.XXX.127.254;
}


subnet 45.XXX.128.0 netmask 255.255.255.0 {
        option routers                  45.XXX.126.1;
        option subnet-mask              255.255.255.0;
        option domain-search              "dhcp.viridweb.com";
        option domain-name-servers       45.XXX.126.1;
        range 45.XXX.128.1 45.XXX.128.254;
}


subnet 45.XXX.129.0 netmask 255.255.255.0 {
        option routers                  45.XXX.126.1;
        option subnet-mask              255.255.255.0;
        option domain-search              "dhcp.viridweb.com";
        option domain-name-servers       45.XXX.126.1;
        range 45.XXX.129.1 45.XXX.129.254;
}