IPv6

Done

Benefits

Which technologies assist in the transition from IPv4 to IPv6?

Hexadecimal

IPv6 is written in hexadecimal.

đź’ˇ
REMEMBER: 4 bits → 1 hexadecimal number (1111 = F)

In comparison with IPv4`s 32 bits of length, IPv6 has 128 bits of length → 2^128 IP addresses. It is also grouped in 8 set of 4 hexadecimal numbers. For example: 4ef4:223b:6789:ab34:73fe:51bb:aaaa:56be

đź’ˇ
IMPORTANT: It uses prefix (CIDR) notation for the mask (i.e. /64)

Abbreviation

IPv6 Assignment (Global Unicast Addresses)

Typically enterprises have a /48 network assigned to them, but usually an IPv6 address has an prefix of /64 → There are 16 bits for subnets and 64 bits for hosts.

Basic IPv6 Configuration

Enable IPv6 on a router

configure terminal
ipv6 unicast-routing

Assign an IPv6 address to an interface

configure terminal
interface g0/0
ipv6 address {ipv6-address}/{prefix}

Show IPv6 interfaces

show ipv6 interface brief

Modified EUI-64

Also known as Extended Unique Identifier, it is a method of converting the MAC Address of the interface into a 64-bit unique identifier.

This will become the host portion of the /64 IPv6 address.

  1. Divide the MAC Address in half
    1. For Example: 1234 5678 90AB → 1234 56 | 78 90AB
  1. Insert FFFE
    1. 1234 56FF FE78 90AB
  1. Invert the 7th bit
    1. 1234 56FF FE78 90AB → 1034 56FF FE78 90AB

Configure an IPv6 Address using EUI-64

configure terminal
interface g0/0
ipv6 address 2001:0db8:0000:0001/64 eui-64  //It will create an Host IP based on the MAC Address
no shutdown

Types of IPv6 Addresses

Global Unicast

These type of addresses are globally unique identified. They are a public address that needs to be register, it identifies a network in the whole world.

They are in the range of 2000:0000:0000:0000:0000:0000:0000:0000 - 3FFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF (2000::/3). Therefore, it starts with 2 or 3.

đź’ˇ
IMPORTANT: This was updated, so any non-reserved range of IPv6 addresses are can be Global Unicast Addresses.

Usually in a given IP Address by your ISP there will be the 48-bit Global Routing Prefix” followed by the “subnet identifier” and then “interface identifier”

Unique Local

These addresses don`t need to be registered. They are not used in the internet, only internally, so if you send it to you ISP, the packet will be dropped.

It is all the address that start with FD (FD00::/8)

đź’ˇ
It used to be FC00::/7

Besides from the Unique local identifier, there is a 40-bit Global ID, and again the subnet identifier and the interface identifier

đź’ˇ
The 40-bit Global ID is randomly generated in case a company merges with another, so there is a fewer chance of duplicate subnets

Link Local

It is an address that the host portion is GENERATED based on the interface MAC Address (EUI-64). It is therefore, the address associated with the interface.

đź’ˇ
NOTE: Because of this, the host portion will be the same for the address that used EUI-64.

It is ONLY USED inside the subnet. Therefore, you CAN`T use it as the destination IP address of a packet, it will be dropped.

It is mainly used for:

It is identified by FE80::/10

đź’ˇ
IMPORTANT: The standard says that the rest 54 bits be set to 0, so you wont see a FE9, FEA or B.
đź’ˇ
IMPORTANT: These will be generated whenever you configure an IPv6 address on the interface or if you issue the ipv6 enable command on the interface.

Multicast

It is an address of one-to-many. It is a packet to all the devices that joined that multicast group.

It is identified by FF00::/8

PurposeMulticast IPv6 addressMulticast IPv4 Equivalent
All nodes/hosts (”IPv6 Broadcast”)FF02::1224.0.0.1
All routersFF02::2224.0.0.2
All OSPF routersFF02::5224.0.0.5
All OSPF DR/DBRFF02::6224.0.0.6
All RIP routersFF02::9224.0.0.9
All EIGRP routersFF02::A224.0.0.10
đź’ˇ
IMPORTANT: There is no Broadcast address for IPv6!

The Multicast addresses are by itself divided in scopes, which say how much a packet can travel, some of them are:

Anycast

It is a new feature introduced in IPv6. It is a one to one-of-many, you could also say one-to-multiple but only one is going to receive that packet.

You might wonder, what is the difference from Multicast? The answer is that only one will receive the packet, not many.

You could also think, then what is the difference from Unicast? Both will be sent to only one device, but the difference lies in the fact that anycast can be configured as a shared IP address while Unicast is unique.

So how does it select the device that will receive that packet, it will be the one with the lowest routing metric

It also has no range, so you can use a Global Unicast or a Unique Local address as a anycast address, you just have to add the anycast statement in the end of the ipv6 address command.

configure terminal
interface g0/0 
ipv6 address FD89:0001:5345:243D:4324:5434:BBDD:0221/128 anycast
đź’ˇ
NOTE: It usually refers to a single IP as stated by the /128 mask

Special IP Addresses

đź’ˇ
NOTE: the loopback address is represent by a single address instead of a whole /8 range

IPv6 Header

Version

Length: 4 Bits

Specifies the version of the IP Protocol being used, it will always be 6 in Binary (0b0110)

Traffic Class

Length: 8 Bits

Used for QoS (Quality of Service)

Flow Label

Length: 20 Bits

Used to identify specific traffic flows between a specific source and destination

Payload Length

Length: 16 Bits

It is used to indicate the size of the L4PDU.

đź’ˇ
NOTE: There is no Header Length as in the IPv4 Header, since the IPv6 is fixed in 40 bytes.

Next Header

Length: 8 Bits

Indicates the type of the L4 PDU header: TCP or UDP.

Hop Limit

Length: 8 Bits

Tells how much the packet has been forwarded. Each time it passes by a router, the value is decremented by 1. If it reaches 0, the router will drop the packet.

đź’ˇ
NOTE: It is the same as the TTL (Time-to-Live) of IPv4

Source and Destination IP Addresses

Length: 128 Bits each

IPv6 Addresses

NDP

NDP (Neighbor Discovery Protocol) is the IPv6 version of ARP. It uses ICMPv6 and the Solicited-Node Multicast Address to associate a device`s MAC Address with its IPv6 Address

đź’ˇ
IPv6 doesn`t use Broadcast like IPv4 does. In fact, there is no Broadcast in IPv6.

There are four types of NDP messages:

NDP Also has another feature → DAD (Duplicate Address Detection)

Solicited-Node Multicast Address

How Usual NDP works

  1. Host 1 calculates the Host 2`s Solicited-Node Multicast Address by the unicast address entered in the ping command.
  1. Host 1 sends a Neighbor Solicitation message via ICMPv6 with the destination IPv6 address as the Host 2`s Solicited-Note Multicast Address and the Destination MAC Address as the Multicast MAC Address based on Host 2 Solicited-Node Multicast Address.
  1. Host 2 replies with a Neighbor Advertisement with its IPv6 address in the source and the destination IPv6 address as Host 1 (Learned via the source IPv6 address on the NS), and also the source MAC Address as its MAC Address and the destination MAC Address as Host 1 (Also learned via the NS).

For example:

Host 1: 2001:db8::1 Host 2: 2001:dn8::bb:abc2

NS:

Source IPv6Destination IPv6Source MACDestination MAC
2001:db8::1ff02::1:ffbb:abc2Host 1 MACIPv6mcast_ff: bb.ab.c2

See NDP Table

It is the equivalent to the ARP table.

show ipv6 neighbor

SLAAC

SLAAC (Stateless Address Auto-Configuration) is a way of automatically configure an IPv6 address on a host using that subnet`s router interface to learn the prefix and default-gateway using NDP, then they generate an IPv6 using EUI-64 or randomly generate the interface identifier.

ipv6 address autoconfig

DAD

It allows the device to know if there is another device in the local link using the same IPv6 Address as it.

It is used whenever a no shutdown command is issued or an ipv6 address is entered.

It uses the NS/NA messages. By sending an NS with its own IPv6 address, if it gets a reply, it will know it has a duplicate address.

IPv6 Static Routing

It works the same as IPv4 routing. The router will generate a separate routing table for each IP version.

đź’ˇ
REMEMBER: Routers will not forward packets with link local addresses or multicast addresses with a link-local scope, therefore, it won`t add them to the routing table.
configure terminal
ipv6 route {destination}/{prefix length} {next-hop | outgoing-interface [next-hop]} [ad]

Remembering, there are 3 types of Static Routes:

Default Route

configure terminal
ipv6 route ::/0 {next-hop | outgoing-interface [next-hop]} [ad]

Extra