IP ADDRESS

The identifier that is used in the IP layer of the TCP/IP protocol is called the internet address or IP address.

An IP address is a 32-bit address that uniquely defines a host or a router on the internet.
The IP address are unique in the sense that two devices can never have tha same address.
However, a device can have more than one address.
Each IP address is made of two parts

NET ID     :The net id defines a network.HOST ID   :The host id identifies a host on that network.

Determining the Class of an Address

If the first number is between 0 and 127 (inclusive), the class is A.
If the first number is between 128 and 191 (inclusive), the class is B.
If the first number is between 192 and 223 (inclusive), the class is C.
If the first number is between 224 and 239 (inclusive), the class is D.
If the first number is between 240 and 255 (inclusive), the class is E.

CLASS A


The first octet (8 bits) defines the net id, the leftmost bit zero to define the class as A.
The remaining 7 bits define deferent network. (27=128 networks), There are actually 126 networks in class A because two of the addresses are reserved for special purposes.
In a class A network, 24 bits are used to define the host id.
(224=16,777,216 hosts) – (host id all 0s and host id all 1s) = 16,777,214 hosts

CLASS B

Two octets define the net id and two octets define the host id.
The two leftmost bits are 10 to define the class as B.
The next 14 bits define different network. (214=16,384 networks)
In a class B network, 16 bits are used to define the host id.
(216=65,536 hosts) – (host id all 0s and host id all 1s) = 65,534 hosts

CLASS C

Three octets define the net id and one octets define the host id.
The three leftmost bit are 110 to define the class as C.
The next 21 bits define different network. (221=2,097,152 networks)
In a class C network, 8 bits are used to define the host id.
(28=256 hosts) – (host id all 0s and host id all 1s) = 254 hosts.

CLASS D

The class D address is defined for multicasting.
There is no netid or hostid./ The whole address is used for multicasting.
The first 4 bits define different multicast addresses.
The remaining 28 bits define different multicast addresses.

CLASS E

Class E is rederved by the internet for special use. There is no netid or hostid.
The first bits defined the class(1111).

0 comments:

Post a Comment