IP and Subnet Masks: A Journey Through the Foundations of Connectivity

The text explores the importance of IP addresses and network masks in the Internet infrastructure, detailing the concept of IP addresses, types (IPv4 and IPv6), network masks, CIDR notation, and calculations for determining available IPs in subnets.

The infrastructure that supports connectivity on the Internet is built on a complex architecture, but fundamental to its operation is the IP address and its associated subnet mask. In this article, we will explore the essential concepts behind the IP address and subnet masks, highlighting their importance in communication between devices on a network.

What is an IP address?

In simple terms, an IP address (Internet Protocol address) is a unique identifier assigned to each device connected to a network that uses the Internet Protocol for communication. Just as a house has a unique physical address, a device on a network has a unique IP address, allowing data to be sent and received efficiently.

IP addresses are divided into two main parts: the network part and the host part. The network part identifies the network to which the device is connected, while the host part identifies the device itself on that specific network.

Types of IP addresses

There are two main types of IP addresses: IPv4 (Internet Protocol version 4) and IPv6 (Internet Protocol version 6). IPv4, represented by four sets of numbers from 0 to 255, is the most common addressing system. However, due to the exponential growth of the Internet, IPv6 was introduced to provide a much larger number of available addresses, using a hexadecimal notation.

IPv4 subnet masks: Dividing and organizing

A subnet mask is a sequence of bits that defines how an IP address is divided between the network part and the host part. Essentially, it determines how many bits are used to identify the network and how many are reserved for identifying individual devices on that network.

The subnet mask is often represented in decimal format with four sets of numbers, similar to an IP address. However, the subnet mask uses a continuous set of “1” bits followed by a continuous set of “0” bits. For example, a typical subnet mask can be expressed as 255.255.255.0, indicating that the first 24 bits are dedicated to network identification.

CIDR

CIDR (Classless Inter-Domain Routing) is a notation system used to represent IP addresses and their respective subnet masks in a more efficient and flexible way than the traditional class-based method (Class A, Class B, Class C). It was introduced to deal with the growing scarcity of IPv4 addresses and to allow for more efficient allocation of IP addresses on the Internet. See more details in RFC1519.

Instead of relying on the old IP address classes, CIDR uses a notation that combines the IP address with the number of bits used to represent the network part of the address. CIDR notation follows the format “IP/mask”, where the number after the slash (/) indicates the number of bits in the subnet mask.

Subnet maskCIDR notationNumber of IPsAddress range
255.255.255.0/24256192.168.1.1 – 192.168.1.254
255.255.255.128/2512810.0.0.1 – 10.0.0.128
255.255.255.192/2664172.16.0.1 – 172.16.0.64
255.255.255.240/2816192.168.10.1 – 192.168.10.16
255.255.255.252/30410.1.1.1 – 10.1.1.2

The “Subnet mask” column represents the mask in decimal format, the “CIDR notation” column shows the equivalent CIDR notation, the “Number of IPs” column indicates how many IP addresses are available in each subnet, and the “Address range” column shows an example of an address range within the subnet. These are examples and the values may vary depending on the implementation and specific network requirements.

Availability of IP addresses for devices on the network

To determine the number of IP addresses available for hosts in a subnet, we use the subnet mask. The subnet mask is a 32-bit number that indicates which bits of the IP address are used to identify the network and which are used to identify

Therefore, in a subnet with a mask of /24, there are 254 IP addresses available for hosts. This is because 2 raised to the power of 8, which is the number of possible combinations of 8 bits, is equal to 256. However, two of these addresses are reserved for the network address and the broadcast address.

Here is a summary of the calculation:

  • Number of bits for hosts = 32 bits – number of bits for network
  • Number of possible combinations = 2 raised to the power of the number of bits for hosts.
  • Number of IP addresses available = number of possible combinations – 2.

This calculation is essential for optimizing the allocation of IP addresses in a network. By ensuring that all devices have a unique and identifiable address, we can avoid conflicts and ensure that communication works correctly.

The infrastructure that supports connectivity on the Internet is complex, but IP addresses and subnet masks are essential elements that make this connectivity possible.

By understanding how these concepts work, we can better appreciate the importance of the Internet in our lives and the importance of keeping the Internet infrastructure secure and running.

Did you not find the information you were looking for? Do you have other questions? Do you want to help us improve the material? Do not hesitate to contact us and seek support from MKController! Click here for any questions.

If you have Mikrotiks in your network, enhance the control, efficiency, and remote access of your Mikrotik with MKController. Click here to try it now and discover the power of advanced and intuitive management to elevate your experience to new heights!