Friday, June 3, 2011

IPV6 Addressing and Sub-netting

                                                              IPv6 Addressing and Sub-netting

An IPv6 address is 16 octets (128 bits).
It is difficult to foresee running out of IPv6 addresses.
Address consists of Hexadecimal values of eight 16 bit fields.

•  X:X:X:X:X:X:X:X (X=16 bit number, ex: A2FE)
•  16 bit number is converted to a 4 digit hexadecimal number.

Null value can be replaced by using ::

•  4EED:0023:0000:0000:0000:036E:1250:2B00
• →4EED:23:0:0:0:36E:1250:2B00
• →4EED:23::36E:1250:2B00
IETF recomendation of how to do the allocation.



Time For IPv6 subnetting....

When you do IPv6 sub-netting, you need to think in binary values not in hexadecimal values.

•  2001:1::/32
2001:0001::/32
Hex 2001 = Binary 0010 0000 0000 0001
Hex 0001 = Binary 0000 0000 0000 0001

•  2001:2:3::/48
2001:0002:0003::/48
Hex 2001 = Binary 0010 0000 0000 0001
Hex 0002 = Binary 0000 0000 0000 0010
Hex 0003 = Binary 0000 0000 0000 0011
Lets subnet /48 in to /64's

/64s in 2001:2:3::/48 are

– 2001:0002:0003:0001::/64
– 2001:0002:0003:0002::/64
– 2001:0002:0003:0003::/64
– Etc.

– 16 bits of address space

•  You can have 65536 /64s in one /48 IPv6 address.
•  Note:: indicates the remaining 64 bits are all zeros and can then be used to identify hosts::

How about /47s in 2001:1::/32? Please feel free to do the calculation and send me the results..

Wednesday, June 1, 2011

IPV6 Fragmentation and MTU size

                                                                   How IPV6 handles Fragmentation

Routers handle fragmentation in IPv4 which cause variety of processing performance issues.

IPv6 routers no longer perform fragmentation. IPv6 host use a discovery process [Path MTU Discovery] to determine most optimum MTU size before creating end to end session.

In this discovery process, the source IPv6 device attempts to send a packet at the size specified by the upper IP layers [i.e TCP/Application].

If the device receives an “ICMP packet too big” message, it  informs the upper layer to discard the packet and to use the new MTU.

The “ICMP packet too big” message contains the proper MTU size for the pathway.

Each source device needs to track the MTU size for each session.

                                                                         How MTU works in IPV6


MTU is the largest size datagram that a given link layer technology can support [i.e HDLC]
Minimum MTU for IPv4 is 68 Octet and for IPv6 1280 Octet.
Most efficient MTU for IPv4 is 576 and 1500 for IPv6.

How to determine the maximum size of IPv6 datagram...

The maximum size of IPv6 datagram will be determined by two factor:


Maximum Transmission Unit (MTU) of intermediate nodes [L2 link technology can support i.e HDLC].

Payload length of IPv6 header which is 16 bit so normal payload can not be larger then 64k octets.

Jumbogram can increase IPv6 datagram size larger then 64k octets. But they need special processing on each hop since they are oversize.

One of two uses of hop-by-hop option header is Jumbogram.


                                        

IPV4 vs IPV6 header

                                                                          IPV4 Header

 

The IPv4 datagram is conceptually divided into two pieces: the header and the payload. The header contains addressing and control fields, while the payload carries the actual data to be sent over the internetwork. The header consists of 10 basic header fields.

                                                          IPV6 Header



IPv6 contain 6 basic header fields.
IPv6 header has 40 octets in contrast to the 20 octets in IPv4  So a smaller number of header fields and the header is 64-bit.

Aligned to enable fast processing by current processors.


The IPv6 header fields:

•  Version:
A 4-bit field, same as in IPv4. It contains the number 6 instead of the number 4 for IPv4.

•  Traffic class:
A 8-bit field similar to the type of service (ToS) field in IPv4. It tags packet with a traffic class that it uses in differentiated services (DiffServ). These functionalities are the same for IPv6 and IPv4.

•  Flow label:
A completely new 20-bit field. It tags a flow for the IP packets. It can be used for multilayer switching techniques and faster packet-switching performance.

•  Payload length:

This 16-bit field is similar to the IPv4 Total Length Field, except that with IPv6 the Payload Length
field is the length of the data carried after the header, whereas with IPv4 the Total Length Field
included the header. 216 = 65536 Octets.

•  Next header:
The 8-bit value of this field determines the type of information that follows the basic IPv6 header. It
can be a transport-layer packet, such as TCP or UDP, or it can be an extension header. The next
header field is similar to the protocol field of IPv4.

•  Hop limit:

This 8-bit field defines by a number which count the maximum hops that a packet can remain in the
network before it is destroyed. With the IPv4 TLV field this was expressed in seconds and was
typically a theoretical value and not very easy to estimate.

 Do you know about IPV6 Extension Header ???

Adding an optional Extension Header in IPv6 makes it simple to add new features in IP protocol in future without a major reengineering of IP routers everywhere.
The number of extension headers are not fixed, so the total length of the extension header chain is variable.

The extension header will be placed in-between main header and payload in IPv6 packet.

Adding an optional Extension Header in IPv6 makes it simple to add new features in IP protocol in future without a major reengineering of IP routers everywhere.

If the Next Header field value (code) is 6 it determine that there is no extension header and the next header field is pointing to TCP header which is the payload of this IPv6 packet.

Code values of Next Header field:

  0 Hop-by-hope option
  2 ICMP
  6 TCP
  17 UDP
  43 Source routing
  44 Fragmentation
  50 Encrypted security payload
  51 Authentication
  59 Null (No next header)
  60 Destination option

Wellcome to IPv6

                                                       How IPv6 was Born

During 1988-1989 Internet has started to grow in an extremely high speed.
The ability to scale Internet for this high demands requires a limitless supply of IP addresses.

First step was taken by IETF in 1991.
In 1991 IETF decided that the current version of IPv4 had outlived its design and need
to develop a new protocol for Internet.
In 1994 IETF gave a clear direction of IPv6.

In December 1995 the first version of IPv6 address specification came to the scean.
More information is on RFC 1883.

Do you know how many addresses are available ???

IPv6 uses a 128-bit address, meaning that we have a maximum of 2¹²⁸ addresses available, or 340,282,366,920,938,463,463,374,607,431,768,211,456, or enough to give multiple IP addresses to every grain of sand on the planet.

What to do with this huge address space !!!
Almost all electronic devices can have an IPv6 address .. PDA, Mobile Phones,
Tablet PC, Car, TV, Washing Machines and even Wiper blades on a car can have..

Do we need to use NAT any more ???
 
With the amount of available IPv6 asddresses all the hosts can use public routeble IP's. So no need for NAT.

Do the end host needs to be configured for IPv6 address ???

With the Stateless autoconfiguration the end host that wishes to obtain an IPv6 address creates an interface identifier, then obtains a network prefix that is prepended to the interface identifier. Using the link-local address of the router, the host has instant IPv6 connectivity. Most of the communication in stateless autoconfiguration uses the ICMPv6 protocol.