Certopolis

CompTIA Network+ (V9)

IPv6 addressing explained for Network+

An IPv6 address is 128 bits. There are three types, unicast, anycast and multicast, and no broadcast. A LAN normally gets a /64 so hosts can build the 64-bit interface identifier themselves, and a site chooses DHCPv6 instead of SLAAC when it wants to control the exact address each host gets.

Types and prefixes

RFC 4291 defines unicast, anycast and multicast addresses. There are no broadcast addresses in IPv6; multicast does that job.

Prefixes to recognise: ::1/128 is loopback, ::/128 is unspecified, FE80::/10 is link-local unicast, FF00::/8 is multicast, and global unicast is everything else.

Writing addresses: "::" replaces one or more groups of 16 zero bits, and it can appear only once. 2001:DB8:0:0:8:800:200C:417A shortens to 2001:DB8::8:800:200C:417A.

Unique local addresses

RFC 4193 defines unique local addresses under FC00::/7. The L bit is set to 1 for a locally assigned prefix, so in practice these prefixes start with FD. The format is a 40-bit Global ID, a 16-bit Subnet ID and a 64-bit Interface ID.

The Global ID is generated pseudo-randomly, so each site's prefix is globally unique with high probability. A stated design goal is that sites can be combined or privately interconnected without address conflicts or renumbering. Two companies joining over a VPN, or merging, can keep their unique local prefixes. IPv4 RFC 1918 space gives no such protection, because both sides may have picked the same 10.0.0.0/8 range.

The prefix is well known so routers at site boundaries can filter it easily. RFC 4193 says these addresses are not expected to be routable on the global Internet, only within a site or between a limited set of sites.

Why a LAN gets a /64, and SLAAC versus DHCPv6

RFC 7421 explains that the addressing architecture fixes the interface identifier at 64 bits for all unicast addresses, and so for every medium that supports SLAAC. That fixes the subnet prefix at /64, whatever the site's own allocation. A company with a /48 therefore hands each office LAN a /64.

RFC 4862: the stateless approach (SLAAC) is used when a site is not particularly concerned with the exact addresses hosts use, as long as they are unique and routable. DHCPv6 is used when a site requires tighter control over exact address assignments. Both can run on the same link. Without a router, a host can only form a link-local address.

Where the exam catches people

  • Believing IPv6 has a broadcast address: RFC 4291 says multicast replaces broadcast.
  • Believing "::" can appear twice in one address: it may appear only once.
  • Believing SLAAC lets administrators choose each host's address: that is DHCPv6. SLAAC is for sites not concerned with exact addresses.
  • Believing a LAN should get a /56 or /48: those are site allocations. Each LAN gets a /64 so SLAAC works.
  • Believing link-local addresses suit a private network across a VPN: RFC 4291 says link-local addresses are for use on a single link. Unique local addresses are the private, routable choice.

Written from CompTIA's documentation

Try 3 questions on this

Pick an answer to see why each option is right or wrong.

  1. A company has received a /48 IPv6 allocation and is carving out one prefix for each office LAN so hosts there can autoconfigure their addresses. Which of the following prefix lengths should each LAN receive?

    Right. In the game that’s Renown for your Networking Concepts building.

    Not that one: A is right. In the game your Networking Concepts building would lose a little Renown, and this question would come back later.

    Show the full explanation and doc quotes

    Each LAN therefore gets a /64 carved from the /48.

    Written from www.rfc-editor.org/rfc/rfc7421.html

  2. Two companies that address their internal servers privately will join their networks over a VPN and may later merge. Which of the following address types is least likely to force either company to renumber?

    Right. In the game that’s Renown for your Networking Concepts building.

    Not that one: D is right. In the game your Networking Concepts building would lose a little Renown, and this question would come back later.

    Show the full explanation and doc quotes

    The RFC lists, as a design goal, that sites can be combined or privately interconnected without address conflicts or renumbering. Both companies can keep their prefixes through a VPN link or a merger.

    Written from www.rfc-editor.org/rfc/rfc4193.html

  3. A company wants its IPv6 hosts to receive addresses automatically, but its administrators must decide the specific address each host ends up with. Which of the following should provide the addresses?

    Right. In the game that’s Renown for your Networking Concepts building.

    Not that one: B is right. In the game your Networking Concepts building would lose a little Renown, and this question would come back later.

    Show the full explanation and doc quotes

    Both are automatic; only DHCPv6 lets the administrators decide the specific address.

    Written from www.rfc-editor.org/rfc/rfc4862.html