Archive for May, 2012

Understanding IPv6 Addressing:

Due to the fact that we are running out of 32bits IPv4 addresses in a very near future scientists suggested another efficient way to assign the IP addresses and this is IP version 6 on in short IPv6 addressing.

  • An IPv6 address consist of 128 bits written in Hexadecimal format.
  • These 128 bits are subdivided in 8 groups or quartets.
  • There are 16 bits in each quarter.

If all the bits are 1 in an IPv6 address then we can write it as follows

in binary format
1111111111111111.1111111111111111.1111111111111111.1111111111111111.1111111111111111.

1111111111111111.1111111111111111.1111111111111111

In IPv6 Hex format
FFFF.FFFF.FFFF.FFFF.FFFF.FFFF.FFFF.FFFF   where FFFF represents one quartet or 16 bits.

Ways to write IPv6 address:

An IPv6 address FEC2.0000.0000.0000.05CD.0000.0000.04D0 can be rewritten in several ways.

FEC2::05CD.0000.0000.04D0
In IPv6 if an IP address has all consecutive 0’s in a hex quarter then we can use “::” (double column) to save some space.
Note: you can use “::” only once in an IPv6 address so it cannot be written as FEC2::05CD::04D0

FEC2::5CD.0.0.4D0
We can eliminate all the leading 0,s from the left so instead of writing fully zeroed quartet as 0000 we can use just  one ‘0‘ only and 05CD and 04D0 as 5CD and 4D0.

Atlast, if the network and subnet address (prefix) is FEC2.0000.0000.0000.0000.0000.0000.0000 then to make it shorter we can write all 0’s or remaining 112 bits as follows
FEC2::/112 which is equivalent to FEC2.0000.0000.0000.0000.0000.0000.0000

Basic structure of IPv6 address:

IPv6 address consist of two parts very similar to the IPv4 address
IPv6 address = Prefix + Host id
Prefix = Network address + Subnetmask

Network address = Regionally unique bits + countrywide + ISP

For example if for Asian region assigned with first two Hex digits FE then all the IPv6 addresses in Asian region starts with FE::/120 or FE00.0000.0000.0000.0000.0000.0000.0000

Means we have 120 bits left for country wide division.

Now we suppose inside Asian region a country XYZ assigned with FEBC::/112 address where ‘BC‘ represents that particular country. Every address in that particular country should be started with FEBC.

Now we have 112 bits left for ISP’s or big governmental organizations wide division.

Lets suppose inside the country XYZ an ISP assigned with FEBC:2000::/96 so every address in that particular ISP will be started with FEBC:2000 and still we have 96 bits left for ISP wide users that is enough for 2 raise to the power 96 or 2x2x2x2x2x2x2x2x2x2x2x2x2x2x2x2x2x2x2x2x2x2x2x2x2x2x2x2x2x2x2x2x2x2x2x2x2x2x2x2x2x2x2x2x2x2x2x2x2x2x2x2x2x2 = 79228162514264337593543950336  number of users or 11318308930609191084 globally unique addresses for each single user anywhere in the world.

These are all hypothetical calculations although very few exceptions with some specifically assigned addresses for multicast and other purposes are reserved but in general IPv6 addresses have no shortage at-least for several centuries so there is even no need to assign any private address for end users and anyone would be able to use his own globally unique IPv6 addresses even for their own sub-networks. IPv6 is not only easier to configure than IPv4 addresses but it also almost eliminated the concept of NAT inside/outside Network Address Translation as mostly the IPv6 addresses are unique all over the world. Broadcast concept is also completely eliminated and instead it uses multicast to advertise the packet to several or all users. I will discuss the IPv6 types of packets and how to assign the host portion of IPv6 addresses in the upcoming articles very soon.

Purpose:

This is the simple IPv6 address configuration using GNS3 and three routers. Where most of the interfaces were assigned by using simple IPv6 address command while two interfaces in the middle router(R2) used Extended Unique Identifier (EUI) based addressing  so the last 64bits were automatically assigned by the router itself  after associating the MAC address of that particular interface and a step further. We used GNS3 software to demonstrate the example. Detailed configuration is also given on the image so please click on the picture for enlarged image if needed. Thank you for visiting the website.Static IPv6 Configuration Using Simple and EUI based addresses

Tips:

EUI or Extended Unique Identifier follows three simple steps to assign the interface id (the last 64 bits of the IPv6 address) which defines the 2nd part or last 64 bits of the EUI based IPv6 address of that particular interface.

Step 1. Use F0/0’s MAC Address: xxxx.xxxx.xxxx

Step 2. Split into two halves and insert FFFE: xxxx:xxFF:FExx:xxxx

Step 3. Invert 7th bit: for Hex 00 = 00000000 binary, flip for 00000010, and convert back to

hex , resulting in xyxx:xxFF:FExx:xxxx

Useful commands

For R2

show running-config

Will show how the interfaces are configured.

show interface f0/0

Will show the Hardware or MAC address of f0/0 interface

show ipv6 int f0/0

Will show three multicast groups joined by the router

FF02::1 (Address for all IPv6 devices must listen)

FF02::2 (Represents all IPv6 routers provided if IPv6 unicast is enabled. must listen)

FF02::1:FFxx:xxxx (Multipurpose Multicast address helpful for functions such as Duplicate Address Detection and Neighbor discovery; DAD and ND, must be there)

show ipv6 route

will show a new (L) LOCAL Route with 128 bit subnet mask

The Local routes, all /128 routes, are essentially host routes for the router’s unicast

IPv6 addresses. These local routes allow the router to more efficiently process packets

directed to the router itself, rather than for packets directed toward connected subnets.

debug ipv6 nd

ping 2000:0:02::3

will show NS and ND messages (Neighbor Solicitation and Neighbor Discovery Messages)