What Is IPv4
What Is IPv4
Addressing in IPv4,
Network Address,
Broadcast Address
in each Class.
Hexadecimal Notation:
Some points to be noted about dotted decimal notation:
The value of any segment (byte) is between 0 and 255 (both included).
There are no zeroes preceding the value in any segment (054 is wrong, 54 is correct).
Classful Addressing:-The 32 bit IP address is divided into five sub-classes. These are:
Class A
Class B
Class C
Class D
Class E
Each of these classes has a valid range of IP addresses. Classes D and E are reserved for
multicast and experimental purposes respectively.
The order of bits in the first octet determine the classes of IP address.
IPv4 address is divided into two parts:
Network ID
Host ID
The class of IP address is used to determine the bits used for network ID and host ID and the
number of total networks and hosts possible in that particular class.
Each ISP or network administrator assigns IP address to each device that is connected to its
network.
Note: IP addresses are globally managed by Internet Assigned Numbers
Authority(IANA) and regional Internet registries(RIR).
Note: While finding the total number of host IP addresses, 2 IP addresses are not
counted and are therefore, decreased from the total count because the first IP
address of any network is the network number and whereas the last IP address is
reserved for broadcast IP.
Class A:
IP address belonging to class A are assigned to the networks that contain a
large number of hosts.
The network ID is 8 bits long.
The host ID is 24 bits long.
The higher order bit of the first octet in class A is always set to 0. The
remaining 7 bits in first octet are used to determine network ID. The 24 bits
of host ID are used to determine the host in any network. The default subnet
mask for class A is 255.x.x.x. Therefore, class A has a total of:
2^7-2= 126 network ID(Here 2 address is subracted because 0.0.0.0 and
127.x.y.z are special address. )
2^24 – 2 = 16,777,214 host ID
IP addresses belonging to class A ranges from 1.x.x.x – 126.x.x.x
Class B:
IP address belonging to class B are assigned to the networks that ranges
from medium-sized to large-sized networks.
The network ID is 16 bits long.
The host ID is 16 bits long.
The higher order bits of the first octet of IP addresses of class B are always
set to 10. The remaining 14 bits are used to determine network ID. The 16
bits of host ID is used to determine the host in any network. The default sub-
net mask for class B is 255.255.x.x. Class B has a total of:
2^14 = 16384 network address
2^16 – 2 = 65534 host address
IP addresses belonging to class B ranges from 128.0.x.x – 191.255.x.x.
Class C:
IP address belonging to class C are assigned to small-sized networks.
The network ID is 24 bits long.
The host ID is 8 bits long.
The higher order bits of the first octet of IP addresses of class C are always
set to 110. The remaining 21 bits are used to determine network ID. The 8
bits of host ID is used to determine the host in any network. The default sub-
net mask for class C is 255.255.255.x. Class C has a total of:
2^21 = 2097152 network address
2^8 – 2 = 254 host address
IP addresses belonging to class C ranges from 192.0.0.x – 223.255.255.x.
Class D:
IP address belonging to class D are reserved for multi-casting. The higher
order bits of the first octet of IP addresses belonging to class D are always
set to 1110. The remaining bits are for the address that interested hosts
recognize.
Class D does not posses any sub-net mask. IP addresses belonging to class
D ranges from 224.0.0.0 – 239.255.255.255.
Class E:
The problem with this classful addressing method is that millions of class A
address are wasted, many of the class B address are wasted, whereas,
number of addresses available in class C is so small that it cannot cater the
needs of organizations. Class D addresses are used for multicast routing
and are therefore available as a single block only. Class E addresses are
reserved.
Broadcast Addresses
An address that enables transmission to every node in a local network.
The address is the highest numeric value of the address format being
used.
An Ethernet broadcast address is all binary 1’s.
An IP broadcast address is the highest number in its class; for example,
the broadcast address of a Class C 192.168.16.0 network is
192.168.16.255.
Subnet Broadcast Addresses
The broadcast address for a subnet must account for the part of the
address that is reserved for the subnet.
Using the above Class C example configured for six subnets would
have a broadcast address of 192.168.16.31.
It is derived as follows.
For more on the Class C example,
see subnet mask. See broadcast and multicast.
Class C Mask for Six Subnets
11111111.11111111.11111111.11100000
Step 1
0 0 0 31
00000000.00000000.00000000.00011111
Step 2
192.168.16.1.
192 168 16 1
11000000.10101000.00010000.00000001
00000000.00000000.00000000.00011111
-----------------------------------
11000000.10101000.00010000.00011111
192 168 16 31