|
Chapter 3: IPv6 Addressing continued
IPv6 Addresses for a RouterThe interfaces on an IPv6 router are assigned the following unicast addresses:
Additionally, the interfaces of an IPv6 router are assigned the following anycast addresses:
Additionally, the interfaces of an IPv6 router are listening for traffic on the following multicast addresses:
Subnetting the IPv6 Address SpaceJust as in IPv4, the IPv6 address space can be divided by using high-order bits that do not already have fixed values to create subnetted network prefixes. These are used either to summarize a level in the routing or addressing hierarchy (with a prefix length less than 64), or to define a specific subnet or network segment (with a prefix length of 64). IPv4 subnetting differs from IPv6 subnetting in the definition of the host ID portion of the address. In IPv4, the host ID can be of varying length, depending on the subnetting scheme. For currently defined unicast IPv6 addresses, the host ID is the interface ID portion of the IPv6 unicast address and is always a fixed size of 64 bits.
Subnetting for NLA IDsIf you are an ISP, subnetting the IPv6 address space consists of using subnetting techniques to divide the NLA ID portion of a global address in a manner that allows for route summarization and delegation of the remaining address space for different portions of your network, for downstream providers, or for individual customers. The global address has a 24-bit NLA ID field to be used by the various layers of ISPs between a top-level aggregator (a global ISP identified by the TLA ID) and a customer site.For a global address allocated to a top-level aggregator, the first 16 bits of the address are fixed and correspond to the FP (set to 001) and the TLA ID (13 bits in length). The TLA ID is followed by the Res portion, which consists of 8 reserved bits set to 0. Therefore, for subnetting of the NLA ID portion of a global address, the first 24 bits are fixed. In a global address, the Res bits are never shown due to the suppression of leading zeros in IPv6 colon hexadecimal notation. Subnetting the NLA ID portion of a global address requires a two-step procedure:
The subnetting technique described here assumes that subnetting is done by dividing the 24-bit address space of the NLA ID using the high-order bits in the NLA ID that do not already have fixed values. While this method promotes hierarchical addressing and routing, it is not required. For example, you can also create a flat addressing space for the NLA ID by numbering the subnets from 0 to 16,777,215. Step 1: Determining the Number of Subnetting Bits The number of bits being used for subnetting determines the possible number of new subnetted network prefixes that can be allocated to portions of your network based on geographical, customer segment, or other divisions. In a hierarchical routing infrastructure, you need to determine how many network prefixes, and therefore how many bits, you need at each level in the hierarchy. The more bits you choose for the various levels of the hierarchy, the fewer bits you will have available to enumerate individual subnets in the last level of the hierarchy. The last level in the hierarchy is used to assign 48-bit prefixes to customer sites. For example, a network designer at a large ISP decides to implement a two-level hierarchy reflecting a geographical/customer segment structure and uses 8 bits for the geographical level and 8 bits for the customer segment level. This means that each customer segment in each geographical location has only 8 bits of subnetting space left (24 8 8), or only 256 (= 28) 48-bit prefixes per customer segment. On any given level in the hierarchy, you will have a number of bits that are already fixed by the next level up in the hierarchy (f ), a number of bits used for subnetting at the current level in the hierarchy (s), and a number of bits remaining for the next level down in the hierarchy (r). At all times, f + s + r = 24. This relationship is shown in Figure 3-9. Figure 3-9. The subnetting of an NLA ID Step 2: Enumerating Subnetted Network Prefixes Based on the number of bits used for subnetting, you must list the new subnetted network prefixes. There are two main approaches:
Either method produces the same result: an enumerated list of subnetted network prefixes. Creating the enumerated list of subnetted network prefixes by using the hexadecimal method
f = m - 24 f is the number of bits within the NLA ID that are already fixed. n = 2s n is the number of network prefixes that are obtained. i = 224-(f+s) i is the incremental value between each successive NLA ID expressed in hexadecimal form. l = 24 + f + s l is the prefix length of the new subnetted network prefixes. D = decimal representation of F
For example, to perform a 3-bit subnetting of the global network prefix 3000:4D:C00::/38, we first calculate the values of the number of prefixes, the increment, and the new prefix length. Our starting values are F = 0x4D0C00, s = 3, and f = 38 24 = 14. The number of prefixes is 8 (n = 23). The increment is 0x80 (i = 224-(14+3) = 128 = 0x80). The new prefix length is 41 (l = 38 + 3). Next, we construct a table with 8 entries. The subnetted network prefix for network prefix 1 is 3000:4D:C00::/41. Additional entries in the table are successive increments of i in the NLA ID portion of the network prefix, as shown in Table 3-4. Table 3-4. The Hexadecimal Subnetting Technique for Network Prefix 3000:4D:C00::/38
Creating the enumerated list of subnetted network prefixes using the decimal method
f = m - 24 f is the number of bits within the NLA ID that are already fixed. n = 2s n is the number of network prefixes that are obtained.i = 224-(f+s) i is the incremental value between each successive NLA ID expressed in decimal form. l = 24 + f + s l is the prefix length of the new subnetted network prefixes. D = decimal representation of F
For example, to perform a 3-bit subnetting of the global network prefix 3000:4D:C00::/38, we first calculate the values of the number of prefixes, the increment, and the new prefix length. Our starting values are F = 0x4D0C00, s = 3, and f = 38 - 24 = 14. The number of prefixes is 8 (n = 23). The increment is 128 (i = 224-(14+3) = 128). The new prefix length is 41 (l = 38 + 3). The decimal representation of the starting NLA ID is 5049344 (D = 0x4D0C00 = 5049344). Next, we construct a table with 8 entries. The subnetted network prefix for network prefix 1 is 3000:4D:C00::/41. Additional entries in the table are successive increments of i in the NLA ID portion of the network prefix, as shown in Table 3-5. Table 3-5. The Decimal Subnetting Technique for Network Prefix 3000:4D:C00::/38
Subnetting for SLA IDs/Subnet IDsFor most network administrators within an organization, subnetting the IPv6 address space consists of using subnetting techniques to divide the SLA ID portion of the global address or the Subnet ID portion of the site-local address in a manner that allows for route summarization and delegation of the remaining address space to different portions of an IPv6 intranet. The global address has a 16-bit SLA ID field to be used by organizations within their sites. The site-local address has a 16-bit Subnet ID field to be used by organizations within a site.In both cases, the first 48 bits of the address are fixed. For the global address, the first 48 bits are fixed and allocated by an ISP and correspond to the TLA and NLA ID portions of the global address. For the site-local address, the first 48 bits are fixed at FEC0::/48. In the discussion that follows, the term subnet ID refers to either the SLA ID portion of the global address or the Subnet ID portion of a site-local address. Subnetting the subnet ID portion of a global or site-local address space requires a two-step procedure:
The subnetting technique described here assumes that subnetting is done by dividing the 16-bit address space of the subnet ID using the high-order bits in the subnet ID. While this method promotes hierarchical addressing and routing, it is not required. For example, in a small organization with a small number of subnets, you can also create a flat addressing space for the subnet ID by numbering the subnets starting at 0. As described in the "Local-Use Unicast Addresses" section of this chapter, you can use the same subnetting scheme and use the same subnet ID for both site-local and global address network prefixes. Step 1: Determining the Number of Subnetting Bits The number of bits being used for subnetting determines the possible number of new subnetted network prefixes that can be allocated to portions of your network based on geographical or departmental divisions. In a hierarchical routing infrastructure, you need to determine how many network prefixes, and therefore how many bits, you need at each level in the hierarchy. The more bits you choose for the various levels of the hierarchy, the fewer bits you will have available to enumerate individual subnets in the last level of the hierarchy. For example, a network administrator decides to implement a two-level hierarchy reflecting a geographical/departmental structure and uses 4 bits for the geographical level and 6 bits for the departmental level. This means that each department in each geographical location has only 6 bits of subnetting space left (16 - 6 - 4), or only 64 (= 26) subnets per department. On any given level in the hierarchy, you will have a number of bits that are already fixed by the next level up in the hierarchy (f), a number of bits used for subnetting at the current level in the hierarchy (s), and a number of bits remaining for the next level down in the hierarchy (r). At all times, f + s + r = 16. This relationship is shown in Figure 3-10. Figure 3-10. The subnetting of a Subnet ID Step 2: Enumerating Subnetted Network Prefixes Based on the number of bits used for subnetting, you must list the new subnetted network prefixes. There are two main approaches:
Either method produces the same result: an enumerated list of subnetted network prefixes. Creating the enumerated list of subnetted network prefixes using the hexadecimal method
f = m - 48 f is the number of bits within the subnet ID that are already fixed. n = 2s n is the number of network prefixes that are obtained. i = 216-(f+s) i is the incremental value between each successive subnet ID expressed in hexadecimal form. l = 48 + f + s l is the prefix length of the new subnetted network prefixes.
For example, to perform a 3-bit subnetting of the site-local network prefix FEC0:0:0:C000::/51, we first calculate the values of the number of prefixes, the increment, and the new prefix length. Our starting values are F = 0xC000, s = 3, and f = 51 - 48 = 3. The number of prefixes is 8 (n = 23). The increment is 0x400 (i = 216-(3+3) = 1024 = 0x400). The new prefix length is 54 (l = 48 + 3 + 3). Next, we construct a table with 8 entries. The entry for the network prefix 1 is FEC0:0:0:C000::/54. Additional entries in the table are successive increments of i in the subnet ID portion of the network prefix, as shown in Table 3-6. Table 3-6. The Hexadecimal Subnetting Technique for Network Prefix FEC0:0:0:C000::/51
Creating the enumerated list of subnetted network prefixes using the decimal method
f = m - 48 f is the number of bits within the subnet ID that are already fixed. n = 2s n is the number of network prefixes that are obtained. i = 216-(f+s) i is the incremental value between each successive subnet ID. l = 48 + f + s l is the prefix length of the new subnetted network prefixes. D = decimal representation of F
For example, to perform a 3-bit subnetting of the site-local network prefix FEC0:0:0:C000::/51, we first calculate the values of the number of prefixes, the increment, the new prefix length, and the decimal representation of the starting subnet ID. Our starting values are F = 0xC000, s = 3, and f = 51 - 48 = 3. The number of prefixes is 8 (n = 23). The increment is 1024 (i = 216-(3+3)). The new prefix length is 54 (l = 48 + 3 + 3). The decimal representation of the starting subnet ID is 49152 (D = 0xC000 = 49152). Next, we construct a table with 8 entries. The entry for the network prefix 1 is 49152 and FEC0:0:0:C000::/54. Additional entries in the table are successive increments of i in the subnet ID portion of the network prefix, as shown in Table 3-7. Table 3-7. The Decimal Subnetting Technique for Network Prefix FEC0:0:0:C000::/51
IPv6 Interface IdentifiersIn IPv6, the interface ID is of fixed length. This length was not fixed at 64 bits to allow up to 264 possible hosts on the same subnet. Rather, the IPv6 interface ID is 64 bits long to accommodate the mapping of current 48-bit MAC addresses used by most LAN technologies such as Ethernet and the mapping of 64-bit MAC addresses of IEEE 1394 (also known as FireWire) and future LAN technologies.The ways in which an interface identifier is determined are the following:
EUI-64 Address-based Interface IdentifiersThe most common way to derive an IPv6 interface identifier is through the EUI-64 address, a new type of MAC address for network adapters. To gain an understanding of EUI-64 addresses, it is useful to review the current MAC address format known as IEEE 802 addresses.IEEE 802 Addresses Network adapters for common LAN technologies such as Ethernet, Token Ring, and Fiber Data Distributed Interface (FDDI) use a 48-bit address called an IEEE 802 address. It consists of a 24-bit company ID (also called the manufacturer ID) and a 24-bit extension ID (also called the board ID). The combination of the company ID, which is uniquely assigned to each manufacturer of network adapters, and the extension ID, which is uniquely assigned to each network adapter at the time of manufacture, produces a globally unique 48-bit address. This 48-bit address is also called the physical, hardware, or media access control (MAC) address. Figure 3-11 shows the structure of the 48-bit IEEE 802 address for Ethernet. Figure 3-11. The structure of the 48-bit IEEE 802 address for Ethernet Defined bits within the IEEE 802 address for Ethernet are: Universal/Local (U/L) The next-to-the low-order bit in the first byte is usedto indicate whether the address is universally or locally administered. If the U/L bit is set to 0, the IEEE (through the designation of a unique company ID) has administered the address. If the U/L bit is set to 1, the address is locally administered. In this case, the network administrator has overridden the manufactured address and specified a different address. The U/L bit is designated by the u in Figure 3-11. Individual/Group (I/G) The low-order bit of the first byte is used to indicate whether the address is an individual address (unicast) or a group address (multicast). When set to 0, the address is a unicast address. When set to 1, the address is a multicast address. The I/G bit is designated by the g in Figure 3-11. For a typical 802.x network adapter address, both the U/L and I/G bits are set to 0, corresponding to a universally administered, unicast MAC address. IEEE EUI-64 Addresses The IEEE EUI-64 address represents a new standard for network interface addressing. The company ID is still 24-bits long, but the extension ID is 40 bits, creating a much larger address space for a network adapter manufacturer. The EUI-64 address uses the U/L and I/G bits in the same way as the IEEE 802 address. Figure 3-12 shows the structure of the EUI-64 address. Figure 3-12. The structure of the EUI-64 address Mapping IEEE 802 Addresses to EUI-64 Addresses To create an EUI-64 address from an IEEE 802 address, the 16 bits of 11111111 11111110 (0xFFFE) are inserted into the IEEE 802 address between the company ID and the extension ID, as shown in Figure 3-13. Figure 3-13. The mapping of IEEE 802 addresses to EUI-64 addresses Obtaining Interface Identifiers for IPv6 Addresses To obtain the 64-bit interface identifier for IPv6 unicast addresses, the U/L bit in the EUI-64 address is complemented (if it is a 1 in the EUI-64 address, it is set to 0; and if it is a 0 in the EUI-64 address, it is set to 1). The main reason for complementing the U/L bit is to provide greater compressibility of locally administered EUI-64 addresses. It is common practice when assigning locally administered addresses to number them in a simple way. For example, on a point-to-point link, you may assign one interface on the link the locally administered EUI-64 address of 02-00-00-00-00-00-00-01 and the other interface the locally administered EUI-64 address of 02-00-00-00-00-00-00-02. If the U/L bit is not complemented, the corresponding link-local addresses for these two interfaces become FE80::200:0:0:1 and FE80::200:0:0:2. By complementing the U/L bit, the corresponding link-local addresses for these two interfaces become FE80::1 and FE80::2. Figure 3-14 shows the conversion of an EUI-64 address to an IPv6 interface identifier. Figure 3-14. The conversion of an EUI-64 address to an IPv6 interface identifier
Converting IEEE 802 Addresses to IPv6 Interface Identifiers To obtain an IPv6 interface identifier from an IEEE 802 address, you must first map the IEEE 802 address to an EUI-64 address, and then complement the U/L bit. Figure 3-15 shows this conversion process for a universally administered, unicast IEEE 802 address. Figure 3-15. The conversion of an IEEE 802 address to an IPv6 interface identifier IEEE 802 Address Conversion Example Host A has the Ethernet MAC address of 00-AA-00-3F-2A-1C. First, it is converted to EUI-64 format by inserting FF-FE between the third and fourth bytes, yielding 00-AA-00-FF-FE-3F-2A-1C. Then, the U/L bit, which is the seventh bit in the first byte, is complemented. The first byte in binary form is 00000000. When the seventh bit is complemented, it becomes 00000010 (0x02). The final result is 02-AA-00-FF-FE-3F-2A-1C which, when converted to colon hexadecimal notation, becomes the interface identifier 2AA:FF:FE3F: 2A1C. As a result, the link-local address that corresponds to the network adapter with the MAC address of 00-AA-00-3F-2A-1C is FE80::2AA:FF:FE3F:2A1C.
Temporary Address Interface IdentifiersIn today's IPv4-based Internet, a typical Internet user dials an ISP and obtains an IPv4 address using PPP and the Internet Protocol Control Protocol (IPCP). Each time the user dials, a different IPv4 address might be obtained. Therefore, it is not easy to track a dial-up user's traffic on the Internet based on the user's IP address.For IPv6-based dial-up connections, the user is assigned a 64-bit prefix, at the time of connection, by using router discovery, an exchange of Router Solicitation and Router Advertisement messages. If the interface identifier is always based on the EUI-64 address (as derived from the static IEEE 802 address), it is possible to identify the traffic of a specific node regardless of the prefix assigned at the time of connection. The use of the same 64-bit interface identifier allows identification of a user's traffic whether they are accessing the Internet from home or from work. This makes it easy for Internet merchants and malicious users to track a specific user and their use of the Internet. To address this concern to provide the same level of anonymity as that provided with IPv4, an alternative derivation of the IPv6 interface identifier that is randomly generated and changes over time is discussed in RFC 3041. The initial interface identifier is generated using random number techniques. For IPv6 systems that do not have the ability to store any history information for generating future values of the interface identifier, a new random interface identifier is generated each time the IPv6 protocol is initialized. For IPv6 systems that do have storage capabilities, a history value is stored and when the IPv6 protocol is initialized, a new interface identifier is created through the following process:
The resulting IPv6 address, based on this random interface identifier, is known as a temporary address. Temporary addresses are generated for public address prefixes that use stateless address autoconfiguration. Temporary addresses are used for the lower of the following values of the valid and preferred lifetimes:
After the temporary address valid lifetime expires, a new interface identifier and temporary address is generated. For more information about router discovery, see Chapter 6, "Neighbor Discovery." For more information about stateless address autoconfiguration and valid and preferred lifetimes, see Chapter 8, "Address Autoconfiguration."
Mapping IPv6 Multicast Addresses to Ethernet AddressesWhen sending IPv6 multicast packets on an Ethernet link, the corresponding destination MAC address is 0x33-33-mm-mm-mm-mm, where mm-mm-mm-mm is a direct mapping of the last 32 bits of the IPv6 multicast address. Figure 3-16 shows the mapping of an IPv6 multicast address to an Ethernet multicast address.Figure 3-16. The mapping of IPv6 multicast addresses to Ethernet multicast addresses Ethernet network adapters maintain a table of interesting destination MAC addresses. If an Ethernet frame with an interesting destination MAC address is received, it is passed to upper layers for additional processing. By default, this table contains the MAC-level broadcast address (0xFF-FF-FF-FF-FF-FF) and the unicast MAC address assigned to the adapter. To facilitate efficient delivery of multicast traffic, additional multicast destination addresses can be added or removed from the table. For every multicast address being listened to by the host, there is a corresponding entry in the table of interesting MAC addresses. For example, an IPv6 host with the Ethernet MAC address of 00-AA-00-3F-2A-1C (link-local address of FE80::2AA:FF:FE3F:2A1C) adds the following multicast MAC addresses to the table of interesting destination MAC addresses on the Ethernet adapter:
Additional multicast addresses on which the host is listening are added and removed from the table as needed.
IPv4 Addresses and IPv6 EquivalentsTo summarize the relationships between IPv4 addressing and IPv6 addressing, Table 3-8 lists both IPv4 addresses and addressing concepts and their IPv6 equivalents.Table 3-8. IPv4 Addressing Concepts and Their IPv6 Equivalents
ReferencesRFC 1888 "OSI NSAPs and IPv6"RFC 2373 "IP Version 6 Addressing Architecture" RFC 2472 "IP Version 6 over PPP" RFC 3041 "Privacy Extensions for Stateless Address Autoconfiguration in IPv6"
Testing for UnderstandingTo test your understanding of IPv6 addressing, answer the following questions. See Appendix D, "Testing for Understanding Answers" to check your answers.
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||