So far
we’ve learnt that IPv4 is classified into five classful networks namely:
Class-A (0.0.0.0 to 127.255.255.255)
Class-B (128.0.0.0 to 191.255.255.255)
Class-C (192.0.0.0 to 223.255.255.255)
Class-D (224.0.0.0 to 239.255.255.255)
Class-E (240.0.0.0 to 255.255.255.255)
What is meant by
Network Component and Host component of an IP address?
The network component is used for identifying a network,
similar to Street Number.
The Host component is used to identify a specific host (or
network device) in a network, similar to House number.
Network and Host
portion of each of the classes:
Class-A:
In
this the first 8 bits are defined for network portion and the rest of the 24 bits
for host portion.
For example, in the Class-A IP address: 10.0.1.100
The first octet value: 10 represent the network component
and the remaining address: 0.1.100 is the host component.
How many networks are
there in Class- A? And how many hosts can be there in a single Class-A network?
To understand we need to do some calculations:
- The leading/parity bit in
Class-A is ‘0’ (Only one bit).
- The size of the network
component in Class A is 8 bits.
Now the number of network bits = 2n-2p.
Where n- size of the network
component
It means that a single Class-A network consists of
16,777,214 host assignable IP addresses. (The ‘-2’ is for network and broadcast
addresses, which we will discuss shortly)
Class-B:
In
this the first 16 bits are defined for network portion and the rest of the 16
bits for host portion.
For example, in the Class-B IP address: 150.25.10.5
The first two octet values: 150.25 represent the network
component and the remaining address: 10.5 is the host component.
How many networks are
there in Class- B? And how many hosts can be there in a single Class-B network?
To understand we need to do some calculations:
- The leading/parity bit in
Class-B is ‘10’ (Two bits).
- The size of the network
component in Class B is 16 bits.
Now the number of network bits = 2n-2p.
Where n- size of the network
component
p-
Number of parity bits
It means that a single Class-B network consists of 65534
host assignable IP addresses. (The ‘-2’ is for network and broadcast addresses,
which we will discuss shortly)
Class-C:
In
this the first 24 bits are defined for network portion and the rest of the 8
bits for host portion.
For example, in the Class-C IP address: 192.168.10.5
The first three octet values:
192.168.10 represent the network component and the remaining address: .5 is the
host component.
How many networks are
there in Class- C? And how many hosts can be there in a single Class-C network?
To understand we need to do some calculations:
- The leading/parity bit in
Class-C is ‘110’ (Three bits).
- The size of the network
component in Class C is 24 bits.
Now the number of network bits = 2n-2p.
Where n- size of the network
component
p-
Number of parity bits
It means that a single Class-C
network consists of 254 host assignable IP addresses. (The ‘-2’ is for network
and broadcast addresses, which we will discuss shortly).
Class-D:
The
Class-D address range: 224.0.0.0 to 239.255.255.255 is used for multicasting.
Multicasting is nothing but sending a single message to group of selected
machines.
For
example, the routing protocol: OSPF uses 224.0.0.5 to send hello packets to all
OSPF routers on a network segment.
Class-E:
This
range of IP addresses: 240.0.0.0 to 255.255.255.255 are left for future
experimental purposes nothing but research and development.
Types of IP addresses:
Network Address/Network ID:
The
IP address with all zeros in the host portion is called a network address. It
is used to identify the network/subnet of a host.
For example,
Broadcast Address:
The
IP address with all ones in the host portion is called as a broadcast address.
This address is used to send a single piece of information to all the devices
on a single network.
For example,
Reserved Addresses:
There
are few address ranges reserved for some special purposes.
For
example, the Class-A IP address range: 127.0.0.0 to 127.255.255.255 is reserved
for loopback addressing which are primarily used for testing whether the NIC
card has correctly loaded the Internet Protocol.
Another
example, the Class-B address range: 169.254.0.0 to 169.254.255.255 is reserved
for auto configuration of IP address. It means whenever a device is not
assigned an IP address or if it is unable to get an IP address from the DHCP (Dynamic
Host Configuration Protocol) server then the NIC card will automatically assign
one of the IP address from the given address range.
Private IP Addresses:
Computers
not connected to the Internet such as factory machines that communicate only
within the LAN segment doesn’t need to have a globally unique IP address.
So
three ranges of IP addresses are defined for private networks:
1 (One) Class-A network: 10.0.0.0
to 10.255.255.255
16 Class-B networks: 172.16.0.0
to 172.31.255.255
256 Class-C networks: 192.168.0.0
to 192.168.255.255
Public IP Addresses:
The IP
addresses from the Class-A,B and C other than private IP addresses and reserved
IP addresses are considered as public IP addresses.
Public IP
addresses are used by Internet servers such as webservers, DNS servers and
routers.
From the above output we can understand that the web-server
of google.com is hosted on the server with IP address: 74.125.236.211. If we
type this IP address in the address bar of browser than it will take us to
google.com page.
In the next post we will overview the Classful IPv4
addressing and the problems with Classful addressing method and solutions.