- IPv6 Tutorial
- IPv6 Useful Resources
Each network socket has a stack of names and addresses (MAC, IPv4, and IPv6) and a stack of networking software to do the talking. These are collectively referred to as “the interface”. Instead of getting an address via DHCP, a NIC will hop on the network with a link-local IPv6 address and with this will have to ability to do further configuration automatically (soliciting neighbors, router, et cetera). This link-local IPv6 is infered from the NIC’s mac address. A mac address is 48 bits, an IPv6 address is 128 bits.
- Selected Reading
Here I am creating IPv6 Link-Local Address with network adapter MAC address (Network adapter can be physical or virtual), MAC addresses are 6 bytes (48-bits) in length, I will convert it to 128 bit IPv6 address, Here is the formula for the same, For example I have hexadecimal mac address here 52:15:5D:26:42:09, It need to be add ff:fe in the. What is the solicited-node multicast IPv6 address for 2001:db8:1001:f:2c0:10ff:fe17:fc0f? What is the corresponding MAC address for the solicited node multicast address ff02:0000:0000:0000:0000:0001:ff17:fc0f? How does the MAC address 00a1-6789-abcd translate into the right-most 64 bits of the IPv6 address when EUI-64 is used?
Hexadecimal Number System
Before introducing IPv6 Address format, we shall look into Hexadecimal Number System. Hexadecimal is a positional number system that uses radix (base) of 16. To represent the values in readable format, this system uses 0-9 symbols to represent values from zero to nine and A-F to represent values from ten to fifteen. Every digit in Hexadecimal can represent values from 0 to 15.
Address Structure
An IPv6 address is made of 128 bits divided into eight 16-bits blocks. Each block is then converted into 4-digit Hexadecimal numbers separated by colon symbols.
For example, given below is a 128 bit IPv6 address represented in binary format and divided into eight 16-bits blocks:
0010000000000001 0000000000000000 0011001000111000 1101111111100001 0000000001100011 0000000000000000 0000000000000000 1111111011111011
Each block is then converted into Hexadecimal and separated by ‘:’ symbol:
2001:0000:3238:DFE1:0063:0000:0000:FEFB
Even after converting into Hexadecimal format, IPv6 address remains long. IPv6 provides some rules to shorten the address. The rules are as follows:
![Mac Mac](https://www.researchgate.net/profile/Anatol-Badach/publication/320003101/figure/fig10/AS:587416930885632@1517062518005/How-can-the-host-addresses-MAC-address-and-IP-address-be-visually-interpreted-MAC.png)
Rule.1: Discard leading Zero(es):
In Block 5, 0063, the leading two 0s can be omitted, such as (5th block):
2001:0000:3238:DFE1:63:0000:0000:FEFB
Rule.2: If two of more blocks contain consecutive zeroes, omit them all and replace with double colon sign ::, such as (6th and 7th block):
2001:0000:3238:DFE1:63::FEFB
Consecutive blocks of zeroes can be replaced only once by :: so if there are still blocks of zeroes in the address, they can be shrunk down to a single zero, such as (2nd block):
2001:0:3238:DFE1:63::FEFB
Interface ID
IPv6 has three different types of Unicast Address scheme. The second half of the address (last 64 bits) is always used for Interface ID. The MAC address of a system is composed of 48-bits and represented in Hexadecimal. MAC addresses are considered to be uniquely assigned worldwide. Interface ID takes advantage of this uniqueness of MAC addresses. A host can auto-configure its Interface ID by using IEEE’s Extended Unique Identifier (EUI-64) format. First, a host divides its own MAC address into two 24-bits halves. Then 16-bit Hex value 0xFFFE is sandwiched into those two halves of MAC address, resulting in EUI-64 Interface ID.
Conversion of EUI-64 ID into IPv6 Interface Identifier
To convert EUI-64 ID into IPv6 Interface Identifier, the most significant 7th bit of EUI-64 ID is complemented. For example:
Ipv6 And Mac Address
Global Unicast Address
This address type is equivalent to IPv4’s public address. Global Unicast addresses in IPv6 are globally identifiable and uniquely addressable.
Global Routing Prefix: The most significant 48-bits are designated as Global Routing Prefix which is assigned to specific autonomous system. The three most significant bits of Global Routing Prefix is always set to 001.
Link-Local Address
Auto-configured IPv6 address is known as Link-Local address. This address always starts with FE80. The first 16 bits of link-local address is always set to 1111 1110 1000 0000 (FE80). The next 48-bits are set to 0, thus:
Mac Address Conversion Calculator
![Ipv6 address example Ipv6 address example](https://www.elektronik-kompendium.de/sites/net/bilder/19021312.gif)
Link-local addresses are used for communication among IPv6 hosts on a link (broadcast segment) only. These addresses are not routable, so a Router never forwards these addresses outside the link.
Unique-Local Address
This type of IPv6 address is globally unique, but it should be used in local communication. The second half of this address contain Interface ID and the first half is divided among Prefix, Local Bit, Global ID and Subnet ID.
Prefix is always set to 1111 110. M mac website. L bit, is set to 1 if the address is locally assigned. So far, the meaning of L bit to 0 is not defined.Therefore, Unique Local IPv6 address always starts with ‘FD’.
Ipv6 And Mac Address Change
Scope of IPv6 Unicast Addresses:
The scope of Link-local address is limited to the segment. Unique Local Address are locally global, but are not routed over the Internet, limiting their scope to an organization’s boundary. Global Unicast addresses are globally unique and recognizable. They shall make the essence of Internet v2 addressing.