What is IPv4 and its addressing? Subnet mask ? supernetting ? classless addressing? IP address format? - Cyber security & Technology


Follow by Email

Thursday, July 12, 2018

What is IPv4 and its addressing? Subnet mask ? supernetting ? classless addressing? IP address format?


·        In order to provide computer to computer communication via Internet, we need a global addressing scheme. Such an addressing is provided by Internet Protocol (IP) at the network layer.

·        Each host and router on the Internet is assigned a unique 32-bit logical address. This is called an IP address.

·        This IP address is unique and no two devices on the Internet can have the same address at the same time. .

·        Each 32-bit IP address is divided into two main parts: the network number and the host number. The network number identifies a network. The host is number identifies a host on that network.

·        A network number is assigned by the Internet Network Information Center (Inter NIC) if the network is to be a part of the Internet. A host number is assigned by the local network administrator.

·        Since an IP address is 32-bit, the address space is 232 or 4,294,967,296 (more than 4 billion). An address space represents the total number of addresses supported. Therefore, we can say that if there were no restrictions, than 4 billion devices could be connected to the Internet.

IP address format

·        The 32-bit IP address is grouped eight bits at a time, separated by dots and represented in decimal format. This is known as dotted decimal notation as shown in fig. 

·        Each bit in the octet has a binary weight (128, 64, 32, 16, 2, 1).

·        The minimum value for an octet is 0, and the maximum value for an octet is 255.

Classful addressing or IP address Classes

·        IP addressing supports five different address classes: A, B, C, D and E. Only classes A, B and C are available for commercial use.

·        We can find the class of an address when given the address in binary notation or dotted decimal notation.

·        If the address is given in binary notation, the first few bits can tell us the class of the address.

·        If the address is given in dotted decimal notation, the first byte defines the class.

Class A addresses

1. Class A addresses are designed for large organizations with a large number of hosts or routers.

2. In this the first octet of the address identifies the network and the next three octets are used to identify the host.

3. The first bit of first octet is always 0 and the remaining 7 bits are used to identify the network address as shown in fig. 

4. The next three octets ie. 24 bits are used to identify the host.

5. The class support addresses from to

6. The first block of network address starts with and the last block of network address starts with

7. As there are 7 bits in network address, 2 128 blocks of network address are possible. Out of these two network blocks are reserved. Hence total 126 address blocks are used.

8. Each network blocks can have 24 - 2 hosts ie. 16,777,214 host address. Two addresses are less as one address is reserved for the broadcast address and one address is reserved for the network.

 9. A block in class A is too large for almost any organization. This means most of the addresses in class A are wasted and are not used.

Class B address

1. The class B addresses are designed for medium sized organizations with tens of thousands of attached hosts or routers.

2. In this, the first two octets of the address identify the network and the next two octets identify the host within the network.

3. The first two bits (high order bits) of first octet are always 1.0. Thus the remaining 14 bits identify the network (see fig.)

4. The third and fourth octet ie 16 bits are used to identify the host.

5. The first network block of this class covers the addresses from 128.0.00 to (net id 128.0). The last network block of this class covers addresses from (net id 191.255)

6. The maximum number of network blocks in class B is 2 16384.

7. Each network block in class B can have 216-2 65,534 hosts.

8. A block in class B is also very large and most of the address in class B is also wasted.

Class C address

1. The class C addresses are designed for small organizations with a small number of attached hosts or routers.

2. In class C, the first three octets of address are used for network and the last octet is used to identify the host as shown fiğ.

3. The first three bits of first octet are always set to 1, 1, 0.

4. The remaining 24-3-21 bits are used for network identification and only 8 bits are used for host.

5. In class C, 22 2,097,152 network blocks are possible.

6. Thus, each block in class C address can have 28-2 254 hosts.

7. The first of network covers addresses from to The last block of network covers the addresses form to

8. The class C addresses are too less for many organizations as it supports only 254 hosts in a network.

Class D address

1. Class addresses are used for multicast groups (multicasting)

2. The concept of division of octets into network id and host id does not apply to class D.

3. The first four bits of first octet in class D are always set to 1,1,1,0

4. The address range is to239.255.255.255

Class E address

1. The Class E address are reserved for future use and are experimental.

2. The concept of network id and host id does not apply on class E also.

3. The first four bits of first octet are always set to 1,1,1,1.

4. The address range for class E is to


From the 32 bit IP address we can create dotted decimal notation by converting ead byte to a decimal number between 0 and 255. We can also identity the class of an l address by observing the first few bits of 1st byte of each IP address. The various examples are given in the table below.

We can also find the network address i.e. net id and host id for the IP address (dotted decimal notation) with help of class as shown below.


·        IP networks can be divided into smaller networks called subnetworks( or subnets)

·        Each of these subnets has its own specific address.

·        The subnet address is created by dividing the host address into network  address  and host address (See fig.).

·        The network address specifies the type of subnetwork in the network and the host address specifies the host of that subnet.

·        Subnets are under local administration. As such, the outside world sees an organization as a single network and has no detailed knowledge of the organization's internal structure.

·        Subnetting provides the network administrator with several benefits, including extra flexibility, more efficient use of network address and the capability to contain broadcast traffic.

·        A given network address be broken up into may subnetworks. For example,,, and are all subnets within network

·        A subnet address is created by borrowing bits from the host field and designating them as subnet field. The number of bits borrowed varies and is specified by the subnet mask.

·        Fig.  shows how bits are borrowed from the host address field to create the subnet address field.

Subnet Mask

·        Subnet mask uses the same format and representation technique as IP addresses.

·        Subnet mask has binary is in all bits specifying the network and subnetwork fields, and binary Os in all bits specifying the host field.

·        As discussed earlier, a subnet address is created by borrowing the bits from host field.

·        Figure  shows a sample subnet mask . 

·        Subnet mask bits should come from the high-order (left most) bits of the host field as shown in fig.

·        Various types of subnet mask exist for class B and C subnets

·        The default subnet mask for a class B address that has no subnetting is, while the subnet mask for a class B address that specifies eight bits of subnetting is The reason for this is that eight bits of subnetting or 28 2 (1 for the network address and 1 for the broadcast address) 254 subnets possible, with 2-2 254 hosts per subnet. .

·        The subnet mask for a class C address that specifies five bits of subnetting is with five bits available for subnetting, 2 -2- 30 subnets possible, with 23-2 6 hosts per subnet.

How subnet masks are used to determine the network number .

·        The router performs a set process to determine the network (or more specifically, the subnetwork) address.

·        First, the router extracts the IP destination address from the incoming packet and retrieves the internal subnet mask.

·        It then performs a logical AND operation obtain the network number. In logical AND operation, I "ANDed" with 1 yields 1 and 1 "ANDed" with 0 yields 0

·        This causes the host portion of the IP destination address to be removed, while the destination network number remains.

·        The router then looks up the destination network number and matches it with an outgoing interface.

·        Finally, it forwards the frame to the destination IP address.

·        Figure shows that when a logical AND of the destination IP address and the subnet mask is performed, the sub-network number remains, which the router uses to forward the packet.



·        Supernetting is an addressing scheme in which several class C blocks can be combined to create a larger range of addresses.

·        In other words, several networks are combined to create a supernetwork or a supernet.

·        For example, an organization that needs 1,000 addresses can be granted four contiguous class C blocks. The organisation can then use these addresses create one supernetwork .

·        Supernetting decreases the number of Is in the mask. For example, if organization is given four class C addresses, the mask changes from 124 /22. 9.5


·        The fast growth of Internet led to the near depletion of the available addresses.

·        We have run out of class A and B addresses, and a class C block is too small for most midsize organizations .

·        To overcome the problem of address depletion and give more organizations access to internet, classless addressing was designed and implemented.

·        In this scheme, there are no classes, but the addresses are still granted in blocks.

·        In classless addressing, when an entity, small or large, needs to be connected to Internet, it is granted a block or range of addresses.

·        The size of the block (the number of addresses) varies based on the nature and f the entity. For example, a household may be given only two addresses; a large organization may be given thousands of addresses. An ISP, may be given thousands or hundreds of thousands based on the number of customer it . may serve.

·        To simplify the handling of addresses, the Internet authorities impose three . restructions on classless address blocks

1. The addresses in a block must be contiguous, one after the other.

2. The number of addresses in a block must be a power of 2 (1,2,4,8.)

3. The first address must be evenly divisible by the number of address.

·        For example, figure shows a block of addresses (both in binary and dotted decimal notation) granted to a small business that needs 16 addresses.

·        As shown in figure certain restrictions are applied to this block. The addresses are contiguous. The number of addresses is a power of 2 (16-2), and the first address is divisible by 16. The first address, when converted to

·        decimal number, is 3,440,387.360, which when divided by 16 results in 215,024,210.

No comments:

Post a Comment