21: IPv6

21.1 IPv6 basics

• Soon, IPs will be totally consumed. There will be no more available IPs. In order to solve this problem, IPv6 was developed.

• The ordinary IP scheme we were using in the previous hours is called the IPv4.

• The IPv6 scheme contains 8 blocks separated by a column. Every block contains 16 bit. This means that the IPv6 scheme contains 128 bit (8×16=128). It is larger than IPv4, which was only 32 bits long.

• Any IPv6 interface can be assigned any number of IPv6 addresses.

Image2718.JPG Figure 21.1: IPv6

21.1.1 IPv6 address shortening

• As you can see in figure (21.1), it is big! Therefore, two rules were developed in order to be able to write IPv6 in a simpler manner.

Rule1: remove any leading zeros from every block.

Rule2: replace the contiguous block of zeros with a double column. This is permitted to be done only one time in every IPv6 address. If you have more than one contiguous block of zeros, you can apply this rule only to one contiguous block of them.

Example:

Write the following IPv6 address in the simplest way.

2001:0000:0000:006b:0000:0000:0874:4c32

Solution:

Apply rule 1 2001:0:0:6b:0:0:874:4c32

Apply rule 2 2001::6b:0:0:874:4c32

So, the answer is 2001::6b:0:0:874:4c32

21.2 IPv6 addressing

The IPv6 interfaces can get its IPv6 address by using two methods, manually and automatically.

21.2.1 Manual addressing

The administrator manually configures an IPv6 address on the IPv6 interface.

21.2.2 Automatic addressing

There are two ways to get an automatic address, the ‘stateless addressing’, and the ‘stateful addressing’.

Stateless addressing

• In this method, the interface can deduce its IPv6 address from its MAC address, and the ‘network prefix’ it receives from the router that is connected in its network.

• The IPv6 address is formed from two parts, they are a 64 bits network prefix, and a 64 bits interface ID.

• The 64 bits interface ID can be called the ‘EUI-64 address’.

Image2726.JPG Figure 21.2: stateless addressing

• In stateless addressing, the 64 bits interface ID can be deduced by the interface itself from its MAC address as following,

Image2734.JPG

• The interface can get its network prefix from the router that connects to its network via a message from the router called the ‘router advertisement (RA)’.

• So now, the interface knows its network prefix and its interface ID.

• The interface IPv6 address is a 64 bits network prefix combined with a 64 bits interface ID.

Image2742.JPG Figure 21.3: stateless addressing

Stateful addressing

• If no router is found or the router advertisement (RA) message states that a DHCP should be used, the interface gets its IP using the stateful addressing.

• In this method, a DHCP server is installed in the network, so that every interface can get its IPv6 address from this DHCP using the DHCPv6 protocol.

21.3 IPv6 address configuration

To manually configures an IPv6 address on an interface we make the following,

First, we enable the IPv6 routing on the router using the following command,

Router(config)#ipv6 unicast-routing

Second, we configure an IPv6 address on the IPv6 interface using the following command,

Router(config-if)#ipv6 address ipv6 address/mask

Therefore, the actual configuration will be,

Router(config-if)#ipv6 address 2001:3:1b53:76ba:02c3:65ff:fe87:01b2/64

Or we can configure the network portion and let the interface deduce the interface ID part from its MAC address using the following command,

Router(config-if)#ipv6 address 2001:3:1b53:76ba::/64 eui-64

To let the interface get its IP address automatically, we do the following,

First, we enable the IPv6 routing on the router using the following command,

Router(config)#ipv6 unicast-routing

Second, we enable the IPv6 on every interface that sh-ould automatically take an IPv6 address. This is done using the following command,

Router(config-if)#ipv6 enable

21.4 IPv6 address types

The following are the types of the IPv6 address,

Link local address

• Every IPv6 interface assigns a ink local address to itself.

• Every IPv6 interface must have a link local address, even if the interface has been assigned another address. This is because the link local addresses are mandatory for the operation of IPv6 protocols.

• It is used only inside the network.

• The link local IPv6 addresses exist in the ‘FE80::/10’ range. This means that the link local IPv6 addresses must start with [1111 1110 10].

Unique local address

• It can be used only inside the network; it cannot be routed across the global internet, the same as the private addresses in IPv4.

• It is nearly unique. It means that there is a very small probability that you may find two IPv6 interfaces that have the same unique local address.

• Unique local address exist in the ‘FC00::/7’ range. This means that the unique local addresses must start with [1111 110].

Global unicast address

• The global unicast addresses that can be routed across the global internet.

• The global unicast addresses exist in the ‘2000::/3’ range. This means that it must start with [001].

21.4.1 IPv6 communication modes

There are three communication modes in IPv6, they are the unicast, the multicast and the anycast. There is no broadcast in IPv6.

Unicast: one to one communication.

Multicast: one to many communication.

Anycast: one to the nearest communication. This means that we can give the same IPv6 addresses to many devices, and the data that is sent from one sender will be delivered to only the nearest receiver found from those devices.

21.4.2 IPv6 special addresses

‘0:0:0:0:0:0:0:0’ (equals to ‘::’)

This is the source address of the interface when requiring an IPv6 address using the stateful addressing.

‘0:0:0:0:0:0:0:1’ (equals to ‘::1’)

It is the loop back address of the IPv6 interface.

‘FF00::/8 ‘

This is the range of the IPv6 multicast addresses.

‘3FFF:FFFF::/32’ and ‘2001:0DB8::/32’

This range is reserved for examples and documentation.

21.5 IPv6 Routing protocols

• In IPv6, there are new versions of the ordinary routing protocols that we were using in IPv4

• Three protocols may be used in IPv6. They are, RIPng, OSPFv3 and EIGRPv6.

21.5.1 RIPng

In this protocol,

• The network updates are sent to a multicast IPv6 address ‘FF02::9’.

• To configure RIPng on the router, we enable it on every interface that should participate in the RIPng routing. This is done using the following command,

Router(config-if)#ipv6 rip process number enable

• To verify the routing functionality, we may use on of the following commands,

Router#Show ipv6 rip

Router#debug ipv6 rip

21.5.2 OSPFv3

In this protocol,

• The network updates are sent to the ‘DR’ on ‘FF02::6’.

• The DR forward the network updates to its adjacencies on ‘FF02::5’.

• To configure OSPFv3 on the router, we enable it on every interface that should participate in OSPFv3 routing using the following command,

Router(config-if)#ipv6 ospf process number area area number

• To verify the routing functionality, we may use on of the following command,

Router#debug ipv6 ospf packet

21.5.3 EIGRPv6

In this protocol,

• The hello packets and the network updates are sent to a multicast IPv6 address ‘FF02::A’.

• To configure EIGRPv6 on the router, we first bring it up on the router using the following commands,

Router(config)#ipv6 router eigrp AS number

Router(config-rtr)#no shutdown

Then, we enable EIGRPv6 on every interface that should participate in the EIGRPv6 routing process using the following command,

Router(config-rtr)#ipv6 eigrp AS number

21.6 Migration from IPv4 to IPv6

There are many techniques that enable the network administrator to migrate their network from IPv4 to IPv6 without making any interruptions for the operation of the network.

21.6.1 Dual stack routing

• In this migration method, both IPv4 and IPv6 are running on the router simultaneously. Therefore, both IPv4 and IPv6 devices will be able to work on your network.

• The network administrator may gradually increase the number of IPv6 devices until he gets a pure IPv6 network.

21.6.2 Tunneling

• In this migration method, IPv6 packets are encapsulated into IPv4 packets, in order to make the IPv6 devices able work in an IPv4 network.

• There are many types of tunneling such as, the ‘6 to 4 tunneling’, the ‘Teredo tunneling’ and the ‘ISATAP tunneling’.

21.6.3 Proxying and translation

In this method, we use a device that can translate between IPv4 and IPv6 to work as the translator agent between the IPv4 devices and the IPv6 devices.

• The process of this device is the same as the NAT process in IPv4. However, the NAT process here is between the IPv4 and the IPv6.