Friday 17 February 2017

IP Addressing and Private Address



IP Addressing

IP ADDRESSING SCHEMA
In a network every computer having a unique address called IP address which is use to communicate the computer with another computer in the network. Every computer must have IP address. So it very important to understand the concept of IP Addressing Scheme.


An IP address is a 4 octet i.e. 8*4 =32 bits address. Each octet is separated by the dot.
Format of IP address is

0-255.0-255.0-255.0-255

An IP address having two parts. Host ID and Network ID.

192.168.0.1

Here 192.168.0. Is the network ID and 1 is the Host ID

Network ID

This part specifies the unique number assigned to your particular network. It it also the part that identifies the class of network assigned.

Host ID

This is the part of the IP address that you assign to each host, and uniquely identifies each host on your network. Note that for each host on your network, the network part of the address will be the same, but the host part must be different.

IP address having classes

Ø    Class A address
Ø    Class B address
Ø    Class C address
Ø    Class D address
Ø    Class E address

Class A address scheme

In class A first 8 bits are network address while the remaining 24 bits are host address.
Range of class A is from 0.0.0.0. To 127.255.255.255.
Network address 0 is reserved to designate the default route for the packets and the network address 127 is reserve for the diagnostic to check out the local loop address.

This mean that there are 126 networks are available.
e.g. 86.18.2.4 is a IP of class A with network address 86 and host address is 18.2.4
86.0.0.0. is the network address.
86.255.255.255 is the broadcasting address of a network having network address is 86.

Class B Address Scheme
The first 16 bits are the network ID & remaining 16 bits are the host ID.
The range of the class B address scheme is 128.0.0.0.to 191.255.255.255

142.3.92.19 is an IP that belong to the class B address.
142.3 is the network IP and 92.19 is the Host ID
142.3.0.0. Is the network address
142.3.255.255 is the broadcasting address.

Class C Address Scheme
In the class C 24 bits are the network ID bits and 8 bits are the host ID bits.
The range of the class C address is 192.0.0.0. to 223.255.255.255
192.168.0.10 is the IP of class C. here 192.168.0 is the network ID and 10 is the Host ID
 192.168.0.0 is the network address
 192.168.0.255 is the broadcasting address.

Class D Address Scheme
The address of this class is used for multicasting. This class does not have any netid and hostid
The IP range for D class address is 224.0.0.0 to 239.255.255.255

Class e address scheme
The address of the E class is reserved for the internet society
The range for the E class is 240.0.0.0 to 255.255.255.255

Point to remember
For class A there is only one private network having netid 10.0.0.
For class B there are 16 private network allowed. Netid for these private networks are from
172.16 to 172.31
For class C there are 256 private network allowed. Netid ranges for these networks are
192.168.0. to 192.168.255

How to convert the decimal IP address to Binary Address?
How to convert 192.168.0.10 to binary number
128             64     32     16     8       4       2       1
Firstly we will convert 192 to binary value. Add the value to make 192 and mark them as 1
128+64=192
So for 192 binary value is 11000000
Other bits are mark as 0
Now 168 =128+32+16+2=10110001
For 0=00000000
For 10 = 8+2=00001010
Now 192.168.0.10 is 11000000.10110001.00000000.00001010

Why we not consider 127 in any range of IP address?
We don’t consider 127 in any IP range because it is reserved as the loop back address. To check the system whether it’s ready for networking or not we use it.
The 127.0.0.1 is known as loop back address. It also allows information technology professionals to test IP software without worrying about broken or corrupted drivers or hardware.

Once you are at a command prompt, enter the following:
Ping 127.0.0.1
If the command is successful, the Ping utility will return results similar to the following. The exact information returned will vary depending on your operating system:

This indicates that the network card and drivers are functioning properly. If the Ping utility is not able to get a return on the network card, this may indicate either a driver problem, or a physical problem with the card. 
  
Private addresses in each  class networks

v   in class A the private address are
o      10.0.0.0. to 10.255.255.255
v   In class B the private address are
o      172.16.0.0. to 172.31.0.0. (16 to 31 networks )
v   In class C the private address are
o      192.168.0.0 to 192.168.255.0 (256 networks)
MAC address
Ø    MAC address stand for the Media Access Control.
Ø    Its 48 bits address
Ø    It’s a hexadecimal address
Ø    Its known as the hardware or physical address
Ø    ARP (Address Resolution Protocol) is used to convert the IP address to MAC address.

POINT TO REMEMBER

Ø    When all the host ID portion bits of an IP address are 0, it is a network address.
Ø    When all the host ID portion bits of an IP address are 1, then it is a broadcast address.
o      10.255.255.255 ( 10.11111111.11111111.11111111)
Ø    When all the net ID portion bits of an IP address are 0, then it is a host address.
o      10.0.0.1  IP address
o      0.0.0.1    host address
Ø    When all the net ID bits are 1 it’s represent all the networks.
o      255.0.0.0
Ø    When all the net ID bits and host ID bits are 1, its represents global broadcast. Means all networks all hosts.
Ø    When all the net ID and host ID bits are 0 , then it is used for default routing
o      0.0.0.0.
Ø    127.0.0.1
o      It is loop back address used for self testing. If ping to this address is successful its means the TCP/IP protocol stack is ok. If there is no reply the TCP/IP suite is corrupt it means you have to reinstall the O.S. it does not depends upon the presence of the LAN cards. i.e. if there is no any LAN card present in the computer even then it will reply because it only check the software for the networking ( its means that TCP/ IP suite)
Ø    Valid hosts
o      Class A                255.0.0.0                      224-2
o      Class B                255.255.0.0                  216-2
o      Class C                255.255.255.0              28 -2

No comments: