Sunday, May 26, 2013

Introduction to Internet Protocol

Md. Bahadur Ali
Member (Finance), BTCL
IPv4 Address Space
IPv4 is based on a 32-bit address scheme that could in theory enable a total of 4 billion hosts (exactly 4,294,967,296) on the whole Internet. However, this 32-bit scheme was originally divided into five hierarchical classes managed by the Internet Assigned Numbers Authority (IANA). The first three classes (A, B and C) are available as globally unique unicast IP addresses. These classes were assigned to the requesters with a fixed length using different network values. A netmask is consecutive series of bits preset to 1 designed to “mask” the network part of an IP address.

Table 1 shows the five classes of IPv4 address, along with their associated ranges and network masks.

Table 1           Hierarchical Classes of IPv4 Address
A         to
B     to
C     to
D     to
E     to

Early adopters of the Internet were significant in the 1980s, almost all universities and large corporations received Class A or B addresses, even if they had a small number of computers. Today, these same organizations still have unused IPv4 addresses in their assigned blocks of IPv4 addresses, but they have not redistributed them to other organizations. Moreover, many organizations and companies that received an IPv4 address in the 1980s don’t exist as such anymore.

Larger Address Space
            IPv6 increases by a factor of 4 the number of address bits, from 32 to 128 bits. During the IPv6 design specification, there was a debate about using fixed-length 64-bit addresses versus variable-length addresses up to 160-bit.

Finally, using fixed-length addresses of 128-bits for IPv6 was found to be the most appropriate choice.

With IPv4, the number of addressable nodes is 4,294,967,296 (232), which represents about two IPv4 addresses for every three people. By comparison, the 128-bit length of IPv6 represents 3.4 * 1038 address, which allows approximately 4.8 * 1028 IPv6 addresses for every person in the world.

IP Header
            The IPv4 header describes the fields and compares them to the fields in the IPv6 header.

IPv4 Header Format
            IP packets are carried over link-layer technologies such as Ethernet (10 Mbps), Fast Ethernet (100 Mbps), Gigabit Ethernet (1000 Mbps), Frame Relay, and many others. Each link-layer technology family has its own link-layer frame that caries IP packets. An IP packet has two fundamental components:

Ø         IP header – The IP header contains many fields that are used by routers to forward the packet from network to network to a final destination. Fields within the IP header identify the sender, receiver, and transport protocol and define many other parameters.

Ø         Payload – Represents the information (data) to be delivered to the receiver by the sender.

Figure 1          Fields in the IPv4 Header

32 bit
Ver (4
Hd Len (4)
Type of Service (8)
Total Length (16)
identification (16)
Flags (3)

Fragment Offset (13)
Time to Live (8)
Protocol Number (8)
Header Checksum (16)
Source IPv4 Address (32 Bit)
Destination IPv4 Address (32 Bit)

+ (When Necessary)

Following are the IPv4 header fields:
Ø         Version (4-bit) – The version of the IP (Internet Protocol) header. The current IP version used on the Internet is 4 (IPv4). This field contains the value 4.

Ø         Header Length (4-bit) – The length in octets of the header size up to the Payload field. The basic IPv4 header is only 20 bytes long.

Ø         Type of Service (TOS) (8-bit) – Specifies the treatment of the datagram during its transmission through the routers. This field can also be interpreted as Differentiated Services Code Point (DSCP).

Ø         Total Length (16-bit) – The size of the IP packet in octets, including the header and the payload. This field is 16-bit, which means that the maximum size of an IPv4 packet is 65,535 octets.

Ø         Identification (16-bit), Flags (3-bit) and Fragment Offset (13-bit) – Fields related to packet fragmentation by routers when the Maximum Transmission Unit (MTU) along a path is smaller than the sender’s MTU. The MTU is the maximum size in octets of an IP packet that can be transmitted on a specific communication medium, such as Ethernet, Fast Ethernet, and so on. For Ethernet, the MTU is 1500 octets.

Ø         Time to Live (8-bit) – This field is decremented each time the packet passes through an intermediary router. When this field contains the value 0, the packet is destroyed, and an Internet Control Message Protocol for IPv4 (ICMPv4) Type 11 error message (Time Exceeded) is sent to the source node.

Ø         Protocol Number (8-bit) – Specifies the upper-layer protocol used in a packet’s payload, such as Transport Control Protocol (TCP), User Datagram Protocol (UDP), Internet Control Message Protocol (ICMP), or any others. Protocols supported are defined by the Internet Assigned Numbers Authority (IANA).

Ø         Header Checksum (16-bit) – Represents the checksum of the IP header and is used for error checking. This field is verified and recomputed by each intermediary router along a path.

Ø         Source IPv4 Address (32-bit) – The sender’s IPv4 address.

Ø         Destination IPv4 Address (32-bit) – The receiver’s IPv4 address.

Ø         Options (variable) – This optional field might appear in an IPv4 packet. The Options field is variable in size and increases the length of the header when used.

Ø         Padding (variable) – Padding is used to ensure that the packet ends on a 32-bit boundary. It also increases the header’s size.

Ø         Payload (variable) – The payload is not a field of the basic IPv4 header. Rather, it represents the data to be delivered to a destination address. The payload includes an upper-layer header.

Basic IPv6 Header Format
The basic IPv6 header contains eight fields, in comparison with 12 fields in IPv4 (without the Options and Padding fields), for a total length of 40 octets. Moreover, the basic IPv6 header might have one too many extension headers daisy-chained following the 40 octets.

The IPv6 protocol represents an upgrade of the IPv4 protocol. The fields in the basic IPv6 heade
r are:

       Version (4-bit) The IP version. This field contains the value 6 rather than the value 4 contained in an IPv4 packet.

Ø         Traffic Class (8-bit) – This field and its functions are similar to the Type of Service field in IPv4. This field tags an IPv6 packet with a Differentiated Services Code Point (DSCP)  that specifies how the packet should be handled.

Ø         Flow Label (20-bit) – This field is used to tag a flow for IPv6 packets. This is new in the IPv6 protocol. The current IETF standard does not specify the details about how to manage and process the Flow Label.

Ø         Payload Length (16-bit) – This field represents the payload’s length. The payload is the remaining part of the packet following the IPv6 header.

Ø         Next Header (8-bit) – This field defines the type of information following the basic IPv6 header. The type of information can be an upper-layer protocol.

Ø         Hop Limit (8-bit) – This field defines the maximum number of hops (intermediate routers) that the IP packet can pass through. Each hop decreases this value by 1.

Ø         Source Address (128-bit) – This field identifies the IPv6 source address of the sender.

Ø         Destination Address (128-bit) – This field identifies the packet’s IPv6 destination address.

Figure 2          Fields Within the Basic IPv6 Header:

32 bit
Version (4)
Traffic Class (8)
Flow Label (
Payload Length (16)
Next Header (8)
Hop Limit (8)

Source IPv6 Address (128-Bit)

Destination IPv6 Address (128 Bit)

Variable Length
Next Header
Extension Header Information


                        Table 2 compares IPv4 and IPv6 headers.
Table 2           Comparison of IPv4 and IPv6 Headers.

Fields of the IPv4 Header
Fields of the IPv6 Header
Comparison of IPv4 and IPv6 Headers
Version (4-bit)
Version (4-bit)
Same function but the IPv6 header contains a new value.
Header Length (4-bit)
Removed in IPv6. The basic IPv6 header always has 40
Type of service (8-bit)
Traffic class (8-bit)
Same function for both headers.
Flow label (20-bit)
New field added to tag a flow for IPv6 packets.
Total length (16-bit)
Payload length (16-bit)
Same function for both headers.
Identification (16-bit)
Removed in IPv6 because fragmentation is handled differently in IPv6.
Flags (3-bit)
Removed in IPv6 because fragmentation is handled differently in IPv6.
Fragment offset (13-bit)
Removed in IPv6 because fragmentation is handled differently in IPv6.
Time to live (8-bit)
Hop limit (8-bit)
Same function for both headers.
Protocol number (8-bit)
Next header (8-bit)
Same function for both headers.
Header checksum (16
Removed in IPv6. Link-layer technologies and upper-layer protocols handle checksum and error control.
Source address (32-bit)
Source address (128-bit)
Source address is expanded in IPv6.
Destination address (32-bit)
Destination address (128-bit)
Destination address is expanded in IPv6.
ptions (variable)
Removed in IPv6. The way to handle this option in different in IPv4.
Padding (variable)
Removed in IPv6. The way to handle this option in different in IPv4.
Extension headers
New way in IPv6 to handle Options fields, fragmentation, security, mobility, Loose Source Rouging, Record Route, and so on. The following section presents IPv6’s extension headers.

Some Important Information About IPv6 Addressing

Ø         IPv6 addresses are 128-bit hexadecimal numbers.

Ø         Link local unicast addresses are easy to identify

Ø         Leading zeros are suppressed

  Inline zeros can sometimes be suppressed.

Ø         Loopback addresses don’t even look like addresses.

Ø         A traditional subnet mask not neede

       Domain Name System (DNS) is still a valid technology.

Ø         IPv6 can tunnel its way across IPv4 networks.

Ø         You might already be using IPv6.

Ø         Windows doesn’t fully support IPv6.

-           Internet
-           Cisco Self Stud
ed by: Regis Desmeules

No comments:

Post a Comment