Internet Protocol:- Communication between hosts can happen only if they can clarify each other on the network. In a single collision domain (where every packet sent on the part by one great number is heard by every other great number) hosts can communicate directly via MAC address.MAC address is a factory coded 48-bits hardware address which can also uniquely clarify a great number. But if a great number wants to communicate with a far away great number, i.e. not in the same part or logically not connected, then some method of addressing is required to clarify the far away great number uniquely. A logical address is given to all hosts connected to the Internet and this logical address is called Internet Protocol Address.
The network inner is responsible for carrying data from one great number to another. It provides method to allocate logical addresses to hosts, and clarify them uniquely using the same. Network inner takes data units from Transport inner and cuts them in to smaller unit called Data Packet.
Network inner defines the data path, the packets should follow to reach the destination. Routers work on this inner and provides mechanism to route data to its destination. A majority of the internet uses a protocol suite called the Internet Protocol Suite also known as the TCP/IP protocol suite. This suite is a combination of protocols which encompasses a number of different protocols for different purpose and need. Because the two major protocols in this suites are TCP (Transmission Control Protocol) and IP (Internet Protocol), this is commonly termed as TCP/IP Protocol suite. This protocol suite has its own reference form which it follows over the internet. In contrast with the OSI form, this form of protocols contains less layers.
Internet Protocol Version 4 (IPv4)
Internet Protocol is one of the major protocols in the TCP/IP protocols suite. This protocol works at the network inner of the OSI form and at the Internet inner of the TCP/IP form. consequently this protocol has the responsibility of identifying hosts based upon their logical addresses and to route data among them over the inner network.
IP provides a mechanism to uniquely clarify hosts by an IP scheme. IP uses best effort delivery, i.e. it does not guarantee that packets would be delivered to the destined great number, but it will do its best to reach the destination. Internet Protocol version 4 uses 32-bit logical address.
Internet Protocol being a inner-3 protocol (OSI) takes data Segments from inner-4 (Transport) and divides it into packets. IP packet encapsulates data unit received from above inner and add to its own header information.
The encapsulated data is referred to as IP Payload. IP header contains all the necessary information to deliver the packet at the other end.
IP header includes many applicable information including Version Number, which, in this context, is 4. Other details are as follows:
• Version: Version no. of Internet Protocol used (e.g. IPv4).
• IHL: Internet Header Length; Length of complete IP header.
• DSCP: Differentiated sets Code Point; this is kind of Service.
• ECN: Explicit Congestion Notification; It carries information about the congestion seen in the route.
• Total Length: Length of complete IP Packet (including IP header and IP Payload).
• Identification: If IP packet is fragmented during the transmission, all the particles contain same identification number. to clarify original IP packet they belong to.
• Flags: As required by the network resources, if IP Packet is too large to manager, these ‘flags’ tells if they can be fragmented or not. In this 3-bit flag, the MSB is always set to ‘0’.
• break up Offset: This offset tells the exact position of the break up in the original IP Packet.
• Time to Live: To avoid looping in the network, every packet is sent with some TTL value set, which tells the network how many routers (hops) this packet can cross. At each hop, its value is decremented by one and when the value reaches zero, the packet is discarded.
• Protocol: Tells the Network inner at the destination great number, to which Protocol this packet belongs to, i.e. the next level Protocol. For example protocol number of ICMP is 1, TCP is 6 and UDP is 17.
• Header Checksum: This field is used to keep checksum value of complete header which is then used to check if the packet is received error-free.
• Source Address: 32-bit address of the Sender (or source) of the packet.
• Destination Address: 32-bit address of the Receiver (or destination) of the packet.
• Options: This is optional field, which is used if the value of IHL is greater than 5. These options may contain values for options such as Security, Record Route, Time Stamp, etc.
Internet Protocol hierarchy contains several classes of IP to be used efficiently in various situations as per the requirement of hosts per network. Broadly, the IPv4 system is divided into five classes of IP Addresses. All the five classes are identified by the first octet of IP.
Internet Corporation for stated Names and Numbers is responsible for assigning IP.
The first octet referred here is the left most of all. The octets numbered as follows depicting dotted decimal notation of IP:
The number of networks and the number of hosts per class can be derived by this formula:
When calculating hosts’ IP, 2 IP are decreased because they cannot be stated to hosts, i.e. the first IP of a network is network number and the last IP is reserved for Broadcast IP.
Class A Address
The first bit of the first octet is always set to 0 (zero). consequently the first octet ranges from 1 – 127, i.e.
Class A addresses only include IP starting from 1.x.x.x to 126.x.x.x only. The IP range 127.x.x.x is reserved for loopback IP addresses.
The default subnet disguise for Class A IP address is 255.0.0.0 which implies that Class A addressing can have 126 networks (27-2) and 16777214 hosts (224-2).
Class A IP address format is consequently: 0NNNNNNN.HHHHHHHH.HHHHHHHH.HHHHHHHH
Class B Address
An IP address which belongs to class B has the first two bits in the first octet set to 10, i.e.
Class B IP range from 128.0.x.x to 191.255.x.x. The default subnet disguise for Class B is 255.255.x.x.
Class B has 16384 (214) Network addresses and 65534 (216-2) great number addresses.
Class B IP format is: 10NNNNNN.NNNNNNNN.HHHHHHHH.HHHHHHHH
Class C Address
The first octet of Class C IP address has its first 3 bits set to 110, that is:
Class C IP range from 192.0.0.x to 223.255.255.x. The default subnet disguise for Class C is 255.255.255.x.
Class C gives 2097152 (221) Network addresses and 254 (28-2) great number addresses.
Class C IP address format is: 110NNNNN.NNNNNNNN.NNNNNNNN.HHHHHHHH
Class D Address
Very first four bits of the first octet in Class D IP addresses are set to 1110, giving a range of:
Class D has IP rage from 22.214.171.124 to 126.96.36.199. Class D is reserved for Multicasting. In multicasting data is not destined for a particular great number, that is why there is no need to extract great number address from the IP address, and Class D does not have any subnet disguise.
Class E Address
This IP Class is reserved for experimental purposes only for R&D or Study. IP addresses in this class ranges from 240.0.0.0 to 255.255.255.254. Like Class D, this class too is not equipped with any subnet disguise.
Each IP class is equipped with its own default subnet disguise which bounds that IP class to have prefixed number of Networks and prefixed number of Hosts per network. Classful IP does not provide any flexibility of having less number of Hosts per Network or more Networks per IP Class.
CIDR or Classless Inter Domain Routing provides the flexibility of borrowing bits of great number part of the IP and using them as Network in Network, called Subnet. By using subnetting, one single Class A IP address can be used to have smaller sub-networks which provides better network management capabilities.
Class A Subnets
In Class A, only the first octet is used as Network identifier and rest of three octets are used to be stated to Hosts (i.e. 16777214 Hosts per Network). To make more subnet in Class A, bits from great number part are borrowed and the subnet disguise is changed consequently.
For example, if one MSB (Most meaningful Bit) is borrowed from great number bits of second octet and additional to Network address, it creates two Subnets (21=2) with (223-2) 8388606 Hosts per Subnet.
The Subnet disguise is changed consequently to mirror subnetting. Given below is a list of all possible combination of Class A subnets:
In case of subnetting too, the very first and last IP of every subnet is used for Subnet Number and Subnet Broadcast IP respectively. Because these two IP addresses cannot be stated to hosts, sub-netting cannot be implemented by using more than 30 bits as Network Bits, which provides less than two hosts per subnet.
Class B Subnets
By default, using Classful Networking, 14 bits are used as Network bits providing (214) 16384 Networks and (216-2) 65534 Hosts. Class B IP Addresses can be subnetted the same way as Class A addresses, by borrowing bits from great number bits. Below is given all possible combination of Class B subnetting:
Class C Subnets
Class C IP addresses are typically stated to a very small size network because it can only have 254 hosts in a network. Given below is a list of all possible combination of subnetted Class B IP address:
Internet Service Providers may confront a situation where they need to allocate IP subnets of different sizes as per the requirement of customer. One customer may ask Class C subnet of 3 IP addresses and another may ask for 10 IPs. For an ISP, it is not possible to divide the IP addresses into fixed size subnets, rather he may want to subnet the subnets in such a way which results in minimum wastage of IP addresses.
For example, an administrator have 192.168.1.0/24 network. The suffix /24 (distinct as “slash 24”) tells the number of bits used for network address. In this example, the administrator has three different departments with different number of hosts. Sales department has 100 computers, buy department has 50 computers, Accounts has 25 computers and Management has 5 computers. In CIDR, the subnets are of fixed size. Using the same methodology the administrator cannot fulfill all the requirements of the network.
The following procedure shows how VLSM can be used in order to allocate department-wise IP addresses as mentioned in the example.
Step – 1
Make a list of Subnets possible.
Step – 2
Sort the requirements of IPs in descending order (Highest to Lowest).
• Sales 100
• buy 50
• Accounts 25
• Management 5
Step – 3
Allocate the highest range of IPs to the highest requirement, so let’s assign 192.168.1.0 /25 (255.255.255.128) to the Sales department. This IP subnet with Network number 192.168.1.0 has 126 valid great number IP which satisfy the requirement of the Sales department. The subnet disguise used for this subnet has 10000000 as the last octet.
Step – 4
Allocate the next highest range, so let’s assign 192.168.1.128 /26 (255.255.255.192) to the buy department. This IP subnet with Network number 192.168.1.128 has 62 valid great number IP Addresses which can be easily stated to all the PCs of the buy department. The subnet disguise used has 11000000 in the last octet.
Step – 5
Allocate the next highest range, i.e. Accounts. The requirement of 25 IPs can be fulfilled with 192.168.1.192 /27 (255.255.255.224) IP subnet, which contains 30 valid great number IPs. The network number of Accounts department will be 192.168.1.192. The last octet of subnet disguise is 11100000.
Step – 6
Allocate the next highest range to Management. The Management department contains only 5 computers. The subnet 192.168.1.224 /29 with the disguise 255.255.255.248 has exactly 6 valid great number IP. So this can be stated to Management. The last octet of the subnet disguise will contain 11111000.
By using VLSM, the administrator can subnet the IP subnet in such a way that least number of IP are wasted. already after assigning IPs to every department, the administrator, in this example, is nevertheless left with plenty of IP which was not possible if he has used CIDR.
There are a few reserved IPv4 address spaces which cannot be used on the internet. These addresses serve special purpose and cannot be routed outside the Local Area Network.
Every class of IP, (A, B & C) has some addresses reserved as Private IP addresses. These IPs can be used within a network, campus, company and are private to it. These addresses cannot be routed on the Internet, so packets containing these private addresses are dropped by the Routers.
In order to communicate with the outside world, these IP addresses must have to be translated to some public IP using NAT course of action, or Web Proxy server can be used.
The only purpose to create a separate range of private addresses is to control assignment of already-limited IPv4 address pool. By using a private address range within LAN, the requirement of IPv4 addresses has globally decreased considerably. It has also helped delaying the IPv4 address exhaustion.
IP class, while using private address range, can be chosen as per the size and requirement of the organization. Larger organizations may choose class A private IP address range where smaller organizations may opt for class C. These IP addresses can be further sub-netted and stated to departments within an organization.
The IP range 127.0.0.0 – 127.255.255.255 is reserved for loopback, i.e. a great number’s self-address, also known as localhost address. This loopback IP is managed thoroughly by and within the operating system. Loopback addresses, permit the Server and Client processes on a single system to communicate with each other. When a course of action creates a packet with destination address as loopback address, the operating system loops it back to itself without having any interference of NIC.
Data sent on loopback is forwarded by the operating system to a virtual network interface within operating system. This address is mostly used for testing purposes like client-server architecture on a single machine. Other than that, if a great number machine can successfully ping 127.0.0.1 or any IP from loopback range, implies that the TCP/IP software stack on the machine is successfully loaded and working.
In case a great number is not able to acquire an IP from the DHCP server and it has not been stated any IP manually, the great number can assign itself an IP address from a range of reserved Link-local addresses. Link local address ranges from 169.254.0.0 — 169.254.255.255.
Assume a network part where all systems are configured to acquire IP from a DHCP server connected to the same network part. If the DHCP server is not obtainable, no great number on the part will be able to communicate to any other. Windows (98 or later), and Mac OS (8.0 or later) supports this functionality of self-configuration of Link-local IP. In absence of DHCP server, every great number machine randomly chooses an IP from the above mentioned range and then checks to ascertain by method of ARP, if some other great number also has not configured itself with the same IP. Once all hosts are using link local addresses of same range, they can communicate with each other.
These IP addresses cannot help system to communicate when they do not belong to the same physical or logical part. These IPs are also not routable.