Basic IPv6 configuration in Packet Tracer.


Welcome to this tutorial !  Here we’re going to look at the basic concepts of IPv6 then perform static IPv6 configuration in Packet Tracer. Everything is explained in simple easy-to-follow steps for the sake of clarity. With that, here is a quick list of what we’ll look at:

  • An overview of IPv6
  • The format of an IPv6 address, and how to shorten IPv6 addresses.
  • IPv6 address types
  • EUI-64 calculation
  • Basic IPv6 address configuration on a router and two PCs in Packet Tracer
  • Stateless IPv6 address auto-configuration 

1. An overview of IPv6

IPv6 is the newest version of the IP protocol, which people often refer to as ‘the next- generation Internet Protocol’. It was developed as an answer to many deficiencies of IPv4, most notably the problem of IPv4 address exhaustion. IPv6 is used for the same general functions as IPv4, though with a different implementation.

Let’s view some of the most important features of IPv6.

  • There is a very large number of IPv6 addresses, since IPv6 addresses are 128-bit , unlike IPv4 addresses which are 32-bit.
  • IPv6 has a simpler header – because there are no checksum bits as used in an IPv4 header. For this reason, routers don’t need to calculate the checksum for every packet.
  • There is Stateless address autoconfiguration in IPv6: – Hosts autoconfigure themselves with IPv6 addresses.
  • There is no need for NAT, since each device in an IPV6 network has a globally unique IPv6 address.

2. The Format of an IPv6 address.

An IPv6 address is 128-bit long and uses 8 groups of 4 hexadecimal digits separated by colons.  An IPv6 address looks like this:

FE80:0A3B:0002:4B3C:0F6D:3D40:FFC5:005A

Let’s now see:

How to shorten an IPv6 address.

We have 2 rules of doing this:

Rule #1: A leading zero can be omitted.

For  example, consider the following IPv6 address:

FE80:0A3B:0002:4B3C:0F6D:3D40:FFC5:005A

By omitting all leading zeros (in blue) , the address shortens to:

FE80:A3B:2:4B3C:F6D:3D40:FFC5:5A

 

Rule #2: Successive groups of zeros can be represented as two colons(::)

For example, consider the address below:

2002:0000:0000:A29F:7D12:5502:63AF:BD2C

Replace the successive groups of zeros (in red) by double colon, and the shortened version will look like this:

2002::A29F:7D12:5502

What if now you were told shorten this address:

2002:0000:0000:2B3C:0000:0000:0000:55DA

Will the shortened version look like this->  2002::2B3C::55DA ?  NO!

Instead, the shortened version should either be 2002:0:0:2B3C::55DA  or look like 2002::2B3C:0:0:0:55DA.

Why is this so? You can’t have more than one occurrence of a double colon in the shortened version because if you had, you wouldn’t know how many sets of zeroes were being omitted for each part. That’s the reason! You’ve seen it?

Moving on,

We can always combine the two rules where applicable, so as to obtain the shortest address possible.

Quiz yourself:  Test your understanding with these four:

1. Long version  –         2002:0000:3D12:25AF:2788:00AB:63AF:002C

Shortened version–    2002:0:3D12:25AF:2788:AB:63AF:2C

2. Long version  –         FF02:0000:3D12:0000:0000:0000:63AF:002C

Shortened version–    FF02:0:3D12::63AF:2C

3.Long version –           FE80:A29F:0000:0000:4B2C:0000:0000:45DB

Shortened version –  FE80:A29F:0:0:4B2C::45DB

Alternatively, the shortened version can be FE80:A29F::4B2C:0:0:45DB

4.Long Version  –       2002:0000:0000:2B3C:0000:0000:0000:55DA

Shortened version–   2002:0:0:2B3C::55DA

Shortened version could also be –  2002::2B3C:0:0:0:55DA

Its pretty simple, isn’t ?

 

Now we’ll move on to…

3. IPv6 address types

In IPv4, we have 3 types of addresses: unicast, multicast and broadcast. In IPv6, we no longer have broadcast. Broadcast addresses have been eliminated and replaced with anycast and multicast addresses.

So for IPv6, we have: unicast, multicast and anycast. Let’s briefly look at each.

Unicast address –  Identifies a single interface. Packets addressed to a unicast address are delivered to a single interface.

Multicast address – Identifies a specific group of hosts. Just as for IPv4, packets sent to a multicast address are delivered to all interfaces identified by the multicast address. Multicast IPv6 addresses always start with FF.

Anycast address Like a multicast address, an anycast address identifies multiple interfaces, but there’s a difference: packets sent to an anycast  address are delivered to one address- the address which is nearest to the source in terms of routing distance.

For example, we can assign the same anycast address to servers that offer a similar service. Packets sent to that IP address will be forwarded to the nearest server. For that reason, you can call an anycast address a ‘one-to-one-of-many‘ address.  Anycast addresses are used for load balancing.

Types of IPv6 unicast addresses

IPv6 unicast addresses are of three types:

Global unicast These are publicly routable IPv6 addresses similar to public IPv4 addresses. They start with 2000::/3.

Link local -These are similar to IPv4 addresses in the APIPA range. These addresses are usable only within a network segment that a host is connected to. Routers will not forward packets destined to a link-local address to other links. A link-local address must be assigned to every network interface on which IPv6 protocol is enabled. These  addresses with the prefix FE80::/10

Unique local – These have the same functions as private addresses in IPv4: to allow communication throughout a network segment while being routable to multiple local networks.Unique local addresses begin with the prefix FD00::/8.

 

Now let’s add something extra to our knowledge of IPv6 addresses by looking at:

4. IPv6 EUI-64 calculation

We’ve already seen that an IPv6 address is 128-bit. It’s worth knowing that an IPv6 unicast address is made up of  a subnet id and an interface ID.

For example, a global unicast address has a 64-bit subnet ID and 64 -bit interface ID. The subnet ID contains the site prefix and the subnet ID (subnets within the site). The interface ID is composed of a part of the MAC address of the interface.

Let’s see how to obtain an interface ID from a MAC address of a device, such as a PC.

Probably, you must be knowing that a MAC address is usually 48-bits long. And now, we want to generate a 64-bit interface ID using this MAC. How do we do it ?  As you can guess, we’ll achieve this by adding 16 bits to the MAC address to end up with the 64-bit ID. 16 bits is equivalent to 4 Hexadecimal digits. Since IPv6 addresses are usually expressed in Hex, we normally insert the hex number FFFE in the middle of the MAC address to obtain the interface ID. Simple! The interface ID created this way is known as a modified Extended Unique Identifier 64 (EUI-64).

So to obtain the interface ID using the EUI-64 method:

1.  Split the MAC address into two halves (Each half will have 6 hex digits).

2. Insert FFFE in between the two halves to create an interface ID.

3. Invert the seventh bit of the interface ID.

For example, if the MAC address of network  card of a PC is 00:00:AA:BB:FF:55

Splitting the MAC into 2 halves and inserting FFFE in the middle gives:

0000AAFFFEBBFF55

We’ll now flip the seventh bit of this ID. To do this, we’ll first write it in binary (Remember each hex digit is to equivalent 4bits)

0000 0000 0000 0000 1010 1010 1111 1111 1111 1110 1011 1011 1111 1111 1001 0101

So that on flipping the 7th bit we obtain:

0000 0010 0000 0000 1010 1010 1111 1111 1111 1110 1011 1011 1111 1111 1001 0101

Which when re-written in Hex becomes 0200AAFFFEBBFF55

So now, our  modified interface ID is 0200:AAFF:FEBB:FF55

That’s all for EUI-64 calculation!

 

We’ll now do some basic configurations. So move on.

5. Basic  IPv6 address configuration in Packet Tracer

To configure static IPv6 addresses on a router, you may choose to specify the whole 128-bit IPv6 address or use the EUI-64 format.

For example, if I choose to specify the whole 128-bit address, the configuration would look like this:

Router(config)#int fa0/0

Router(config-if)#ipv6 address 2002::2/64

Here, 2002::2 is the IPv6 address while 64 defines the subnet ID length.

On the other hand, if we choose to use the EUI-64 format , we simply specify the subnet ID then let the router perform  EUI-64 calculation to get itself  the interface ID. The configuration would look like this:

Router(config)#int fa0/0

Router(config-if)#ipv6 address 2002::/64 eui-64

Important: Before you can use IPv6 addressing on a router, always remember to first enable IPv6 routing on a router using the IPv6 unicast-routing command from its global configuration mode.

 

Let’s now do full configurations in Packet Tracer.

1.Build the network topology.

Basic IPv6 topology

2. Configure IPv6 addresses on router interfaces.

Router#config term
Router(config)#ipv6 unicast-routing
Router(config)#int fa0/0
Router(config-if)#ipv6 address 2002::1/64
Router(config-if)#no shut
Router(config-if)#
Router(config-if)#int fa0/1
Router(config-if)#ipv6 address 2003::1/64
Router(config-if)#no shut

 

3. Now configure static IPv6 addresses on  the PC and Laptop

Laptop:  

IPv6 address 2003::10   Default gateway 2003::1

Laptop IPv6 config.PNG

 

PC :        IPv6 address 2002::10   Default gateway  2002::1

PC IPv6 config

 

4. Verify IPv6 configuration using ping.

First ping the laptop from the PC using its IPv6 address. Ping should be successful.

ping test.PNG

 

Next, we’ll verify the IPv6 address configuration on the router using show ipv6 int brief command on the router.

show ipv6 int brief

From the command’s output, we can verify that:

1.  A link local IPv6 address(starting with FE80) has been automatically configured on each interface.

2. You can also see the static address we have just configured – 2002::1 for int fa0/0 and 2003::1 for fa0/1.

 

Finally, let’s talk a little more about stateless IPv6 auto-configuration.

6. More about Stateless Auto-Configuration

As you can verify from above, a link local address has been automatically configured on each interface of the router. This simply happens when router combines the prefix ID for a link-local address (which always starts with FE80) with its  modified interface ID ( obtained using EUI-64 method), to form a link-local IPv6 address.

In a similar way, the PC will auto-configure itself with a link local address.

Worth noting: Autoconfiguration not only happens for link-local but also for other unicast IPv6 addresses (global unicast and unique local).

Using our example above, the PC first acquires  a unique-local address prefix ID from router advertisement(RA). Here the PC acquires the prefix ID of interface fa0/0 , which is  2002::/64.  The PC will then perform EUI-64 using its MAC address to obtain its interface ID. When combined, the prefix and interface ID will form a unique local address of the PC. Since no DHCP has been used  and the unique local address has neither been statically configured on the PC, we say that PC has auto-configured itself with the unique local address.

To verify this, click on the PC and on its IPv6 configuration section, enable auto-configuration. There you’re! See for yourself! Note the prefixes for both link-local and unique-local auto-configured addresses.

PC1 autoconfiguration.PNG

This post was a bit lengthy but  I hope you’ve gained something from it.

Just as always, Success! Success!

Leave your comments. They will help a lot in improving this post and in writing better articles in the future.

You may also like to have a look at:

 

References:

 

 

 

 

 

 

 

 

 

 

 

 

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.