IPV6 Simple Summary

Source: Internet
Author: User
Tags md5 hash rfc

1. Reprint the content of others

Source: https://www.2cto.com/net/201112/114937.html

2. Local IPV6 unicast address (including link-local unicast address and site-local unicast address)

2.1 Link Local Unicast Address

Specifies the link-local and site-local two types of local-use unicast addresses. Link-local addresses are used on a single link,

The site-local address is used on a single site.

The link-local address format is represented as follows:

Note that this address is the IPV6 address that starts with fe80::x:x:x:x

The purpose of designing a link-local address is to be used for addressing such as automatic address configuration, neighbor Discovery, or single-link presence without a router.

Routers cannot forward any packets with link-local source addresses or destination addresses to other links.

2.2 Site-local addresses have the following address format:

16 binary is represented as: fec0::x:x:x:x:x

Site-local addresses are designed to be used for site-internal addressing without a global prefix. Routers should not forward sites that have site-local sources outside the site or

Any package for the destination address

And look at your machine.

Unicast addresses can be found automatically.

Conversion method of interface address

IPv6 Interface Identification
The last 64 bits of the IPV6 address are unique interface identifiers for 64-bit prefixes of IPv6 addresses. The method for determining the interface identity is as follows:

    • RFC 2373 declares that all unicast addresses that use prefixes 001 through 111 must use the 64-bit interface identifier that is derived from the extended unique identity (EUI)-64 address.
    • RFC 3041 Describes an interface identifier that is randomly generated over time to provide some degree of anonymity.
    • The interface identification is assigned during stateful address autoconfiguration (for example, through DHCPV6). The DHCPV6 standard is currently being defined. The IPV6 protocol for the Windows Server 2003 family products and Windows XP does not support stateful address configuration or DHCPV6.
    • Manual configuration of the interface identity.

EUI-64-based IPV6 interface identification (Interface ID)

64-bit EUI 64 The address is defined by the Institute of Electrical and Electronic Engineers (IEEE). Assign an EUI-64 address to a network adapter, or derive it from an IEEE802 address.
During the IPV6 stateless address autoconfiguration process and the link-local link-local address generated under the interface, the interface ID section is typically generated according to EUI-64 rules: that is, the next 64-bit portion of the IPV6 address 128-bit length.

ieee 802 address

The traditional interface identifier for a network adapter can use a 48-bit address called an IEEE 802 address. This address consists of a 24-bit company ID (also known as the manufacturer ID) and a 24-bit extension ID (also known as a backplane ID). A combination of the company ID (the only manufacturer assigned to each network adapter) and the Backplane ID (uniquely assigned to each network adapter at assembly time) generates a globally unique 48-bit address. This 48-bit address is also known as a physical address, a hardware address, or a media access control (MAC) address. The defined bits in the

IEEE 802 address are as follows:

    • Global/local (U/L)

      The U/L bit is the seventh bit of the first byte and is used to determine whether the address is managed globally or locally. If the U/L bit is set to 0, the address is managed by assigning a unique company id,ieee. If the U/L bit is set to 1, the address is locally managed. The network administrator has overwritten the manufacturing address and specified a different address.
    • Individuals/groups (I/G)

      The i/g bit is the lowest bit of the first byte, used to determine whether the address is a personal address (unicast) or a group address (multicast). When set to 0 o'clock, the address is a unicast address. When set to 1 o'clock, the address is a multicast address. For a typical 802.x network adapter address, both the u/l and i/g bits are set to 0, which corresponds to a globally managed unicast MAC address.

IEEE EUI-64 Address

The IEEE EUI-64 address represents a new standard for network interface addressing. The company ID is still 24-bit long, but the extension ID is 40 bits, creating a larger address space for the network adapter manufacturer. The EUI-64 address uses the u/l and i/g bits in the same manner as the IEEE 802 address.

Mapping an IEEE 802 mac address to an EUI-64 address

To create an EUI-64 address from the MAC address of an IEEE 802, the 16-bit 11111111 11111110 (0xFFFE) is inserted into the IEEE 802 address between the company ID and the extension ID.
As shown in:

map an EUI-64 address to the IPv6 interface identity

To obtain a 64-bit interface identifier for IPV6 unicast addresses, the U/L bit in the EUI-64 address is reversed (if 1, it is set to 0; If 0, it is set to 1). As shown in:

IEEE 802 Address Translation Example

The Ethernet MAC address for Host A is 00-aa-00-3f-2a-1c. First, by inserting a ff-fe between the third and fourth bytes to convert it to the EUI-64 format, the result is 00-aa-00-Ff-fe-3f-2a-1c. Then, reverse the U/L bit (seventh bit in the first byte). The first byte has a binary form of 00000000. After the seventh position is reversed, it becomes 00000010 (0x02). The final result is Geneva-aa-00-Ff-fe-3F-2A-1C, when converted to a colon hexadecimal symbol, becomes an interface identifier2Aa:Ff:fe3f:2a1c. As a result, the link-local address of the network adapter that corresponds to the MAC address 00-aa-00-3f-2a-1c is Fe80::2aa:ff:fe3f:2a1c.

    • When the u/l bit is reversed, if the EUI-64 address is globally managed, the first byte is added 0x2, and if the EUI-64 address is managed locally, subtract 0x2 from the first byte.

On the router device, view the NIC MAC address of the interface:

    1. router# Show Interface f0/0
    2. Fastethernet0/0 is up, line protocol was down
    3. Hardware is gt96k FE, address is 0012.7FEB.6B40 (BIA 0012.7FEB.6B40)
Copy Code

We will then look at the link-local address and global unicast address generated by this address with EUI-64:

    1. Router (config) # interface f0/0
    2. Router (config-if) # IPv6 address 2001:db8::/64 eui-64
    3. Router (config-if) # do show IPv6 interface f0/0
    4. Fastethernet0/0 is up, line protocol was down
    5. IPV6 is enabled, link-local address is FE80::212:7FFF:FEEB:6B40 [TEN]
    6. No Virtual link-local Address (es):
    7. Global unicast Address (es):
    8. 2001:DB8::212:7FFF:FEEB:6B40, subnet is 2001:DB8::/64 [Eui/ten]
Copy Code


IPv6 stateless address auto-configuration
The interface identifier for the Ethernet interface (Interface Identifier) is identified based on the EUI-64 (64-bit extended unique Identifier). The EUI-64 identity of the NIC is extended by a 48-bit IEEE802 address built into the NIC. The following first describes the construction method of EUI-64.
The Oui (organizationally Unique Identifier) portion of the Ethernet address (i.e. the first 3 bytes) constitutes the company_id portion of the EUI-64 (that is, the first 3 bytes), and the fifth byte of Eui is a fixed 16 binary value Fffe. The last 3 bytes of the Ethernet address constitute the last 3 bytes of the EUI-64.
The interface identifier is obtained by EUI-64 the "Global/Local" ("universal/local") bit. This bit is the sub-low of the first byte of the EUI-64. Since the built-in address of the NIC is distributed globally, the resulting identity is also globally unique. The bit of the IEEE802 or EUI-64 address is 0, and the globally unique IPV6 interface identifies the bit as 1.
For example, the MAC address of a network card is: 34-56-78-9a-bc-de, then its corresponding interface identifier should be: 36-56-78-ff-fe-9a-bc-de.
You should not use the interface identifier for a manually set or software-configured NIC address. If you must use such an address to construct the interface identifier, you should reflect the global uniqueness of the address on the "u/l" bit.
The length of the IPv6 address prefix (IPv6 addresses prefix) used for stateless automatic configuration of an Ethernet card must be 64 bits.

link-local Address
The IPV6 link-local address of the Ethernet card is constructed through the interface identifier of the interface. The construction method is: The highest 10 bits are "1111111010", then 54 bits are all 0, and the last 64 bits are the interface identifier of the interface.
For example, the interface is identified as: 36-56-78-ff-fe-9a-bc-de, then the corresponding IPV6 link-local address is: FE80::3656:78FF:FE9A:BCDE.

temporary Address interface identification
In today's IPv4-based internet, Internet users typically connect to Internet service providers (ISPs) and obtain IPV4 addresses by using point-to-Point Protocol (PPP) and Internet Protocol Control Protocol (IPCP). Each time a user connects, a different IPv4 address may be obtained. Therefore, it is difficult to track user traffic on the Internet based on IP addresses.

For IPV6-based dial-up connections, the user is assigned a 64-bit prefix after the connection is established through router discovery and stateless address autoconfiguration. If the interface identity is always based on an EUI-64 address (derived from a static IEEE 802 address), the communication of the specified node can be identified, regardless of its prefix, making it easy to keep track of the specified user and its use of the Internet. To solve this problem and provide some degree of anonymity, an alternate IPV6 interface identifier is described in RFC 3041, which is randomly generated and changes over time.

The initial interface identifier is generated by using random numbers. For IPV6 systems that cannot store historical information in order to generate future interface identities, a new interface identity is randomly generated each time the IPV6 protocol is initialized. For IPV6 systems with storage capabilities, historical values are stored, and when the IPV6 protocol is initialized, a new interface identity is created through the following process:

    • Retrieves the historical value from the store and attaches the interface identifier based on the EUI-64 address of the adapter.
    • Calculate the "Message Digest 5 (MD5)" One-way cryptographic hash for the quantity in step 1.
    • Save the last 64 bits of the MD5 hash computed in step 2 as the historical value for the next interface identity calculation.
    • Extract the first 64 bits of the MD5 hash computed in step 2, and set the seventh bit to 0. The seventh bit corresponds to the u/l bit, which, when set to 0 o'clock, indicates the local management interface identity. The result is the interface identifier.

The IPV6 address identified by this random interface is called a temporary address. The temporary address is generated for a public address prefix that is automatically configured with stateless addresses. Temporary addresses are used to reduce the values of the following valid lifetimes and preferred lifetimes:

    • The lifetime is included in the Prefix Information option in the received Router Advertisement message.
    • The local default value for the valid lifetime is 1 weeks, and the local default for the preferred lifetime is 1 days.

After the valid lifetime of the temporary address expires, a new interface identity and temporary address are generated.

By default, the IPV6 protocol for Windows Server 2003 does not create temporary addresses for global address prefixes. can usenetsh interface ipv6 set privacy state=enabledcommand to modify this default setting.
Windows XP has both a public and a temporary (temporary) global address, because the interface identifier portion of the public global address is generated based on the hardware address evolution of the user's NIC, which may expose user privacy, while the interface identifier portion of the temporary global address is randomly generated, And there is an aging limit, you can avoid user privacy leaks. Therefore, a temporary global address is used to actually make a IPv6 network connection.

IEEE related standards and RFC documentation
Maybe people will think why we want to insert 0xFFFE, and is inserted in the middle of the MAC address of IEEE 802? and address also to carry on the calculation of u/l bit? Or you are IPV6 's protocol stack developers, researchers, may be interested in the relevant standards, then you can directly refer to the documentation on the IEEE:
Guidelines for 64-bit GLOBAL IDENTIFIER (EUI-64) Registration authority:
At the same time it was originally defined in RFC 2373, but subsequent RFC 2373 was abolished by RFC 3513, and in the progressive development of IPV6, RFC 3513 was again abolished by RFC 4291.
Therefore, the latest specification can be consulted RFC4291, can properly understand the relationship between the various RFCs, some books and materials may also have a related RFC number, but with the IETF to update and improve the relevant protocol, protocol standards related to the latest document number has changed, Also IPV6 related development or researchers need to pay attention to.
The RFC4291 has also been partially updated in RFC 5952:

Source: http://www.ipv6bbs.cn/thread-210-1-1.html

IPV6 Simple Summary

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.