4

I have two virtual machines with Ubuntu Server 20.04. One of these virtual machines is a DHCPv6 server, and the other one is a client. I am able to set an IPv6 address on the client, but I cannot ping to and from this address. ip -6 route shows this address but with prefix length of 128. I would like to have the prefix length equals to 64, the same as the server IP address has. When I add to my routing table on the client IP address obtained from the server but with prefix length equals to 64, I can ping between my virtual machines.

This is my /etc/dhcp/dhcpd6.conf file on the server:

default-lease-time 2592000;
preferred-lifetime 604800;
option dhcp-renewal-time 3600;
option dhcp-rebinding-time 7200;
allow leasequery;
option dhcp6.name-servers 3ffe:501:ffff:100:200:ff:fe00:3f3e;
option dhcp6.domain-search "test.example.com","example.com";
option dhcp6.info-refresh-time 21600;

authoritative:
subnet6 fdaa:a:a:a::/64 {
   range6 fdaa:a:a:a::100 fdaa:a:a:a::199;
}

The last three lines were added by me.

This is my /etc/netplan/00-installer-config.yaml file on the client:

network:
   ethernets:
      ens3:
         dhcp4: false
         dhcp6: true
   version: 2

Thank you in advance for any help.

  • 4
    It appears that you are misusing ULA because it does not appear that fdaa:a:a:a::/64 is using a random 40-bit Global ID, and that is a requirement for ULA. "The allocation of Global IDs is pseudo-random [RANDOM]. They MUST NOT be assigned sequentially or with well-known numbers. Locally assigned Global IDs MUST be generated with a pseudo-random algorithm consistent with [RANDOM]. Section 3.2.2 describes a suggested algorithm. It is important that all sites generating Global IDs use a functionally similar algorithm to ensure there is a high probability of uniqueness." – Ron Maupin Dec 1 '20 at 14:27
  • What are the logs on the DHCPv6 server showing? Is it Kea, ISC's DHCP-server, something else? – Tommiie Dec 1 '20 at 15:26
  • @Tommiie which logs do you mean? I installed dhcp server using command "apt install isc-dhcp-server". – user6758 Dec 1 '20 at 15:37
  • 4
    Unlike IPv4, IPv6 gets its gateway, prefix, etc. from the RAs. – Ron Maupin Dec 1 '20 at 18:20
  • @RonMaupin It seemed to me that using stateless dhcpv6, the gateway and prefix information is obtained from RA, while stateful dhcpv6 allows full configuration. Apparently, I was wrong. – user6758 Dec 1 '20 at 20:38
7

As per the DHCPd documentation:

In a properly functioning system the client should use a prefix length of 128 and get any on-link information from the RAs from a router.

Since you are using two virtual machines and I assume no IPv6-capable virtual router connects to that virtual network, nobody is sending out those RAs so your client cannot get the correct subnet mask.

Check the link for more information.

  • It seemed to me that stateful dhcpv6 allows full configuration and the RA information is unnecessary. Apparently, I was wrong. – user6758 Dec 1 '20 at 20:43
  • 2
    @user6758, it is actually the RAs that tell the host whether to use stateful or stateless. RAs are necessary and an integral part of the required NDP. – Ron Maupin Dec 1 '20 at 20:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.