~ My CCIE Wireless Journey & More…..

IPv6 Basics

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 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 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.

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.

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

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.

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.

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”

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)

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.

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)