IP ADDRESS

Internet Protocol (IP):

IP Address is a Logical address, which used for identify a single host in a network. It is also a temporary address that we can change according to our companies need. That is Systems that have interfaces to more than one network require a unique IP address for each network interface. The first part of an IP address identifies the network on which the host resides, while the second part identifies the particular host on the given network. There are two Version of IP address IPv4 and IPv6

Internet Protocol version 4 (IPv4)

  • IPv4 is a Binary Numbering system.
  • Its 32 bit addressing scheme, arranged as blocks of 4 octets.
  • Each octet contains 8 bits.
  • The octets are used to represents the network and Host area of the address.

Here’s a simple example of an IP address:10.1.1.1

IP has 2 Portions an additional value, called a subnet mask determines the boundary between the network and host components of an address.

  • Network Portion
  • Host Portion

Network Portion:      The area of IP which represents the network that computer belongs.

Host Portion:             The area of IP which represents the hosts in a network.

Subnet mask:

It is a term that represents the number of bits in Host and Network portion. In subnet mask 1’s represents Network portion and 0’s represents the Host portion.

 

Network id:

It is the ID which represents which network the computer belongs. We can calculate that value by putting the host area as lower value.

Example: for IP 192.168.10.1, it’s Network ID is 192.168.10.0

 

 

Broadcast id:                                                                                                                                                       

It is the ID which used for broadcasting any message to a particular network. We can calculated that value by considering the host are as higher value

Example: for IP 192.168.10.1, it’s Broadcast ID is 192.168.10.255

 

Valid IP:

The IP Addresses in between Network Id and Broadcast Id is known as Valid IP. That means the IP addresses which is used for representing a single host in the network. That is the valide IP range of the above network is 192.168.10.1 to 192.168.10.254

 

CLASSES OF IP

IP addresses are classified into 5 classes,

 

Ø  Class A

Ø  Class B                        Used for Routing

Ø  Class C

Ø  Class D – Used for multicast services

Ø  Class E – Used for research and development

 

We can identify each class by verifying the first octet of the IP.

 

Subnet mask of class A

            Class A consists of 8 bits in network portion and 24 bits in host portions.

11111111.00000000.00000000.00000000

255.0.0.0

Subnet mask of class B

            Class B consists of 16 bits in network portion and 16 bits in host portions.

11111111.11111111.00000000.00000000

255.255.0.0

Subnet mask of class C

            Class C consists of 24 bits in network portion and 8 bits in host portions.

11111111.11111111.11111111.00000000

255.255.255.0

 

 

RANGE OF IP

 

We can identify each class by verifying the first octet of the IP.

Class A

First bit of the first octet must be 0

0/0000000-0

0/1111111-127

Range of class A is 0 to 127

Class B

First two bits of the first octet must be 10

10/000000-128

10/111111-191

Range of class B is 128 to 191

Class C

First three bits of the first octet must be 110

110/00000-192

110/11111-223

Range of class C is 192 to 223

Class D

First four bits of the first octet must be 1110

1110/0000-224

1110/1111-239

Range of class D is 224 to 239

Class E

First four bits of the first octet must be 1111

1111/0000-240

1111/1111-255

Range of class E is 240 to 255.

 

 

Equation to find out the number of networks = 2N

            Here N is the number of bits in network portion except constant bits.

Equation to find out the number hosts in a particular network =2n-2

                Here n is the number of bits in host portion

Example,

            Class A

                        In case of class A address first bit of the first octet is constant hence the value of N is 7. So the available networks in class A is 27

                        In case of class A the number of bits in host is 24. So the available host is 224-2

IP address are of two types

 

1.      Private

These are IP address assigned for private networks for private use assigned by IANA

(Internet Assigned Numbering Authority).

For each class there is a range for private .

Class A == 10.0.0.0

                    10.255.255.255

  Class B == 172.16.0.0

                    172.31.255.255

Class C == 192.168.0.0

                   192.168.255.255

 

2.      Public

These are IP addresses needed for internet connection provided by ISP (Internet service provider) e.g.: Asianet, BSNL, Airtel.They have already purchased it from the IANA. When we use internet a public IP is provided by ISP. For this public IP we pay the money. When we disconnect the internet it can be assigned other persons who want to use the internet.

                                    Private IP –Mainly used for LANs

                                    Public IP—for internet

How a PC Identify the PCs in the same Network for Communication?

Ans: Binary Adding is used to Identify the PCs in the same Network for Communication.

Binary AND-ing is the process of performing multiplication to two binary numbers. The AND function give up only two possible outcomes, based on four different combinations. These answers, can be displayed as a truth table:

0 and 0 = 0                
1 and 0 = 0
0 and 1 = 0
1 and 1 = 1

You use AND-ing most often when comparing an IP address to its subnet mask. The end result of ANDing these two numbers together is to give up the network ID of that address.

Example Question

What is the network ID of the IP address 192.168.10.10 if it has a subnet mask of 255.255.255.0?

Answer
Step 1 Convert both the IP address and the subnet mask to binary:

192.168.10.10 = 11000000.10101000.00001010.00001010
255.255.255.0 = 11111111.11111111.11111111.00000000

Step 2 Perform the AND operation to each pair of bits—1 bit from the address ANDed to the corresponding bit in the subnet mask. Refer to the truth table for the possible outcomes:

 
192.168.10.10 = 11000000.10101000.00001010.00001010
255.255.255.0 = 11111111.11111111.11111111.00000000
             result = 11000000.10101000.00001010.00000000

Step 3 Convert the answer back into decimal:

11000000.10101000.00001010.00000000 = 192.168.10.0

The IP address 192.168.10.10 belongs to the 192.168.10.0 network when a mask of 255.255.255.0 is used.

SUB NETTING

Sub netting allows you to take one larger network and break it into a bunch of smaller sub networks to reduce the wastage of IP address. We can subnet a network by adding host bits to network portion. There are loads of reasons in favor of sub netting, including the following benefits.

  • Reduced network traffic
  • Optimized network performance
  • Simplified management

To create a subnet follows these steps

  1. Determine the number of required network IDs:
  2. Determine the number of required host IDs per subnet:
  3. Based on the above requirements, create the following:
  • One subnet mask for your entire network
  • A unique subnet ID and broadcast ID  for each physical segment
  • A range of host IDs for each subnet

Example

 If we needs 200 host address and two networks (i.e. 100 hosts per each network). Normally we need two IP address range for this. That is we choose two networks.

  • 192.168.10.1 – 254 System

254-100=154

Wastage IP= 154

  • 192.168.11.0 – 254 System

                                    254-100=154

                                    Wastage IP= 154

To overcome this problem, we can accommodate 200 hosts in two sub networks by dividing one network in to sub networks. The main advantage of sub netting is to reduce the IP wastage. We can reduce IP address wastage by adding bits from host portion to network portion, and by that way, we can create more sub networks by dividing a network. The main purpose of sub netting is to reduce IP wastage.

Equation to find out number of sub networks that can create after bit transfer is 2N

Here N is the number of bits transferred from host portion to network portion.

E.g.: 192.168.10.00000000

      192.168.10.0/25

Equation to find out the number hosts can be included after bit transfer.

2n-2

n=number of bits of bits remained in the host portion after the bit transfer.

By the method sub netting, we can create more sub networks from one IP address range.

One bit sub netting

192.168.10.0/24

It is a C class IP

The default subnet mask is 255.255.255.0

So fourth octet is host ID portion

We can transfer the host bit to network portion.

192.168.10.0/25

The required subnet mask is 255.255.255.10000000

                                                255.255.255.128

The number of sub networks that can create after bit transfer is 21 =2

First N/W

First, consider the transmitted bit as ‘0’

Minimum = 0/000000 = 0

Maximum = 0/1111111 = 127

N/w address    = 192.168.10.0

Broad cast ID = 192.168.10.127

Valid IP           = 192.168.10.1 à 192.168.10.126

Second N/W

First transmitted bit as ‘1’

Minimum = 1/0000000 = 128 

Maximum = 1/1111111 = 255

Network ID = 192. 168.10.128

Broad id     =192.168.10.255

Valid IP     = 192.168.10.129 à 192.168.10.254

Two bit sub netting

192.168.10.0/24

It is a C class IP

The default subnet mask is 255.255.255.0

So fourth octet is host ID portion

We can transfer two host bits to network portion.

192.168.10.0/26

The required subnet mask is 255.255.255.11000000

                                                255.255.255.192

The number of sub networks that can create after two bits transfer is 22 =4

Number of hosts that include per network is 26 -2=62

First N/W

Transmitted bit is ‘00’

Min = 192.168.10.00/000000 à 0

Max = 192.168.10.00/111111 à63

                                    Network ID = 192.168.10.0

                                    Broad cast address = 192.168.10.63

                                    Valid IP = 192.168.10.1 à192.168.10.62

                                    Subnet mask = 255.255.255.192

Second N/W

Transmitted bit is = 01

Min =192.168.10.01/000000 = 64

Max = 192.168.10.01/111111 =127

                        Network ID     = 192.168.10.64

                        Broad ID = 192.168.10.127

                        Valid IP   = 192.168.10.65 à192.168.10.126

                        Subnet mask = 255.255.255.192

Third N/W

Transmitted bit is ‘10’

Min = 192.168.10.10/000000 = 128

Max = 192.168.10.10/111111=191

                        Network ID     = 192.168.10.128

                        Broad ID = 192.168.10.191

Valid IP = 192.168.10.129 à192.168.10.190

                        Subnet mask = 255.255.255.192

Fourth N/W

Transmitted bit is ‘11’

Min = 192.168.10.11/000000 = 192

Max = 192.168.10.11/111111 = 255

                        Network ID= 192.168.10.192

                        Broadcast ID = 192.168.10.255

                        Valid IP = 192.168.10.193 à192.168.10.254                      

Subnet mask = 255.255.255.192

Internet Protocol version 6 (IPv6)

  • IPv6 is a 128 bit addressing scheme, arranged as 8 blocks.
  • Each block contains 16 bits.
  • Each blocks separated using colon (:).
  • Hexadecimal codes are used to represent the IPv6 address.

An IPv6 address is like this: xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx (x would be a hexadecimal value). 

Leave a Reply

Your email address will not be published. Required fields are marked *