Menu Close

IPv6 Address Notation Explained

Enter example and select .com. Results and checkout open in the HostsDepot store.

IPv6 address notation

IPv6 addresses look very different from IPv4 addresses.

Instead of four decimal numbers separated by periods, IPv6 uses hexadecimal numbers separated by colons.

At first, an IPv6 address may look complicated, but the notation follows a clear set of rules.

Understanding IPv6 address notation is important for server administrators, network engineers, web hosting users, and anyone learning modern networking.

What Does an IPv6 Address Look Like?

A full IPv6 address contains 128 bits.

It is normally written as eight groups of hexadecimal digits separated by colons.

For example:

2001:0db8:1234:5678:abcd:ef01:2345:6789

Each group contains four hexadecimal digits.

Because each hexadecimal digit represents four bits, each group represents 16 bits.

Eight groups multiplied by 16 bits gives the full 128-bit IPv6 address.

What Is Hexadecimal?

IPv6 uses hexadecimal notation instead of ordinary decimal notation.

Decimal uses ten symbols:

0 through 9

Hexadecimal uses sixteen symbols:

0 through 9 and A through F

The letters represent values greater than nine.

A represents 10, B represents 11, C represents 12, D represents 13, E represents 14, and F represents 15.

Hexadecimal is useful because it provides a compact way to represent binary data.

IPv6 Contains Eight Groups

A complete IPv6 address contains eight 16-bit groups.

For example:

2001:0db8:0000:0000:1234:0000:5678

The eight groups are:

2001

0db8

0000

0000

1234

0000

5678

abcd

Each group is separated by a colon.

These groups are sometimes informally called hextets because each one contains 16 bits represented by hexadecimal digits.

Leading Zeros Can Be Removed

IPv6 notation allows leading zeros inside each group to be omitted.

For example:

0db8

can be written as:

db8

The group:

0042

can be written as:

42

The group:

0007

can be written as:

7

The group:

0000

can be written as:

0

This makes IPv6 addresses shorter and easier to read.

For example:

2001:0db8:0000:0000:0000:0000:0000:0001

can first be shortened to:

2001:db8:0:0:0:0:0:1

This is still the same IPv6 address.

Consecutive Zero Groups Can Be Compressed

IPv6 provides another important shortening rule.

One continuous sequence of groups containing only zeros can be replaced by two colons:

::

For example:

2001:db8:0:0:0:0:0:1

can be written as:

2001:db8::1

The double colon represents the missing zero groups.

This is one of the most common features you will see in IPv6 addresses.

Why Can Double Colon Be Used Only Once?

The double-colon abbreviation can normally appear only once in a valid IPv6 address.

The reason is that the missing zero groups must be reconstructed unambiguously.

Consider this address:

2001:db8::1

Because IPv6 must contain eight total groups, the number of omitted zero groups can be determined.

But if an address contained multiple double-colon sections, there might be no reliable way to determine how many zero groups belong in each location.

For this reason, only one sequence of consecutive zero groups can be compressed with :: in an IPv6 address.

Example of IPv6 Compression

Start with the full address:

2001:0db8:0000:0000:0000:ff00:0042:8329

First, remove leading zeros:

2001:db8:0:0:0:ff00:42:8329

Then compress the longest continuous sequence of zero groups:

2001:db8::ff00:42:8329

All three versions represent the same IPv6 address.

Another Compression Example

Consider:

fe80:0000:0000:0000:0202:b3ff:fe1e:8329

Remove leading zeros:

fe80:0:0:0:202:b3ff:fe1e:8329

Compress consecutive zero groups:

fe80::202:b3ff:fe1e:8329

Again, the shorter form represents the same address.

The Address ::1

One of the most important special IPv6 addresses is:

::1

This is the IPv6 loopback address.

It performs a role similar to:

127.0.0.1

in IPv4.

The loopback address refers to the local computer itself.

Software can use ::1 to communicate with services running on the same machine.

The Address ::

Another special IPv6 notation is:

::

By itself, this represents the unspecified IPv6 address.

It is equivalent to an address containing eight groups of zeros:

0000:0000:0000:0000:0000:0000:0000:0000

The unspecified address is used in certain situations where a device does not yet have a specific IPv6 address.

It should not be confused with ::1, which is the loopback address.

IPv6 Prefix Length Notation

IPv6 networks often use a slash followed by a number.

For example:

2001:db8:1234:5678::/64

The /64 is called the prefix length.

It means that the first 64 bits identify the network prefix.

The remaining 64 bits are available for identifying interfaces within that subnet.

Prefix length notation in IPv6 serves a role similar to CIDR notation in IPv4.

What Does /64 Mean?

A /64 prefix means the first 64 bits are the network portion of the address.

For example:

2001:db8:1234:5678::/64

defines a network whose addresses begin with:

2001:db8:1234:5678

The remaining 64 bits can vary.

A /64 subnet contains an enormous number of possible interface addresses.

It is also the standard subnet size used in many normal IPv6 LAN environments.

Other Common IPv6 Prefix Lengths

You may see several different prefix lengths depending on the network.

A hosting provider might assign something such as:

2001:db8:1000::/48

An organization may then divide that larger allocation into multiple /64 subnets.

A provider might also assign a /56 or /60 to a customer.

The exact prefix size depends on the provider and the purpose of the network.

IPv6 Addresses Are Case-Insensitive

Hexadecimal letters in IPv6 addresses are not case-sensitive.

For example:

2001:DB8::1

and:

2001:db8::1

represent the same address.

Lowercase letters are commonly used because they are easier to read and are generally preferred in standardized text representation.

Canonical IPv6 Notation

Although several different written forms may represent the same IPv6 address, software and documentation often prefer a standardized representation.

A common canonical style follows these ideas:

Remove unnecessary leading zeros.

Use lowercase hexadecimal letters.

Compress the longest sequence of consecutive zero groups using ::.

If multiple zero sequences have the same length, compress the first one.

This helps ensure that the same IPv6 address is written consistently.

Why Standardized Notation Matters

Without standardized formatting, one IPv6 address could be written in several different ways.

For example:

2001:0db8:0000:0000:0000:0000:0000:0001

2001:db8:0:0:0:0:0:1

2001:db8::1

All three represent the same address.

If software compares these values as plain text instead of interpreting them as IPv6 addresses, inconsistent formatting can cause confusion.

Using canonical notation reduces this problem.

IPv6 in URLs

IPv6 addresses contain colons, but URLs also use colons for purposes such as separating a hostname from a port number.

Because of this, an IPv6 address used directly inside a URL must normally be enclosed in square brackets.

For example:

http://[2001:db8::10]/

For HTTPS:

https://[2001:db8::10]/

The square brackets tell the browser that the entire value is an IPv6 address.

IPv6 Address with a Port Number

Suppose a web service is running on port 8080.

With IPv4, you might write:

http://192.0.2.10:8080/

With IPv6, you write:

http://[2001:db8::10]:8080/

The brackets separate the IPv6 address from the port number.

Without the brackets, the multiple colons in the IPv6 address would make the URL ambiguous.

IPv6 in SSH Commands

When connecting to a server with SSH, you can often use an IPv6 address directly.

For example:

ssh root@2001:db8::25

Depending on the operating system and shell, additional syntax may be required in some situations.

If using tools that combine an IPv6 address with a port or another colon-separated value, always check the syntax expected by that tool.

IPv6 in DNS

DNS uses AAAA records to associate hostnames with IPv6 addresses.

For example:

example.com → 2001:db8::25

An A record is used for IPv4.

An AAAA record is used for IPv6.

A website that supports both IPv4 and IPv6 may have both types of records.

Link-Local IPv6 Addresses

IPv6 link-local addresses commonly begin with:

fe80::

For example:

fe80::1234:5678:abcd

These addresses are automatically used for communication on a local network link.

Routers do not normally forward link-local traffic between networks.

Link-local addresses are especially important for functions such as Neighbor Discovery and router communication.

The Zone Identifier

A link-local IPv6 address can sometimes be ambiguous because multiple network interfaces on the same computer may use the same link-local address range.

To specify the correct network interface, some operating systems use a zone identifier.

For example:

fe80::1%eth0

On Windows, you might see something like:

fe80::1%12

The value after the percent sign identifies the network interface.

The exact syntax depends on the operating system and application.

Global Unicast Addresses

Global unicast IPv6 addresses are addresses intended to be globally routable across the internet.

Many public IPv6 addresses currently fall within:

2000::/3

A server with a globally routable IPv6 address might have something similar to:

2001:db8:1234:5678::10

The 2001:db8:: range is reserved for documentation and examples, so it should not be used as a real public address.

Unique Local Addresses

IPv6 also defines Unique Local Addresses, commonly called ULAs.

They are intended for internal network communication.

Locally assigned ULAs typically begin with:

fd

For example:

fd12:3456:789a::1

These addresses are not intended to be globally routed across the public internet.

Their purpose is somewhat similar to private IPv4 addresses, although IPv6 ULA design is different.

Multicast IPv6 Addresses

IPv6 multicast addresses begin with:

ff

For example:

ff02::1

Multicast allows a packet to be sent to a particular group of receivers.

IPv6 relies heavily on multicast because IPv6 does not use traditional IP broadcast.

Certain multicast addresses have special meanings within IPv6 networks.

IPv6 Does Not Use Traditional Broadcast Addresses

IPv4 networks use broadcast addresses for some operations.

IPv6 does not use traditional IP broadcast.

Instead, IPv6 uses multicast to reach groups of devices.

This means you will not see an IPv6 broadcast address equivalent to the traditional IPv4 subnet broadcast address.

This is an important difference between IPv4 and IPv6 addressing.

IPv4-Mapped IPv6 Addresses

Some systems use a special IPv6 representation for IPv4 addresses.

For example:

::ffff:192.0.2.25

This is called an IPv4-mapped IPv6 address.

It can appear inside software and operating system APIs that support both IPv4 and IPv6.

It does not mean that the IPv4 device has automatically become a native IPv6 device.

It is mainly a representation used internally by certain systems and applications.

Can IPv6 Contain Decimal IPv4 Notation?

In certain special forms, the last 32 bits of an IPv6 address can be written using familiar IPv4 decimal notation.

For example:

::ffff:192.0.2.25

Most ordinary native IPv6 addresses, however, are written entirely with hexadecimal groups.

For everyday IPv6 configuration, you will normally see addresses such as:

2001:db8::25

rather than mixed IPv6 and IPv4 notation.

How Many Digits Can Each IPv6 Group Have?

Each IPv6 group represents 16 bits and can contain up to four hexadecimal digits.

Examples of valid groups include:

0

a

12

abc

1234

ffff

A group cannot contain more than four hexadecimal digits.

Characters outside hexadecimal 0 through 9 and A through F are not valid inside an IPv6 address group.

How Do You Expand a Compressed IPv6 Address?

Suppose you see:

2001:db8::1

An IPv6 address must contain eight groups.

The visible groups are:

2001

db8

1

That means five groups are missing.

The expanded form is:

2001:0db8:0000:0000:0000:0000:0000:0001

You can reconstruct a compressed IPv6 address by counting the visible groups and inserting enough zero groups at :: to reach eight groups total.

Another Expansion Example

Consider:

2001:db8:1234::abcd

Visible groups are:

2001

db8

1234

abcd

That is four visible groups.

The full address requires eight groups, so :: represents four zero groups.

The expanded address is:

2001:0db8:1234:0000:0000:0000:0000

Understanding this rule makes compressed IPv6 addresses much easier to read.

Invalid IPv6 Example: Too Many Groups

An IPv6 address cannot contain more than eight groups.

For example:

2001:db8:1:2:3:4:5:6:7

contains nine groups and is therefore invalid as a normal IPv6 address.

The full address must resolve to exactly eight 16-bit groups.

Invalid IPv6 Example: Too Many Double Colons

An address such as:

2001::1234::1

is invalid because it contains two double-colon abbreviations.

There would be no unambiguous way to determine how many zero groups belong in each location.

Only one :: abbreviation can be used within an IPv6 address.

Invalid IPv6 Example: Non-Hexadecimal Characters

An IPv6 address can contain only hexadecimal digits inside its groups.

For example:

2001:db8:xyz::1

is invalid because x, y, and z are not hexadecimal digits.

Valid letters are only:

A, B, C, D, E, and F

or their lowercase forms.

IPv6 Prefixes Are Not the Same as Ports

You may see:

2001:db8::/64

The /64 is a network prefix length.

You may also see:

The 443 is a TCP or UDP port number.

These two numbers mean completely different things.

The prefix length describes how the IPv6 address is divided into network and interface portions.

The port identifies a particular service running on a host.

IPv6 and Web Hosting

If your hosting provider assigns an IPv6 address to your dedicated server or VPS, the address may look similar to:

2001:db8:1234:100::25

You may also receive a larger IPv6 prefix such as:

2001:db8:1234:100::/64

These are not the same thing.

The first is one individual IPv6 address.

The second describes an entire IPv6 network prefix.

Make sure you understand whether your hosting provider is giving you one address or an address range.

IPv6 and Linux

On Linux, you can view IPv6 addresses with:

ip addr

You may see lines containing:

inet6

For example:

inet6 2001:db8:1234::25/64

This indicates an IPv6 address together with its prefix length.

You may also see a link-local address beginning with fe80::.

IPv6 and Windows

On Windows, you can view network configuration with:

ipconfig

The output may show one or more IPv6 addresses.

A Windows computer may have a global IPv6 address, temporary IPv6 address, and link-local IPv6 address at the same time.

This is normal.

IPv6 interfaces can have multiple addresses simultaneously.

Why Can One Interface Have Multiple IPv6 Addresses?

IPv6 was designed with the expectation that a network interface may use multiple addresses.

For example, one interface might have:

A link-local address.

A global unicast address.

A temporary privacy address.

A unique local address.

Each address serves a different purpose.

This may look unusual to administrators who are familiar mainly with IPv4, but it is normal IPv6 behavior.

IPv6 Address Notation in Simple Terms

The easiest way to remember IPv6 notation is to focus on a few basic rules.

An IPv6 address contains 128 bits.

It is normally written as eight groups of hexadecimal digits.

Groups are separated by colons.

Leading zeros inside a group can be removed.

One continuous sequence of zero groups can be replaced with ::.

The :: abbreviation can appear only once.

A prefix such as /64 identifies the network portion of the address.

An IPv6 address used directly in a URL is normally enclosed in square brackets.

Once you understand these rules, IPv6 addresses become much less intimidating.

Quick Example

Full IPv6 address:

2001:0db8:0000:0000:0000:0000:0000:0025

Remove leading zeros:

2001:db8:0:0:0:0:0:25

Compress consecutive zero groups:

2001:db8::25

All three forms represent the same IPv6 address.

Conclusion

IPv6 notation may initially look complicated because IPv6 addresses are much longer than IPv4 addresses.

However, the structure is straightforward.

IPv6 uses eight groups of hexadecimal numbers to represent a 128-bit address.

Leading zeros can be removed, and one sequence of consecutive zero groups can be compressed using a double colon.

For example:

2001:0db8:0000:0000:0000:0000:0000:0001

can be written simply as:

2001:db8::1

Understanding these notation rules makes it much easier to configure dedicated servers, DNS AAAA records, firewalls, routing, and other IPv6 services.

IPv6 addresses may look unfamiliar, but once you understand how they are written and compressed, reading them becomes much easier.

Leave a Reply

Your email address will not be published. Required fields are marked *