Sunday, 30 July 2017

The IPv6 Address Types and Prefix Length

The IPv6 Address Types


There are three basic IPv6 address types:


Unicast - A unicast address is the most common form of an IP address and is assigned to one network interface We already learn IPv4 unicast addresses.  An IPv6 unicast address uniquely identifies an interface on an IPv6-enabled device. For communication over IPv6, source IPv6 address must be a unicast address.


IPv6 unicast have five different unicast IPv6 address types: global unicast addresses, link-local addresses, site-local addresses, unique local IPv6 unicast addresses, and special addresses. These addresses will be explained in detail in later articles.


Multicast– We also learned multicast addresses and the range of multicast addresses in IPv4 addresses. The multicast addresses identify multiple network interfaces/hosts. An IPv6 multicast address is used to send a single IPv6 packet to multiple destinations.


Anycast- An IPv6 anycast address is any IPv6 unicast address that can be assigned to multiple network devices. Like a multicast address,  anycast address identifies multiple interfaces; however, while multicast packets are accepted by multiple machines, anycast packets are delivered to the nearest device having that address.


Note - Broadcast addresses are no longer exist in IPv6. However, there is an IPv6 all-nodes multicast address that essentially gives the same result.


IPv6 Prefix Length


Remember the network portion or the prefix of an IPv4 address. The dotted-decimal subnet mask or slash notation is used to identify the network. For example, an IPv4 address of 172.16.16.100 with dotted-decimal subnet mask 255.255.0.0 is equivalent to 172.16.16.0/16.


IPv6 address uses the prefix length to represent the prefix portion. The IPv6 does not use the dotted-decimal subnet mask notation. The length of the prefix is used to specify the network portion of an IPv6 address using the IPv6 address/prefix length. The range of prefix is from 0 to 128. The typical prefix length for the most network is /64. This means the network portion or prefix of the address is 64 bit long and other 64 bit will be used for host portion. The figure illustrates the prefix of IPv6 address.


IPv6 address types and prefix

Saturday, 29 July 2017

IPv6 Address Representation

IPv6 addresses are 128 bits in length and represented as eight groups of four hexadecimal digits each, each group representing 16 bits. The address can be written in either lowercase or uppercase.


Preferred Format


As we know that IPv6 address is 128 bit and in 8 groups so the preferred format for writing an IPv6 address is x:x:x:x:x:x:x:x, where each “x” containing four hexadecimal values.


Each group of In IPv6 is consisting of 16 bit and the term used for a group is a hextet.  So each “x” is a single hextet, 16 bits or four hexadecimal digits.


    X   :   X    :   X     :    X   :      X   :    X  :    X   :   X


0000:0000:0000:0000:0000:0000:0000:0000


 To   : To  :  To  : To  :  To  :  To  : To  :  To


FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF


If we convert in hextet into binary it should be 16 bit, for example, we 0000 hextet is equal to 0000000000000000 and FFFF hextet is equal to 1111111111111111. Following is the basic relationship table of binary, decimal, and hexadecimal.



























































































Decimal



Binary



Hexadecimal



0



0000



0



1



0001



1



2



0010



2



3



0011



3



4



0100



4



5



0101



5



6



0110



6



7



0111



7



8



1000



8



9



1001



9



10



1010



A



11



1011



B



12



1100



C



13



1101



D



14



1110



E



15



1111



F



 


The IPv6 address is written using all 32 hexadecimal digits. It is the ideal method for representing the IPv6 address. But there are two rules which help to reduce the number of digits needed to represent an IPv6 address. Following is the preferred format for  


Figure 2 is a review of the relationship between decimal, binary and hexadecimal. Figure 3 has examples of IPv6 addresses in the preferred format for representing the IPv6 addresses.


2001 : 0000 : 0000 : 1111 : 1234 : 0000 : 0000 : 0100


2001 : 0DA1 : B111 : 0000 : 0000 : ABCD : 0000 : 1245


FE80 : 0000 : 0000 : 0000 : 1234 : 4567 : 89AB : CDEF 


FE80 : 0000 : 0000 : 0000 : 0000 : 0000 : 0000 : 0123


FF02 : 0000 : 0000 : 0000 : 0000 : 0000 : 0000 : 0001


FE02 : 0000 : 0000 : 0000 : 0000 : 0001 : FF00 : 0200


0000 : 0000 : 0000 : 0000 : 0000 : 0000 : 0000 : 0001


0000 : 0000 : 0000 : 0000 : 0000 : 0000 : 0000 : 0000


Rule 1 – Omit Leading 0s


Omit leading 0 is the first rule which helps to reduce the notation of IPv6 address.  Following are the examples to omit any leading 0s (zeros) in any 16-bit section or hextet:



  • 01BC can be represented as 1BC

  • 07FA can be represented as 7FA

  • 0F00 can be represented as F00

  • 00A0 can be represented as A0

  • 000A can be represented as A


This rule only applies to leading 0s, NOT to trailing 0s, otherwise, the address would be ambiguous.  The table below shows the examples of omitting leading 0s from IPv6 address.






































Preferred Format


No Leading 0s



2001 : 0000 : 0000 : 1111 : 1234 : 0000 : 0000 : 0100


2001 : 0 : 0 : 1111 : 1234 : 0 : 0 : 100



Preferred Format


No Leading 0s



2001 : 0DA1 : B111 : 0000 : 0000 : ABCD : 0000 : 1245


2001 : DA1 : B111 : 0 : 0 : ABCD : 0 : 1245



Preferred Format


No Leading 0s



FE80 : 0000 : 0000 : 0000 : 1234 : 4567 : 89AB : CDEF


FE80 : 0 : 0 : 0 : 1234 : 4567 : 89AB : CDEF



Preferred Format


No Leading 0s



FE80 : 0000 : 0000 : 0000 : 0000 : 0000 : 0000 : 0123


FE80 : 0 : 0 : 0 : 0 : 0 : 0 : 123



Preferred Format


No Leading 0s



FF02 : 0000 : 0000 : 0000 : 0000 : 0000 : 0000 : 0001


FF02 : 0 : 0 : 0 : 0 : 0 : 0 : 1



Preferred Format


No Leading 0s



FE02 : 0000 : 0000 : 0000 : 0000 : 0001 : FF00 : 0200


FE02 : 0 : 0 : 0 : 0 : 1 : FF00 : 200



Preferred Format


No Leading 0s



0000 : 0000 : 0000 : 0000 : 0000 : 0000 : 0000 : 0001


0 : 0 : 0 : 0 : 0 : 0 : 0 : 1



Preferred Format


No Leading 0s



0000 : 0000 : 0000 : 0000 : 0000 : 0000 : 0000 : 0000


0 : 0 : 0 : 0 : 0 : 0 : 0 : 0



Rule 2 – Omit All 0 Segments


The second rule to reduce the notation of IPv6 addresses is that a use of double colon (::)  that can replace any single, contiguous string of one or more 16-bit segments (hextets) consisting of all 0s.


The double colon (::) can only be used once within an address, otherwise there would be more than one possible resulting address. When used with the omitting leading 0s technique, the notation of IPv6 address can often be greatly reduced. This is commonly known as the compressed format.


 






































Preferred Format


No Leading 0s


Compressed



2001 : 0000 : 0000 : 1111 : 1234 : 0000 : 0000 : 0100


2001 : 0 : 0 : 1111 : 1234 : 0 : 0 : 100


2001 :  : 1111 : 1234 : 0 : 0 : 100



Preferred Format


No Leading 0s


Compressed



2001 : 0DA1 : B111 : 0000 : 0000 : ABCD : 0000 : 1245


2001 : DA1 : B111 : 0 : 0 : ABCD : 0 : 1245


2001 : DA1 : B111 :  : ABCD : 0 : 1245



Preferred Format


No Leading 0s


Compressed



FE80 : 0000 : 0000 : 0000 : 1234 : 4567 : 89AB : CDEF


FE80 : 0 : 0 : 0 : 1234 : 4567 : 89AB : CDEF


FE80 :  : 1234 : 4567 : 89AB : CDEF



Preferred Format


No Leading 0s


Compressed



FE80 : 0000 : 0000 : 0000 : 0000 : 0000 : 0000 : 0123


FE80 : 0 : 0 : 0 : 0 : 0 : 0 : 123


FE80 :  : 123



Preferred Format


No Leading 0s


Compressed



FF02 : 0000 : 0000 : 0000 : 0000 : 0000 : 0000 : 0001


FF02 : 0 : 0 : 0 : 0 : 0 : 0 : 1


FF02 : : 1



Preferred Format


No Leading 0s


Compressed



FE02 : 0000 : 0000 : 0000 : 0000 : 0001 : FF00 : 0200


FE02 : 0 : 0 : 0 : 0 : 1 : FF00 : 200


FE02 : : 1 : FF00 : 200



Preferred Format


No Leading 0s


Compressed



0000 : 0000 : 0000 : 0000 : 0000 : 0000 : 0000 : 0001


0 : 0 : 0 : 0 : 0 : 0 : 0 : 1


: : 1



Preferred Format


No Leading 0s


Compressed



0000 : 0000 : 0000 : 0000 : 0000 : 0000 : 0000 : 0000


0 : 0 : 0 : 0 : 0 : 0 : 0 : 0


: :



 


Incorrect address:



  • 2001 : : 1111 : 1234 :  : 100


Possible expansions of ambiguous compressed addresses:



  • 2001 :  : 1111 : 1234 : 0000: 0000 : 100

  • 2001 :  : 1111 : 1234 : 0000 : 0000 : 0000 : 100

  • 2001 :  0000: 1111 : 1234 : 0000 ; 0000:0000 : 0100

  • 2001 : 0000:0000 : 1111 : 1234 :  : 100

  • 2001 : 0000 : 0000 : 0000 : 1111 : 1234 :  : 100

  • 2001 :  0000 : 0000 ; 1111 : 1234 :  : 100


 

Tuesday, 25 July 2017

IPv4 and IPv6 Coexistence

With a growing Internet population, a limited IPv4 address space, issues with NAT and an Internet of Everything, the time has come to begin the transition to IPv6. But due to the size of the Internet, it is not possible to migrate IPv4 addresses to IPv6 addresses in a synchronized manner. Because some IPv4 addresses may never change.  Therefore, IPv6 and IPv4 will coexist on the internet. The transition is estimated to take years. The IETF has created several protocols and tools to help network administrators migrate their networks to IPv6. The migration techniques can be divided into three categories. One is dual stack, where your network hardware runs IPv4 and IPv6 at the same time. Next is when you "tunnel" one protocol within another. Generally, this means taking IPv6 packets and encapsulating them in IPv4 packets. The last one is Network Address Translation-Protocol Translation (NAT-PT) also known as RFC-2766. This works just like the name says, software or a device translates IPv6 packets into IPv4 packets. Following is the detail of these methods.


 Dual Stack 


With the dual stack solution, all networking device, router, switch server and firewall in a network will be configured with both IPv4 and IPv6 connectivity capabilities. All devices must understand both IPv4 and IPv6 packets and must be allow processing of IPv4 and IPv6 data traffic simultaneously. Dual stack allows IPv4 and IPv6 to coexist on the same network segment. Dual stack devices run both IPv4 and IPv6 protocol stacks simultaneously. Figure-1 illustrates the Dual-Stack process.


dual-stack


Tunneling


As shown in Figure 2. Tunneling is a method of transporting an IPv6 packet over an IPv4 network. The IPv6 packet is encapsulated inside an IPv4 packet, similar to other types of data. By using tunneling method, you can communicate with isolated IPv6 networks without upgrading the IPv4 infrastructure between them. Tunnels can be configured between border routers or between a border router and a host; however, both tunnel endpoints must support both the IPv4 and IPv6 protocol stacks. IPv6 supports the following types of tunneling mechanisms



  • Manual

  • Generic routing encapsulation (GRE)

  • IPv4-compatible

  • 6to4

  • Intrasite Automatic Tunnel Addressing Protocol (ISATAP)



Translation 


As shown in Figure 3.Network Address Translation 64 (NAT64) allows IPv6-enabled devices to communicate with IPv4-enabled devices using a translation technique similar to NAT for IPv4. An IPv6 packet is translated to an IPv4 packet and vice versa.


NAT64 allows IPv6-only clients to communicate IPv4 servers using unicast UDP, TCP, or ICMP.  One or more public IPv4 addresses assigned to a NAT64   translator are shared among several IPv6-only clients. 


Sunday, 23 July 2017

The Need of IPv6

It’s a well-known fact that the Internet is growing at an astronomical speed due to the flexibility of its design. The devices we want to communicate with has grown from a collection of static devices to mobile devices mostly connected on the internet.


The IP version currently used in the internet and networks is IP version 4 (IPv4). IP version 4 was developed in the early ’70s to facilitate communication and information sharing between government researchers and academics in the United States. At that time, the system was closed with a limited number of access points, and therefore the developers didn’t imagine requirements such as security or quality of service. To its credit, IPv4 has continued for over 30 years and has been an important part of the Internet uprising.


The requirements of today’s networking extend far beyond support for web pages and email. The growth in network device variety and mobile communications; new services, and social networks are overwhelming IPv4 and have driven the increase of a next-generation Internet Protocol.


The depletion of IPv4 address space has been the motivating factor for moving to the next-generation internet protocol. As Africa, Asia and other countries become more connected to the Internet, there are not enough IPv4 addresses to accommodate this growth.


To help alleviate the depletion of IPv4 so many methods were adopted; including subnetting, NAT and PAT; but these methods were not able to provide the ability to scale networks for future demands.


IPv4 has a maximum of 4.3 billion addresses. Private addresses in combination with Network Address Translation (NAT) have been instrumental in slowing the depletion of IPv4 address space. However, NAT breaks many applications and has limitations that severely impede peer-to-peer communications


Internet of Everything (IOE)


The internet of everything is the concept of Cisco. The internet of Everything (IoE) is a concept that extends the Internet of Things emphasis on machine-to-machine communications to describe a more complex system that also encompasses people and processes.IPv6 fulfills these ever progressively complex requirements of hierarchical and boundless supply of IP addressing and improved mobility.


The Internet of today is totally different than from the Internet of past years.Because, today’s internet is not only email; web pages, and file transfer between different computers. The developing Internet is becoming an Internet of everything. No longer will the only devices accessing the Internet be computers, tablets, and smartphones. IoE expands on the concept of the “Internet of Things” in that it connects not just physical devices but quite literally everything by getting them all on the network.


The sensor-equipped, Internet-ready devices of tomorrow will include everything from automobiles and biomedical devices, to household appliances and natural ecosystems.


With an increasing Internet population; a limited IPv4 address space, issues with NAT and an Internet of Everything, the time has come to begin the transition to IPv6.

Special User IPv4 Addresses

There are many addresses that are used for special purposes. Just like the network address and broadcast address that cannot be assigned to hosts. There are many special addresses that can be allotted to hosts, but with limitations on how those hosts can interact within the network.


Loopback addresses (127.0.0.0 /8 or 127.0.0.1 to 127.255.255.254)


This network is reserved for loopback. Typically all IP addresses in the range of 127.0.0.1 – 127.255.255.255 are reserved for private use, but 127.0.0.1 is the loopback address in almost all cases.The IP address 127.0.0.1 is usually reserved for use on personal computer loopback testing. The IP addresses in this range are used by a host to direct traffic to itself. For example, it can be used on a host to test if the TCP/IP configuration is operational.  Network software and utilities can use 127.0.0.1 to access a local computer’s TCP/IP network resources. Messages sent to loopback IP addresses like 127.0.0.1 do not reach outside to the local area network (LAN) but instead are automatically re-routed by the computer’s own network adapter back to the receiving end of the TCP/IP stack.


Link-Local addresses (169.254.0.0 /16 or 169.254.0.1 to 169.254.255.254)


These addresses are commonly known as the Automatic Private IP Addressing (APIPA) addresses. The Link-local addresses are used to communicate two hosts, which are there on the same link when no other IP address is specified. In other words, when the system is booting up, OS tries to configure an address on its interface through various methods like – DHCP and Manual Configuration. If OS isn't able to configure an address on the interface through any of the automatic methods, then it configures an address on the interface from the link-local pool which is:-


254.0.0/16 - Link local address pool in IPv4 address space


In IPv4, every interface uses to have only one address. Because of the limitation of having one address on an interface in IPv4;  you may not have seen an address of range 169.254.0.0/16 on the interface.


TEST-NET addresses


These addresses are set aside for teaching and learning purposes. The following ranges are reserved for this purpose In RFC-5737.


192.168.2.0/24


198.51.100.0/24 


203.0.113.0/24 

Saturday, 22 July 2017

Classless Addressing

As we learn that all IP addresses have a network and host portion. In classful addressing, the network portion ends on one of the splitting dots in the address. On the other words, Classful addressing divides an IP address into the Network portion and Host portions along octet boundaries. Classful address uses a fixed subnet mask which is /8, /16 and /24, However, classless addressing uses a variable number of bits for the network and host portions of the address. The subnet mask is not fixed for classless addressing system.


The classful addressing system allocated 50% of the available IPv4 addresses to Class A networks; 25% of the IPv4 addresses to Class B; 12.5% of IPv4 addresses to Class C and the remaining 12.5 % Shared both Class D and E. One of the great problem in this system is the waste of IP address which decreases the availability of IPv4 addresses. For example, an organization that had a network with 300 hosts would need to be given a class B network with more than 65,000 addresses wasting 64,700 addresses.


To overwhelm the problem of address reduction and give more organizations access to the internet; classless addressing was introduced by IETF in 1993. In this system, there are no classes, but the addresses are still granted in blocks. In classless addressing system, when an organization or individuals, need to be connected to the Internet; it is granted a block or range of addresses.  The block or range varies based on the size of the organization or the requirement of individuals. For example; an individual may be given only two addresses and an organization may be given thousands of addresses based on the number of its requirements.


The IETF know that CIDR is only a temporary solution and that a new IP protocol must be required to overcome the problem of address reduction. In 1994, the IETF began its work to find a successor to IPv4, which ultimately became IPv6.

Friday, 21 July 2017

Classful Addressing

In 1981, classful addressing, formally adopted as part of the Internet Protocol (IP) in RFC 790, was the Internet's first major addressing scheme. The IP address was 32 bits in size, just as today, but was managed considerably differently. There were three address classes to chose from A, B, or C, corresponding to 8-bit, 16-bit, or 24-bit prefixes. No other prefix lengths were allowed, and there was no concept of nesting a group of 24-bit prefixes, for example, within a 16-bit prefix.


There are two other classes were also defined; class D addresses and class E addresses, however, neither of these two address classes were normally used. Class D is used for Multicasting and is rarely used.  Class E is an experimental address that is reserved for future use. For humans, the easiest way to distinguish between different address classes is to use the first decimal number in the IP address. The figure below all aspects of IP classes.


classful


Classful networks use the classful subnet mask according to the leading bits in the first block of the IP address. Following is the detail of first three classes:-


Class A (0.0.0.0 to 127.255.255.255)


The default subnet mask for this class is 255.0.0.0 or /8. This class is used to support extremely large network with more than 16 million hosts. High order bit of Class A addresses must be zero, so a zero creating total 128 possible class A network.


Class B (128.0.0.0 – 191.255.255.255)


The default subnet mask for this class is 255.255.0.0 or /16. This class supports the large networks up to 65,000 host addresses. The high-order bits for this class is 10 in the first octet and the remaining bits of the first 2 octets create over 16,000 networks.


Class C (192.0.0.0  – 223.255.255.255)


The default subnet mask for this class is 255.255.255.0 or /24. This class is designed to support small networks with a maximum of 254 hosts. The first three bits of the octet indicate the high order bit. The remaining bits of the first octet; 2nd octet, and 3rd octets indicate the network and the 4th octet indicate host addresses in this class. The high-order bit is 110. Class C address has over 2 million possible networks.