IPv6 addresses are 128 bits in length and are made up of hexadecimal characters separated by colons. In IPv6, addresses are expressed as a series of eight 4-character hexadecimal numbers, which represent 16 bits each for a total of 128 bits. IPv6 uses CIDR notation to represent the network and interface components of the address.
Here is a typical IPv6 address.
2001:0db8:1234:0000:0000:f350:2256:f3dd/64
The IPv6 address consists of two 64-bit segments where the higher part of the bits is classified as the network part, and the lower 64 bits are classified as the interface ID. The network part is subdivided into the network ID of 48 bits and a 16 bit subnet ID. The information is illustrated by the following diagram:
For ease of use IPv6 addresses can be abbreviated in a way that allows them to be expressed with fewer characters.
The following address 2001:0DB8:C003:0001:0000:0000:0000:F00D/64
Can be represented in shorter format by removing leading zeros
2001:DB8:C003:1:0:0:0:F00D/64
Further reduction by removing consecutive fields of zeros using the double-colon :: option
2001:DB8:C003:1::F00D/64
Note the double colon can only be used once
IPv6 addresses have three types:
1. Unicasts Adresses
- Global Unicast Address –Scope Internet- routed on Internet
- Unique Local — Scope Internal Network or VPN internally routable, but Not routed on Internet
- Link Local – Scope network link- Not Routed internally or externally.
Global Unicast Addresses
Global addresses are routable on the internet and start with 2001:
These addresses are known as global Unicast addresses and are the equivalent of the public addresses of IPv4 networks.
The Internet authorities allocate address blocks to ISPs who in turn allocate them to their customers.
Link Local and Unique Local
These addresses are not routed on the Internet and are reserved for internal networks.
Link Local
These are meant to be used inside an internal network, and again they are not routed on the Internet.
It is equivalent to the IPv4 address 169.254.0.0/16 which is allocated on an IPv4 network when no DHCP server is found.
Link local addresses start with fe80
They are restricted to a link and are not routed on the Internal network or the Internet.
Link Local addresses are self assigned i.e. they do not require a DHCP server.
A link local address is required on every IP6 interface even if no routing is present.
Unique Local
Unique Local are meant to be used inside an internal network.
They are routed on the Internal network but not routed on the Internet.
They are equivalent to the IPv4 addresses are 10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16
The address space is divided into two /8 spaces: fc00::/8 for globally assigned addressing, and fd00::/8 for locally assigned addressing.
For manually assignment by an organisation use the fd00 prefix.
2. Multicast Address
The multicast address identifies a multicast group, which is a group of interfaces, usually on different nodes. An interface can belong to any number of multicast groups. If the first 16 bits of an IPv6 address is ff00n, the address is a multicast address.
Multicast addresses are used for sending information or services to all interfaces that are defined as members of the multicast group.
3 . Anycast Address
IPv6 anycast addresses identify a group of interfaces on different IPv6 nodes. Each group of interfaces is known as an anycast group. When a packet is sent to the anycast address, the anycast group member that is physically closest to the sender receives the packet.
Using IPv6 Addresses in URLs
IPv6 addresses contain a colon as separator and so must be enclosed in square brackets.
http://[2001:DB8:C003:1::F00D]/webpage.
Here is the IPV6 address with a connection to a web server using port 8001
http://[2001:DB8:C003:1:F00D]:8001
IPv6 Loop Back
The IPv6 loopback address is ::1.
You can ping it as follows:
ping ::1
DHCP and SLAAC on IPv6 Networks
DHCP Stateful Address Assignment
Similar to IPv4, IPv6 can use DHCP to statefully assign IP addresses to any clients. Stateful DHCP means that the DHCP server is responsible for assigning the IP address to and client. The DHCP server keeps a record of all clients and the IPv6 address assigned to them.
Stateless Address Assignment (SLAAC)
This is a unique feature only to IPv6. Stateless address configuration means that the client picks their own address based on the prefix being advertised on their connected interface. By default, SLAAC does not provide anything to the client outside of an IPv6 address and a default gateway. Additional configuration on the server is necessary before the same information can be provided to the client as Stateful DHCP.
Moreover, it is important to note that SLAAC most commonly uses eui-64 format for address assignment. This means that IPv6 addresses will be built from a combination of the Layer 3 subnet prefix and the MAC address of the interface. The requirement for SLAAC is that the LAN segment must use a /64 mask.
However the use of eui-64 format for client address assignment has been seen to be unpopular due to security concerns of the use of the interface MAC address in the calculation of the IPv6 address. This problem was resolved by issuing an update to the SLAAC protocol called ‘Privacy Extensions for Stateless Address Autoconfiguration in IPv6’. Basically the client no longer uses its MAC to fill in the last 48 of its IPv6 address. Instead it picks a series of bits randomly, and fills in the last 48 bits with the random bits.