Course contents

Chapter 3: IPv6 ConfigurationLesson 3 of 6

IPv6 subnetting

A /48 becomes 65,536 /64 subnets through the 16-bit subnet ID; worked examples and why LANs are always /64.

Intermediate · 9 min read

Technical definition

IPv6 subnetting is choosing which 16 bits of the subnet ID go on which LAN. It does not need host counting: every LAN uses a /64, so you only number the subnets.

The 16-bit subnet ID

Subnetting IPv6: the 16-bit subnet ID
Subnetting IPv6: the 16-bit subnet IDA typical site gets a /48. The first 48 bits are the global routing prefix, the next 16 bits are the subnet ID you choose, and the last 64 bits are the interface ID. Changing the subnet ID gives 65,536 different /64 subnets.Global routing prefix48 bits from your providerSubnet ID16 bitsInterface ID64 bits2001:0db8:acad00010000:0000:0000:00012001:db8:acad:1::/64 is subnet 1. 2001:db8:acad:2::/64 is subnet 2.Subnet ID 0000 to FFFF2^16 = 65,536 subnetsof a /48Each /64 holds 2^64 addresses(about 18 quintillion)more than enough for one LAN
The one rule to remember: every LAN is a /64. Subnetting is choosing which 16-bit subnet ID goes on which LAN; there is no host counting.

A /48 leaves 16 bits between the provider prefix and the 64-bit interface ID. Those 16 bits are yours: 0000 to ffff, which is 65,536 possible /64 networks. The leading zeros can be dropped, so the first four subnets are 2001:db8:acad::/64, 2001:db8:acad:1::/64, 2001:db8:acad:2::/64 and 2001:db8:acad:3::/64.

Worked example: a site with five LANs

You hold 2001:db8:acad::/48. Number five LANs by department:

A subnet plan from one /48
A subnet plan from one /48LAN; Subnet ID; Subnet. Management: 0001 2001:db8:acad:1::/64 Sales: 0010 2001:db8:acad:10::/64 Support: 0020 2001:db8:acad:20::/64 Servers: 0100 2001:db8:acad:100::/64 Guest Wi-Fi: 0200 2001:db8:acad:200::/64LANSubnet IDSubnetManagement00012001:db8:acad:1::/64Sales00102001:db8:acad:10::/64Support00202001:db8:acad:20::/64Servers01002001:db8:acad:100::/64Guest Wi-Fi02002001:db8:acad:200::/64

On small screens, swipe sideways or focus the diagram and use the arrow keys.

Subnet IDs are hexadecimal, so 10 here is hex 0x10, which is decimal 16. Choosing readable IDs makes plans easy to maintain.

How other prefix lengths split up

From a larger prefix to /64s
From a larger prefix to /64sYou hold; Subnet bits; Number of /64s. /48: 16 65,536 /56: 8 256 /60: 4 16 /62: 2 4 /64: 0 1You holdSubnet bitsNumber of /64s/481665,536/568256/60416/6224/6401

On small screens, swipe sideways or focus the diagram and use the arrow keys.

The number of /64s is 2 to the power of (64 minus your prefix length).

Special cases

  • Loopback: a /128 host route, for example 2001:db8:acad:ff::1/128.
  • Point-to-point links: /127 (RFC 6164) or /64.
  • Summarising: subnets 0 to 3 aggregate to 2001:db8:acad::/62, because only the last 2 of the 16 subnet bits vary.

Subnetting steps

  1. Find the prefix you were given, such as /48.
  2. Work out the subnet bits: 64 minus the prefix length.
  3. Number each LAN in the subnet ID field in hex.
  4. Write each as the prefix, the subnet ID and ::/64.

Test yourself

Predict · scenario 1

A provider gives you 2001:db8:1200::/56. How many /64 subnets can you create?

Predict · scenario 2

Which prefix length must a normal IPv6 LAN use so SLAAC works?

Predict · scenario 3

Which is the second /64 in 2001:db8:acad::/48 if the first uses subnet ID 0?

FAQ

Why is a LAN always a /64?
SLAAC builds a 64-bit interface ID, so the network part must be exactly 64 bits. Other prefix lengths on a LAN break SLAAC and some neighbour discovery features.
What prefix do providers usually give a site?
A /48 for larger sites and a /56 or /60 for small ones; a home may receive a /56 or even a /64. You split what you are given into /64 networks.
Can I use /127 on router links?
Yes. RFC 6164 recommends /127 for point-to-point links to avoid the ping-pong and neighbour-cache issues of a /64 there. Many networks still use /64 for simplicity; /127 is the hardening choice.