Prefix Notation
The notation for prefixes has also been specified in RFC 2373. A format prefix is the high-order bits of an IP address used to identify the subnet or a specific type of address (refer to Table 3-2). In newer drafts, it is called the global routing prefix. The prefix notation is very similar to the way IPv4 addresses are written in Classless Interdomain Routing (CIDR) notation, and it is also commonly used for subnetted IPv4 addresses. The notation appends the prefix length, written as a number of bits with a slash, which leads to the following format:
IPv6 address/prefix length |
The prefix length specifies how many
left-most bits of the address specify the prefix. This is another way
of noting a subnet mask. Remember, a subnet
mask specifies the bits of the IPv4 address that belong to the
network ID. The prefix is used
to identify the subnet that an interface belongs to and is used by
routers for forwarding. The following example explains how the prefix
is interpreted. Consider the IPv6 prefix notation
2E78:DA53:12::/40
. To understand this address,
let’s convert the
hex into binary as shown in Table 3-1.
Table 3-1. Understanding prefix notation
Hex notation |
Binary notation |
Number of bits |
---|---|---|
2E 78 DA 53 12 |
00101110 01111000 11011010 01010011 00010010 |
16 bits 16 bits 8 bits, total 40 bits |
The compressed notation (replacing a sequence of zeros with a double colon) is also applicable to the prefix representation. It should be used carefully, though, ...
Get IPv6 Essentials now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.