Sistema de blogs Diarium
Universidad de Salamanca
Pablo Gallardo's Blog
My professional web log about IT, Cybersecurity & Project Management


IPv4 Address

An IPv4 address represent a single device in an IP network.

IPv4 addresses consist of 32 bits. Example: 11000110001100110110010000000000

These 32 bits are usually divided in 4 octets, and separated with a dot. Example: 11000110.00110011.01100100.00000000

In order to become more familiar for human, they are usually represented using decimal notation. Example:


Networks, hosts and subnet masks

The 32 binary bits are broken down into the network and host sections:

  • Network number / routing prefix: identify a network (for example, University of Salamanca).
  • Host identifier: identify a host inside a network (for example, Antonio’s laptop at University of Salamanca).

Subnet mask is used to identify which part of an IPv4 address belongs to a network. Subnet mask can be represented in different ways:

  • A decimal number representing the number of bits reserved for the network. This decimal number is written after a slash (/) at the end of IPv4 address. Example:
  • As 32-bit number, where 1 is written for each position that belongs to the network. Example: 11111111.11111111.11111111.11111000. Executing OR operator on original IPv4 address and submask, gives the first value for the network. The subnet mask is usually represented with decimal octets in the same way as an IPv4 address:

If the submask size is not specified, then it would use a default submask. The default submask differs depending on the IPv4 Address class where they belong to. See the IPv4 Address class for further information.

The first address in a subnet is the Network Address.
 It means, it does not represent a host but the network itself. It may be informed along with the subnet mask.

The last address in a subnet is the Broadcast Address. It means, it represents all of the hosts inside that network.

The addresses between network address and broadcast address are the host addresses.

You can calculate using some webs like this.


Ipv4 address:
Network address:
Broadcast address:
Host addresses: –


IPv4 Address Classes

Internet has networks with many different sizes. Some of them contains thousands of devices, and some other just a couple of them. IPv4 offers an addressing scheme with different address classes, that represent network with different sizes, and optimize the use of addresses.

Without IPv4 Address Classes, smaller networks would cope thousands of unused host IPs. This is why different IPv4 address classes are used.


The IPv4 Address Class can be identified just by inspecting the 8 first bits in the IPv4 address:

  • Class A Address: 1.x.x.x – 127.x.x.x
  • Class B Address: 128.x.x.x – 191.x.x.x
  • Class C Address: 192.x.x.x – 223.x.x.x
  • Class D Address: 224.x.x.x – 239.x.x.x
  • Class E Address: 240.x.x.x – 255.x.x.x

The Internet Assigned Numbers Authority (IANA) assigns some addresses ranges to public networks and some other to private.

Address ranges to be use by private networks are:

  • Class A: –
  • Class B: –
  • Class C: –

An IP address within private ranges is therefore considered non-routable, as it is not unique. Any private network that needs to use IP addresses internally can use any address within these ranges without any coordination with IANA or an Internet registry. Addresses within this private address space are only unique within a given private network.

All addresses outside private ranges are considered public.

Class A Address

Default subnet mask:

Private network address range: –

Class B Address

Default subnet mask:

Private network address range: –

Class C Address

Default subnet mask:

Private network address range: –

Class D Address

This class is reserverd for multicast.

Not equipped with any submask.

Class E Address

This class is reserved for experimental purposes only for R&D or Study by the Internet Engineering Task Force IETF.

Not equipped with any submask.


You might be also interested in…



About pmgallardo

I studied Computer Science at University of Salamanca. Since then, I have been working first as developer and then as SAP consutant. This blog is about problems I dealt when using computers, and more important, the solutions I found. Whenever I am on an issue and suddenlly I have a flash that leads me to a solution, I document my discoveries in a post.

, , , , , , , , , , , , , , ,

No comments yet.

Leave a Reply


Política de privacidad
Studii Salmantini. Campus de excelencia internacional