2

Just as we have rules governing the validity of an IPv4 netmask, does IPv6 have its own set of rules to qualify a netmask?

Thanks!

user983356
  • 57
  • 1
  • 2
  • 4

2 Answers2

1

What is your use case? Normally in IPv6 your addresses will be auto-generated from a /64 prefix your router provides.

You don't usually see a netmask written out in IPv6. Usually you will see a prefix length. For example:

2001:db8:0:160::/64

would have a netmask of

ffff:ffff:ffff:ffff::

But you would only ever see the former.

mpontillo
  • 13,559
  • 7
  • 62
  • 90
  • Is there a way for the application to figure out if an IPv6 address is auto-generated or not? Are all addresses with prefix length 64 auto-generated? – user983356 Oct 17 '11 at 10:05
  • For all practical purposes, every address in use on an Ethernet network (see [RFC 2464](http://tools.ietf.org/html/rfc2464#section-4)) will be a `/64`. Even if it's not auto-generated. For other link types, you can't be certain. (some people use longer prefix lengths with tunnels that have manually assigned addresses) – mpontillo Oct 18 '11 at 18:03
1

Technically the better answer may be that with IPv6 you no longer have a netmask. With IPv6 you have a "prefix length" which you can interpret as the number of 1 bits in an equivalent netmask.

Taking the concept of "prefix length" you no longer have to have "netmask rules", although there pretty much is only one: the netmask should consist of only left aligned contiguous 1 bits.

Steve-o
  • 12,678
  • 2
  • 41
  • 60