What is the difference between IPv4 & IPv6 ? In simple terms IPv6 address is 128 bits long (compare to 32 bits IPv4) which allows to create 2^128 address which is more than sufficient to meet the demand of a foreseeable future.

In technical terms, here is the difference between IPv4 & IPv6 header.IPv6-01

IPv6 addressing has the following format. Usually last 64 bits allocated for host & first 64 bits allocated for Network. Usually written as 32 hex with grouping of four by a colon (:). These are not case sensitive & you can use either uppercase or lowercase hex characters to represent IPv6 address.IPv6-02

IPv6 uses CIDR representation & also you can abbreviate using :: for continuous blocks of Zeros. But for a given address :: can appear on once. For example if a given IPv6 address is 2001:0308:607c:003e:0000:0000:0000:0002 with 64 bits for host portion. You can replace all highlighted blocks of Zero with :: which simplify this to 2001:0308:607c:003e::0002. Also you can ignore leading zeros of a given block of 4 hex digits. So this can be written as 2001:308:607c:3e::2/64.

There are different type of IPv6 addresses assigned by IANA.

1. Link Local      – FE80::/64
2. Unique Local  – FC00::/7
3. Global           – 2000::/3
4. Multicast       – FF00::/8

Not like IPv4, given interface can have multiple IPv6 addresses on it. By default Link local IPv6 address self assigned based on the MAC address of the IPv6 enabled interface. Here is the format of Link Local IPv6 address.IPv6-03

Here are the different type of Address requirement for a given interface.IPv6-04

IPv6 Address for a given interface may be assigned in different ways.

1. Auto Configured from a EUI-64 or expanded from a 48 bit MAC address
2. Assigned via DHCP
3. Manually Configured

In case of expanding 48 bit MAC to 64 bit interface ID “FFFE” will be instert into the middle of 48 bit MAC address to make it 64bit. Following show an example for this. Note that 7th bit get inverted as well in this conversion process.IPv6-05

Here is another example. Given interface is having following MAC address. Once you configure IPv6 on this interface it will automatically assign IPv6 Link Local address based on that MAC address.

CR01#sh int g1/2
GigabitEthernet1/2 is up, line protocol is up (connected)
  Hardware is C6k 1000Mb 802.3, address is 5475.d0bd.90c0 (bia 5475.d0bd.90c0)

Two simple rules you need to remember

1. Invert 7th bit (0101 0100) of the MAC address (start with 5475 in my example). So this will be written as (0101 0110) & therefore interface ID should start with 56.
2. Add “fffe” to the middle of the MAC address.( in between “d0” & “bd” in my case)

In this example Link Local IPv6 address should be FE80::5675:d0ff:febd:90c0. You can verify this “show ipv6 interface brief command”

CR01#sh ipv6 interface brief | ex un
GigabitEthernet1/2         [up/up]

IPv6 Multicast addresses are having following format.IPv6-06

Here are few well-known IPv6 Multicast MAC address.IPv6-07

Neighbour Solicitation (NS) messages use Solicited Node Multicast address having the format of FF02::1:FF format.IPv6-08
Here is an example of deriving Solicited Node muticast address from Interface ID.IPv6-09

Here is how you configure basic IPv6 addressing on a Cisco IOS device. You can simply enable IPv6 by using “ipv6 unicast routing ” CLI command. In a switch like 3750/3560 you need to do “sdm prefer dual-ipv4-and-ipv6 default” command to ensure IPv6 support of these platforms. You have to reload the switch to take affect of this command.

In this basic example we will configure IPv6 address for a link between two 3750 switches (as shown in the below)IPv6-10

Lets say we configure 2001:308:607c:1234::/64 unicast addresses. First we will configure using EUI-64 where it use interface MAC address to derive Interface ID component. As you know how this conversion (7th bit inversion & add ‘fffe’ in middle) happen you can determine it should be ::0212:43ff:feb6:6ac1 for 3750A & ::0223:05ff:fe5f:ffc1 for 3750B switch.

Here is the configuration & verification of those configuration.Once you configure both end you should be able to ping each other. Noticed that link local address will automatically assigned as well.

3750-a(config)#ipv6 unicast-routing
3750-a(config)#int fa1/0/9
3750-a(config-if)#ipv6 address 2001:308:607c:1234::/64 eui-64
3750-a(config-if)#do sh ipv6 int bri | ex un
FastEthernet1/0/9          [up/up]
3750-a#ping 2001:308:607C:1234:223:5FF:FE5F:FFC1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 2001:308:607C:1234:223:5FF:FE5F:FFC1, timeout is 2 seconds:
Success rate is 100 percent (5/5), round-trip min/avg/max = 0/5/9 ms

3750-b(config)#ipv6 unicast-routing
3750-b(config)#int fa1/0/9
3750-b(config-if)#ipv6 address 2001:308:607c:1234::/64 eui-64
3750-b(config-if)#do sh ipv6 int bri | ex un
FastEthernet1/0/9          [up/up]
3750-b#ping 2001:308:607C:1234:212:43FF:FEB6:6AC1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 2001:308:607C:1234:212:43FF:FEB6:6AC1, timeout is 2 seconds:
Success rate is 100 percent (5/5), round-trip min/avg/max = 0/5/17 ms

In the manual IPv6 assignment process, you can determine what should be in the host portion of the IP. Lets assume we would give 2001:308:607c:1234::1/64 for 3750A & 2001:308:607c:1234::2/64 for 3750B. Notice that it will not replace the configured IPv6 address (If you want to have single IPv6 address you need to remove the other configured global IPv6 address on the interface)

3750-a(config)#int fa1/0/9
3750-a(config-if)#ipv6 address 2001:308:607C:1234::1/64 
3750-a(config-if)#do sh run int fa1/0/9
interface FastEthernet1/0/9
 ipv6 address 2001:308:607C:1234::1/64
 ipv6 address 2001:308:607C:1234::/64 eui-64

3750-b(config)#int fa1/0/9
3750-b(config-if)#ipv6 address 2001:308:607C:1234::2/64 
3750-b(config-if)#do p 2001:308:607C:1234::1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 2001:308:607C:1234::1, timeout is 2 seconds:
Success rate is 100 percent (5/5), round-trip min/avg/max = 0/8/25 ms

In a future post we will see how to configure routing protocols on IPv6 (static, OSPF & EIGRP).

This is the CiscoLive material I used as reference for this blog post. Please feel free to go through it.
BRKRST-1069 Understanding IPv6

Related Posts

1. Configuring IPv6 Routing
2. Configuring IPv6 on WLC