IPv6 · Local calculator

IPv6 Calculator

Read an IPv6 interface address in its routing context. The slash length identifies the bits shared by every member of the block, while the address itself can reveal a special use or delivery scope.

Inputs

Result

Network prefix
2001:db8:42::/64
Last address
2001:db8:42:0:ffff:ffff:ffff:ffff
Address count
18446744073709551616
Input address type
Documentation prefix · example address
Address bits Prefix 64 · 64 host bits

Binary address value 00100000000000010000110110111000000000000100001000000000000000000000000000000000000000000000000000000000000000000000000000011001. The first 64 bits belong to the prefix.

IPv6 uses multicast for group delivery. The upper endpoint has no broadcast role.

In this guide12 sections

Introduction

Read an IPv6 interface address in its routing context. The slash length identifies the bits shared by every member of the block, while the address itself can reveal a special use or delivery scope.

Formula and calculation

Address block from a prefix
addresses = 2^(width − prefix); last = network + addresses − 1

A prefix fixes the leading bits and leaves the remaining bits available to identify values in the block. The calculator aligns the network address by clearing those remaining bits.

width · bits: 32 for IPv4 or 128 for IPv6
address length
prefix · bits
number of leading network bits
network · address
first aligned address in the block

Method and concepts

An IPv6 address contains eight 16-bit groups. For a /p block, fix the first p bits and vary the remaining 128 − p bits. Setting all variable bits to zero gives the first address. Setting them all to one gives the last. The block contains exactly 2^(128 − p) bit patterns.

  1. Enter an interface address together with its prefix length. Expand the address mentally before locating a boundary that falls inside a group.
  2. Read the normalized network and upper endpoint. Use the type alongside the original input to interpret the scope or special use of that address.

IPv6 addresses, prefixes and neighbors diagram

  1. 2001:db8:4a00:1200::/56
  2. 8 subnet bits · ab
  3. 2001:db8:4a00:12ab::/64
  4. Interface identifier · 42
The first byte of the fourth group stays 12. The next byte selects the child subnet. A final group of 42 is hexadecimal in this notation.

Worked examples

Find the network of a partially filled hex digit

  1. Enter 2001:db8:5:12ae::7/61. The first three groups account for 48 fixed bits. Another 13 bits come from the fourth group.
  2. The last digit e is binary 1110. Its leading bit belongs to the prefix. Clearing the other three bits changes e to 8, giving 2001:db8:5:12a8::/61.
  3. Set those three bits and all four trailing groups to ones. The final address is 2001:db8:5:12af:ffff:ffff:ffff:ffff. The 67 variable bits give 147573952589676412928 positions.

IPv6 addresses, prefixes and neighbors: Number subnet 171 in a documentation delegation

  1. Begin with 2001:db8:4a00:1200::/56. The fourth group covers the final eight prefix bits and the eight available subnet bits.
  2. Write decimal 171 as hex ab. Replacing the low byte 00 with ab gives 2001:db8:4a00:12ab::/64. The child index ranges from 0 through 255.
  3. Choose 2001:db8:4a00:12ab::42 as an example interface value. Expanding it gives 2001:0db8:4a00:12ab:0000:0000:0000:0042.

Reference table

IPv6 Calculator reference
ExampleInterpretationWhere it applies
::UnspecifiedSpecial source address during initialization
::1LoopbackWithin the local node
fe80::1Link-local unicastOne link
ff02::1All-nodes multicastNodes on the local link
2001:db8::1DocumentationExamples and diagrams

Reading the result

Delivery type and routing prefix answer different questions. A multicast address can encode a link-local group even if a different length is entered to explore address arithmetic. A documentation prefix marks an example. A global-unicast bit pattern alone does not establish public reachability.

Common mistakes

  • Counting colon-separated groups without accounting for the groups represented by ::.
  • Reserving the upper endpoint for broadcast. IPv6 uses multicast for group delivery.

Frequently asked questions

What happens with /128?

All bits are fixed. Both boundaries equal the input address and the count is one.

How does a link-local address identify an interface?

The same link-local value can appear on different links. A zone identifier such as %eth0 supplies local interface context. Enter the address alone for numeric calculation.

Why might two links both show fe80::1?

A link-local value is meaningful within a particular link. Each interface can reach its own neighbor using the same spelling, provided the link is specified.

Does an IPv6 router split an oversized packet into fragments?

IPv6 fragmentation is performed by the source. A forwarding router that cannot fit a packet on its outgoing link sends ICMPv6 Packet Too Big feedback, subject to protocol rules.

Can one IPv6 address be compressed in more than one way?

Yes. Leading zeroes in a hextet can be omitted, and one longest run of all-zero hextets can be replaced by ::. Using :: more than once would make the expanded length ambiguous.

Why does an IPv6 link-local address need an interface identifier on some systems?

Link-local scope is limited to one link, and the same address value can exist on several interfaces. A zone or interface name tells the system which link to use.

Does every IPv6 subnet use a /64?

Many ordinary SLAAC LAN designs use /64, but not every prefix in every role is /64. Follow the addressing plan and protocol requirements for the link.

Why are IPv6 addresses enclosed in brackets in a URL?

Colons are part of IPv6 notation and also separate a URL host from its port. Brackets make the address boundary unambiguous, for example https://[2001:db8::1]:8443/.

Does IPv6 have broadcast addresses?

No. IPv6 uses multicast for group delivery and anycast for selected one-to-nearest service behavior; it does not use IPv4-style broadcast.

Can an IPv6 interface have multiple addresses?

Yes. An interface can hold link-local, global, temporary, and other scoped addresses at the same time, depending on its configuration and network advertisements.

What is the role of a link-local IPv6 address?

It enables communication on the local link, including neighbor discovery and many router interactions. Routers do not forward link-local traffic to another link.

Does a compressed IPv6 address preserve leading zeroes?

The notation omits leading zeroes within hextets and may compress one longest zero run. Expanding the address restores a fixed eight-hextet value without changing its bits.

What is an IPv6 unique local address?

Unique local addresses come from fc00::/7 and are intended for local communication. They are not guaranteed to be globally routed, though they are designed to be locally unique when generated correctly.

Why use 2001:db8:: in examples?

The 2001:db8::/32 prefix is reserved for documentation. It avoids presenting a live public allocation as a fictional example.

Does IPv6 require NAT for address conservation?

IPv6's address space is designed to provide abundant addresses, so ordinary deployments do not need NAT for conservation in the same way IPv4 often does. Firewalls and routing policy still control access.

What is Duplicate Address Detection?

IPv6 Neighbor Discovery uses Duplicate Address Detection to check whether an address is already in use on a link before an interface begins using it.

Can an IPv6 subnet include a broadcast address?

No. IPv6 uses multicast rather than broadcast. A prefix calculator can still show its numeric first and last address values, but that does not create an IPv4-style broadcast role.

Further learning and references