Download as pdf or txt
Download as pdf or txt
You are on page 1of 3

IP address and IP4 addressing

An IP address represents a unique address that distinguishes any device on the internet or any network from another.
IP or Internet Protocol defines the set of commands directing the setup of data transferred through the internet or any
other local network.
An IP address is the identifier that enables your device to send or receive data packets across the internet. It holds information
related to your location and therefore making devices available for two-way communication. The internet requires a process to
distinguish between different networks, routers, and websites. Therefore, IP addresses provide the mechanism of doing so

An IP address is represented by a series of numbers segregated by periods(.). They are expressed in the form of four pairs - an
example address might be 255.255.255.255 wherein each set can range from 0 to 255.
IP addresses are not produced randomly. They are generated mathematically
Types of IP addresses
There are various classifications of IP addresses
1. Private IP addresses
All the devices that are linked with your internet network are allocated a private IP address. It holds computers, desktops,
laptops, smartphones, tablets, or even Wi-Fi-enabled gadgets such as speakers, printers, or smart Televisions. With the expansion
of IoT (internet of things), the demand for private IP addresses at individual homes is also seemingly growing.

2. Public IP addresses A public IP address or primary address represents the whole network of devices associated with it.
Every device included within with your primary address contains their own private IP address. ISP is
responsible to provide your public IP address to your router.
Public IP addresses are further classified into two categories- dynamic and static.

IPv4 - Address Classes


Internet Protocol hierarchy contains several classes of IP Addresses to be used efficiently in various situations as per the
requirement of hosts per network. Broadly, the IPv4 Addressing system is divided into five classes of IP Addresses. All the
five classes are identified by the first octet of IP Address.
Internet Corporation for Assigned Names and Numbers is responsible for assigning IP addresses.
The first octet referred here is the left most of all. The octets numbered as follows depicting dotted decimal
notation of IP Address −

The number of networks and the number of hosts per class can be derived by this formula −

Class A Address
The first bit of the first octet is always set to 0 (zero). Thus the first octet ranges from 1 – 127, i.e.

The IP range 127.x.x.x is reserved for loopback IP addresses.

The default subnet mask for Class A IP address is 255.0.0.0 which implies that Class A addressing can have 126
networks Class A IP address format is thus: 0NNNNNNN.HHHHHHHH.HHHHHHHH.HHHHHHHH
Class B Address
An IP address which belongs to class B has the first two bits in the first octet set to 10, i.e.

Class B Addresses
Class B IP Addresses range from 128.0.x.x to 191.255.x.x. The default subnet mask for Class B is 255.255.x.x.
Class B IP address format is: 10NNNNNN.NNNNNNNN.HHHHHHHH.HHHHHHHH
Class C Address
The first octet of Class C IP address has its first 3 bits set to 110, that is −
Class C IP addresses range from 192.0.0.x to 223.255.255.x. The
default subnet mask for Class C is 255.255.255.x.
Class C IP address format is:
110NNNNN.NNNNNNNN.NNNNNNNN.HHHHHHHH
Class D Address
Class E Address
Very first four bits of the first octet in Class D IP addresses are
This IP Class is reserved for experimental
set to 1110, giving a range of −
purposes only for R&D or Study. IP
addresses in this class ranges from
Class D Addresses
240.0.0.0 to 255.255.255.254. Like Class D,
Class D has IP address range from 224.0.0.0 to
this class too is not equipped with any
239.255.255.255. Class D is reserved for Multicasting. In
subnet mask.
multicasting data is not destined for a particular host, that is
why there is no need to extract host address from the IP
address, and Class D does not have any subnet mask.

Classful Address
The first addressing system to be implemented as part of the Internet Protocol was Classful Addressing. In the year 1981, the
Classful addressing network architecture was first used on the Internet. The Classful addressing system was superseded by a
Classless addressing scheme with the introduction of Classless Inter-Domain Routing (CIDR) in 1993.
•The IP address comprises up of 32 bits and is split into four sections separated by dots: part 1, part 2, part 3, and part 4.
•The IP address is made up of four parts, each of which is eight bits long (1 byte).
•Further, the 4 parts of the IP address is divided into parts: a network ID and a Host ID.
Types of Classful Address
Class A, Class B, Class C, Class D, and Class E are the five varieties of Classful addresses. In IPv4, this classification is known
as Classful addressing or IP address classes.
•The first three classes, Class A, B, and C, are used for "public addressing", in which communication is always one-to-one
between source and destination. It implies that when data is transmitted from a source, it will only be sent to a single network
host.
•The reserved categories include Class D and Class E, with Class D being utilized for multicast and Class E being saved for future
usage exclusively.
•In IPv4, the Network ID is the first part of Class A, B, and C, while the Host ID is the remaining second portion.
•The Host ID always indicates the number of hosts or nodes in a certain network, whereas the Network ID always identifies the
network in a specific place.
•In Class A, B, and C, the address space is split into a certain number of IP address blocks. It also specifies the maximum number
of hosts in a network.
Network and Host part in Classful Addressing
The first octet or byte of an IP address is part of the network ID (short for Net-ID), while the next three octets or three bytes are
part of the host ID in Class A. (in short, host-ID).
Network and Host part in Classful Addressing
The first octet or byte of an IP address is part of the network ID (short for Net-ID), while the next three octets or three bytes are
part of the host ID in Class A. (in short, host-ID).

The network ID takes up the first two octets or two bytes in Class B, whereas the host ID takes up the remaining two octets or
two bytes.

In Class C, the first three octets or bytes are dedicated to the network ID, while the last octet or byte is dedicated to the host ID.
Classless Addressing
Classless Inter-Domain Routing (CIDR) is another name for classless addressing. This addressing type aids in the more efficient
allocation of IP addresses. This technique assigns a block of IP addresses based on specified conditions when the user demands a
specific amount of IP addresses. This block is known as a "CIDR block", and it contains the necessary number of IP addresses.

When allocating a block, classless addressing is concerned with the following three rules.

Rule 1 − The CIDR block's IP addresses must all be contiguous.

Rule 2 − The block size must be a power of two to be attractive. Furthermore, the block's size is equal to the number of IP
addresses in the block.

Rule 3 − The block's first IP address must be divisible by the block size.

For example, assume the classless address is 192.168.1.35/27.

The network component has a bit count of 27, whereas the host portion has a bit count of 5. (32-27)

The binary representation of the address is: (00100011 . 11000000 . 10101000 . 00000001).

(11000000.10101000.00000001.00100000) is the first IP address (assigns 0 to all host bits), that is, 192.168.1.32

(11000000.10101000.00000001.00111111) is the most recent IP address (assigns 1 to all host bits), that is, 192.168.1.63

The IP address range is 192.168.1.32 to 192.168.1.63.

Difference Between Classful and Classless Addressing


Classful addressing is a technique of allocating IP addresses that divides them into five categories. Classless addressing is a
technique of allocating IP addresses that is intended to replace classful addressing in order to reduce IP address depletion.

The utility of classful and classless addressing is another distinction. Addressing without a class is more practical and helpful than
addressing with a class.

The network ID and host ID change based on the classes in classful addressing. In classless addressing, however, there is no
distinction between network ID and host ID. As a result, another distinction between classful and classless addressing may be
made.

You might also like