0

I'm trying to setup my DHCPv6 on ubuntu to assign an address with a 112 prefix. My configuration looks like this:

subnet6 2001:db8:a0b::640a:0/112 {
      range6 2001:db8:a0b::6464:640a 2001:db8:a0b::6464:640d;
      default-lease-time 600;
      max-lease-time 7200;
}

I'm expecting to be assigned with IPv6 with the following notation:

2001:db8:a0b::6464:640a/112

but instead I'm getting

2001:db8:a0b::6464:640a/64

What am I missing?

ocp1000
  • 101
  • 1
  • I haven't done any IPv6 configurations yet, but take a look at https://subnettingpractice.com/ipv6_subnetting.html and plug in your IP address there. It looks as though your range might be incorrect. From the numbers I got it looks like it should be `range6 2001:db8:a0b:0:0:0:6464:0 2001:db8:a0b:0:0:0:6464:ffff;` – Terrance Dec 04 '17 at 15:46
  • @Terrance that range shouldn't be affecting the DHCP assignment of /64 or /112, if I'm not mistaken. – Thomas Ward Dec 04 '17 at 15:52
  • @ThomasWard If I plug in those range numbers into an IP calculator they come up as invalid. – Terrance Dec 04 '17 at 15:52
  • 1
    @Terrance, `2001:db8::` is the prefix reserved for IPv6 documentation examples. It's appropriate if the OP has modified the question with a dummy documentation address; a calculator might mark it invalid because it _is_ invalid for an actual device. – user4556274 Dec 04 '17 at 15:58
  • @user4556274 But why assign an incorrect IP address that has 5 digits after the : when it is clearly 4 digits in every example I have looked at? Is there something I am missing here? – Terrance Dec 04 '17 at 16:00
  • related: https://serverfault.com/questions/426183/how-does-ipv6-subnetting-work-and-how-does-it-differ-from-ipv4-subnetting – user4556274 Dec 04 '17 at 16:01
  • @Terrance, yes `6464a` is an invalid address segment. I misunderstood which part of the address you were talking about. – user4556274 Dec 04 '17 at 16:03
  • @Terrance ah, right, that was not specific enough. The OP needs to use a valid range, yes, such as 6460 through 6464 or such in the last set of digits. As with user4556274 I didn't see that and was misunderstanding what you were referring to. – Thomas Ward Dec 04 '17 at 16:30
  • @ThomasWard You're correct. I mistakenly wrote 6464 instead of 640a. I fixed it, but the issue still occurs. Any insights? – ocp1000 Dec 04 '17 at 16:48
  • @ThomasWard Yeah, I am sorry for not specifying that clear enough in my first comment, so I can see the confusion. Forgive me my friend! – Terrance Dec 04 '17 at 19:54

1 Answers1

0

The range is still incorrect. Look at the second to last segment of the IP address. In the /112 you have 640a, but in your range you have 6464. Make the following changes.

subnet6 2001:db8:a0b::640a:0/112 {
      range6 2001:db8:a0b::640a:640a 2001:db8:a0b::640a:640d;
      default-lease-time 600;
      max-lease-time 7200;
}

From https://subnettingpractice.com/ipv6_subnetting.html

Compressed Address: 2001:db8:a0b::640a:0/112
Expanded Address:   2001:0db8:0a0b:0000:0000:0000:640a:0000/112
Prefix: ffff:ffff:ffff:ffff:ffff:ffff:ffff:0000
Range:  2001:db8:a0b:0:0:0:640a:0
2001:db8:a0b:0:0:0:640a:ffff
Number of /64s: 3.552713678800501e-15
Terrance
  • 39,774
  • 7
  • 116
  • 176