Friday 30 May 2014

IPv6

IPv6 Basics
IPv4 addresses are 32 bits long and are represented in dotted-decimal format. IPv6 addresses are 128 bits and are in hexadecimal format.
The first 64 bits of an IPv6 address are reserved for the network portion and the last 64 bits are used for the host portion.
IPv6 Shorthand
The ability to shorten IPv6 addresses is very important to understand because it makes reading and writing them much easier.
There are two ways to condense an IPv6 address:
1. Leading zeros can be removed in any section.
For example, 0021:0001:0000:030A:0000:0000:0000:0987E can be abbreviated as: 21:1:0:30A:0:0:0:987E
2. Sequential sections of all zeros can be shortened to a single double colon.
This can only be used once per address. Using the same example address above, it can be further shortened to:
21:1:0:30A::987E
Unicast, Multicast, & Anycast
Unicast
Unicast is for sending traffic to a single interface. In IPv6 there are actually two different unicast types, global unicast and link-local unicast.
Multicast
Unlike IPv4, IPv6 addressing does not support broadcasts. Instead, it has replaced it with multicast (which is a more efficient variation). This is used for sending traffic to a group of devices.
Anycast
IPv6 supports another new packet type – anycast. Anycast allows the same address to be used on multiple devices for load balancing and redundancy. Technically, it is used for sending traffic to the nearest interface in a group. While multiple devices may be running the same anycast address, only one will be used per packet sent.
Be aware that with IPv6, an interface can be assigned multiple addresses. Here is the list:
• Unicast address
• Link-local address
• loopback (::1/128)
• All nodes multicast (FF00::1)
• Site-local multicast (FF02::2)
• Solicited-nodes multicast
• Default Route (::/0)
Manual Address Configuration
The first thing to know about manual IPv6 address configuration is that addresses assigned to a router interface use the address/prefix-length notation instead of the address mask notation. This is so much easier than typing 255.255… after every IP address!
Also, make sure you first enable IPv6 routing with the ipv6 unicast-routing global configuration command. Use the ipv6 address ipv6-address/prefix-length command to assign an address.
An example of an interface configured with an IPv6 address:
R1# conf t
R1(config)# ipv6 unicast-routing
R1(config)# int gig 1/1 R1(config-if)# ipv6 address 21:1:0:30A::987E/64
Manual Network Assignment
Another way to manually configure an IPv6 address is to configure the network and allow the host portion to be auto-populated based on the device’s MAC address. This can work well because MAC addresses are 64 bits long – the exact same length as the host portion of an IPv6 address!
An example configuration with the network portion defined:
R1(config)# int gig 1/1
R1(config-if)# ipv6 address 21:1:0:30A::/64
Note: Some systems have a 48 bit MAC address. In this case, it flips the 7th bit and inserts 0xFFFE into the middle of the MAC address. This modified version is called an EUI-64 address. To do this, add the keyword eui-64 to the end of the ipv6 address statement.