Penguin
Blame: IPv6Addressing
EditPageHistoryDiffInfoLikePages
Annotated edit history of IPv6Addressing version 23, including all changes. View license author blame.
Rev Author # Line
8 CraigBox 1 IPv6 addresses are 128 bits long as opposed to the 32 bits used by the current IPv4 addresses. The main benefit of this is that it provides __LOTS__ more addresses.
10 PerryLorier 2
3 Some common prefixes:
19 LawrenceDoliveiro 4 * ::_aabb_:_ccdd_ -- Used for IPv4 addresses (_a.b.c.d_) (obsolete)
5 * ::FFFF:_aabb_:_ccdd_ -- Used for IPv4 addresses (_a.b.c.d_) as per RFC:4038
21 LawrenceDoliveiro 6 * 2000::/3 -- addresses with GlobalScope, as allocated [here|http://www.iana.org/assignments/ipv6-unicast-address-assignments/] (older version [here|http://www.iana.org/assignments/ipv6-tla-assignments])
15 LawrenceDoliveiro 7 * 3FFE:831F::/32 -- This is used by [Teredo]
16 LawrenceDoliveiro 8 * FC00::/7 -- [ULA]
10 PerryLorier 9 * FE80::/64 -- LinkLocal
14 LawrenceDoliveiro 10 * FEC0::/48 -- SiteLocal (deprecated)
11
20 LawrenceDoliveiro 12 Subsets of 2000::/3 space:
23 LawrenceDoliveiro 13 * 2001:DB8::/32 -- reserved for example addresses in documentation as per RFC:3849
20 LawrenceDoliveiro 14 * 2002::/16 -- This is used by [6to4]
8 CraigBox 15
16 !!Notation
17 The preferred form for writing IPv6 addresses is x:x:x:x:x:x:x:x where each x represents the hexadecimal values of 16 bits of the address. Examples:
12 CraigBox 18 <pre>
19 FEDC:BA98:7654:3210:FEDC:BA98:7654:3210
20 1080:0:0:0:8:800:200C:417A
21 </pre>
8 CraigBox 22
23 Due to the way that some IPv6 addresses are allocated it will be common for some addresses to have long strings of zeros in them, making them tedious to write using the above representation. The standard defines a special syntax that can be used to compress the groups of zeros. Use of the "::" indicates indicates multiple groups of 16-bits of 0. The "::" notation can only be used once in an address and can also be used to compress leading or trailing zeros. Examples:
12 CraigBox 24 <pre>
25 1080:0:0:0:8:800:200C:417A => 1080::8:800:200C:417A
26 FF01:0:0:0:0:0:0:101 => FF01::101
27 0:0:0:0:0:0:0:1 => ::1
28 0:0:0:0:0:0:0:0 => ::
29 </pre>
8 CraigBox 30
12 CraigBox 31 A third format is defined for use when dealing with a mixed [IPv6] / [IPv4] environment, in this case the last 32 bits of the address (ie. the last two groups of 4 hexadecimal characters) are written in DottedQuad notation giving an address that looks like <tt>x:x:x:x:x:x:d.d.d.d</tt> where the 'x's are the hexadecimal values of the six high-order 16-bit pieces of the address, and the 'd's are the decimal values of the four low-order 8-bit pieces of the address (standard IPv4 representation). Examples:
32 <pre>
33 0:0:0:0:0:0:13.1.68.3 or ::13.1.68.3
34 0:0:0:0:0:FFFF:129.144.52.38 or ::FFFF:129.144.52.38
35 </pre>
8 CraigBox 36
37 An IPv6 address prefix is represented by the notation ipv6-address/prefix-length where
12 CraigBox 38 ; __ ipv6-address__ :is an IPv6 address in any of the notations listed above
39 ; __prefix-length__ :is a decimal value specifying how many of the leftmost contiguous bits of the address comprise the prefix.
8 CraigBox 40
41 For example, the following are legal representations of the 60-bit prefix 12AB00000000CD3 (hexadecimal):
12 CraigBox 42 <pre>
43 12AB:0000:0000:CD30:0000:0000:0000:0000/60
44 12AB::CD30:0:0:0:0/60
45 12AB:0:0:CD30::/60
46 </pre>
47
8 CraigBox 48 The following are NOT legal representations of the above prefix:
49
12 CraigBox 50 <?plugin OldStyleTable border||=0
51 | <tt>12AB:0:0:CD3/60</tt> | may drop leading zeros, but not trailing zeros, within any 16-bit chunk of the address
52 | <tt>12AB::CD30/60</tt> | address to left of "/" expands to 12AB:0000:0000:0000:0000:000:0000:CD30
53 | <tt>12AB::CD3/60</tt> | address to left of "/" expands to 12AB:0000:0000:0000:0000:000:0000:0CD3
54 ?>
8 CraigBox 55
56 !!Types of Address
12 CraigBox 57
8 CraigBox 58 There are several different types of [IPv6] address defined by the standads. The type is specified by the leading bits of an address, this field is variable-length and is called the FormatPrefix (FP). Refer to RFC2373 for the currently defined FP's some of the more common ones are.
12 CraigBox 59
60 <?plugin OldStyleTable border||=0
61 | <tt>001</tt> | Aggregatable Global Unicast Addresses (1/8 of the address space)
62 | <tt>1111 1110 10</tt> | Link-Local Unicast Addresses (1/2024 of the address space)
63 | <tt>1111 1110 11</tt> | Site-Local Unicast Addresses (1/2024 of the address space)
64 | <tt>1111 1111</tt> | Multicast Addresses (1/256 of the address space)
65 ?>
8 CraigBox 66
67 !Aggregatable Global Unicast Addresses - RFC2374
68 This is probably going to be the most widely used of the IPv6 address formats and is what is currently being allocated by the RIRs and is in use on the 6Bone. The format of a Aggregatable Global Unicast Addresses (AGUA) address looks like this.
12 CraigBox 69 <pre>
70 | 3| 13 | 8 | 24 | 16 | 64 bits |
71 +--+-----+---+--------+--------+--------------------------------+
72 |FP| TLA |RES| NLA | SLA | Interface ID |
73 | | ID | | ID | ID | |
74 +--+-----+---+--------+--------+--------------------------------+
75 </pre>
76
8 CraigBox 77 Where
12 CraigBox 78
79 ; __ FP __ :Format Prefix (001)
80 ; __ TLA ID __ :Top-Level Aggregation Identifier
81 ; __ RES __ :Reserved for future use
82 ; __ NLA ID __ :Next-Level Aggregation Identifier
83 ; __ SLA ID __ :Site-Level Aggregation Identifier
84 ; __ INTERFACE ID__ :Interface Identifier
8 CraigBox 85
86 An important concept to grasp is that these fields in the address are used only for allocation, they are not directly used for routing. Routing of IPv6 addresses is based on prefix length, although sometimes the prefix length will be based on one of the fields above this does not always need to be the case. To explain how each field is used imagine an IPv6 internet which consists of a tight mesh of directly connected backbone nodes in the centre, moving out from this you reach transit nodes which have a connection to a subset of the backbone nodes (usually between 1 - 4) each of these transit nodes is then connected to a number of edge nodes. This structure is almost identical to the structure of the 6Bone and possibly today's IPv4 internet.
87
12 CraigBox 88 ; __ Top-Level Aggregation ID __ :This field defines the top level of the routing heirarchy to which this address belongs, usually each backbone node in the example above will have it's own TLA ID. Routers in the backbone must have an entry for every active TLA ID, plus specific entries for the TLA which they are a part of. The TLA ID field is 13 bits long allowing 8,192 (2^13) TLA'IDs.
8 CraigBox 89
12 CraigBox 90 ; __ Res __ :This field must be all zeroes in current IPv6 addresses but is intended to allow either the TLA ID or NLA ID fields to be expanded in the future if demand requires it.
8 CraigBox 91
12 CraigBox 92 ; __ Next-Level Aggregation ID__ :This field is used by organisations that have been allocated a TLA ID to create an addressing hierarchy and define sites. The NLA ID field is 24 bits which allows each organisation with a TLA ID to provide service to roughly as many organisations as the current IPv4 Internet can support total networks. For example the a TLA might use the first 8 bits of the 24bit NLA ID field to identify different sites / locations within the organisation, the remaining 16 bits could then be used to identify the individual organisations or units that are connected via the site / location defined in the first 8 bits.
8 CraigBox 93
12 CraigBox 94 ; __ Site-Level Aggregation ID __ :This field is used by an individual organisation to create it's own addressing hierarchy and subnets, this is done in much the same way as with IPv4 except that there are a lot more subnets available.
8 CraigBox 95
96 Both the NLA ID and SLA ID fields can be nested multiple times.
97
12 CraigBox 98 ; __ Interface ID __ :The interface ID is used to identify interfaces on a link, it is required that these be unique in the local scope but they may be unique in a broader scope also. In many cases this ID will be the same as the LinkLayer address and there are defined ways of using a 48bit MAC Address or a 64bit EUI identifier to populate this field.
10 PerryLorier 99
8 CraigBox 100
101 !Link-Local Unicast Addresses
12 CraigBox 102
8 CraigBox 103 Link-Local addresses are designed to be used for addressing on a single link for purposes such as auto-address configuration, neighbor discovery, or when no routers are present. Their format is as follows. Routers must not forward packets with link-local addresses to other links.
104
12 CraigBox 105 <pre>
106 | 10 |
107 | bits | 54 bits | 64 bits |
108 +----------+-------------------------+----------------------------+
109 |1111111010| 0 | interface ID |
110 +----------+-------------------------+----------------------------+
111 </pre>
8 CraigBox 112
113 In hex, this would be fe80:0:0:0:0:0:0:(ID), or fe80::(ID) if collapsing zeroes.
114
115 Example:
12 CraigBox 116 <pre>
8 CraigBox 117 eth0 Link encap:Ethernet HWaddr 00:E0:4C:39:43:BB
9 JohnMcPherson 118 inet addr:10.21.1.2 Bcast:10.21.1.255 Mask:255.255.255.0
8 CraigBox 119 inet6 addr: fe80::2e0:4cff:fe39:43bb/64 Scope:Link
12 CraigBox 120 </pre>
8 CraigBox 121
10 PerryLorier 122 ''Anyone know where the extra bits (02, ff:fe) in the interface ID came from (they aren't in the [MAC] address)?''
123
124 The 2 in 02 is from the universally unique bit being flipped in IPv6 addresses so you can easily type addresses like fe80::1 (the 2 bit is clear meaning that this is a non universally unique suffix)
125
126 ff:fe is inserted and means "Ethernet MAC" I think.
8 CraigBox 127
128 !Site-Local Unicast Addresses
10 PerryLorier 129 Site-Local addresses are designed to be used for addressing inside of a site without the need for a global prefix. Routers must not forward any packets with site-local source or destination addresses outside of the site. These addresses are analogous to the RFC:1918 IPv4 addresses in use by many organisations today.
12 CraigBox 130 <pre>
131 | 10 |
132 | bits | 38 bits | 16 bits | 64 bits |
133 +----------+-------------+-----------+----------------------------+
134 |1111111011| 0 | subnet ID | interface ID |
135 +----------+-------------+-----------+----------------------------+
136 </pre>
8 CraigBox 137
138 In hex, this is fec0:0:0:0:0:(ID) or fec0::(ID).
10 PerryLorier 139
140 Site local addresses are currently deprecated and are likely to be replaced by some other similar mechanism which isn't so prone to address usage collisions.
8 CraigBox 141
142 !Multicast Addresses
143 An IPv6 multicast address is an identifier for a group of nodes. A node may belong to any number of multicast groups. Multicast addresses have the following format:
12 CraigBox 144 <pre>
145 | 8 | 4 | 4 | 112 bits |
146 +------ -+----+----+---------------------------------------------+
147 |11111111|flgs|scop| group ID |
148 +--------+----+----+---------------------------------------------+
149 </pre>
8 CraigBox 150
151 The flgs field contains information about whether the group id is a well defined group (Assigned by IANA) or a temporary group.
152 The scop field contains information about the scope of the address, it can be used to define groups of machines such as
12 CraigBox 153
8 CraigBox 154 * All Routers on the same link as the sender
155 * All Routers at the same site as the sender
156 * All Routers on the internet!
157
158 !Anycast Addresses
159 Anycast addresses have the same format at AGUA addresses and are used to send a packet to only one of a group of machines. This group might be spread around the internet. IT can be used to route a packet to the closest of a server. (eg: the nearest nameserver).
160
161 !Special Addresses
162 Just like IPv4 has special addresses for thinks like loopback, network and broadcast so does IPv6.
163
13 CraigBox 164 __<tt>::1</tt>__
165 the loopback address, used to talk to the local computer. (:__ :1/128, opposed to [IPv4]'s 127/8)
166 __<tt>::</tt>__
167 the unspecified addresses, used for things such as address discovery when the computer does not yet have an address. Should not ever be used as a destination address.
8 CraigBox 168
12 CraigBox 169 There is no broadcast addresses, as these have been replaced by multicast ones.
8 CraigBox 170
171 !! References
12 CraigBox 172
18 LawrenceDoliveiro 173 * RFC:4291 - IPv6 Addressing Architecture
12 CraigBox 174 * RFC:2471 - IPv6 Testing Address Allocation
175 * RFC:2373 - IP Version 6 Addressing Architecture
176 * RFC:2374 - An IPv6 Aggregatable Global Unicast Address Format
8 CraigBox 177
178 -----
179 CategoryNetworking

PHP Warning

lib/blame.php:177: Warning: Invalid argument supplied for foreach() (...repeated 6 times)