Articles

Fundementals of IP Addressing and Subnetting

Fundementals of IP Addressing and Subnetting

Network & Security

19/09/2023 15:09

Serhat P.

7 min. reading

In today's digital age, IP addressing and subnetting are inseparable components of data communication. It is of great importance to learn the fundamentals of IP addressing and subnetting, especially for those working in the network field and those who want to gain knowledge in this area. In this article, we will address a wide range of topics, starting from what IP addressing is to the advantages of subnetting.

IP Addressing

What is an IP Address?

An IP address is a number used to identify a computer or another device within a network. IP addresses facilitate communication between devices.

Structure and Components of an IP Address

IP addresses usually consist of four groups. Each group can take a value between 0 and 255. For example: 192.168.1.1.

Differences Between IPv4 and IPv6

IPv4 and IPv6 are two different versions of IP addressing. IPv6 was created to overcome the limitations of IPv4 and provide a larger number of IP addresses.

Subnetting

What is Subnetting?

Subnetting is the process of dividing a large IP address space into smaller, manageable pieces.

Advantages of Subnetting

  • Increasing network performance
  • Economical usage of IP addresses
  • Enhancing network security

Subnet Mask and CIDR Notation

The subnet mask specifies which part of an IP address is reserved for the network and which part is reserved for hosts. CIDR notation is an alternative to subnet masks. In subnetting, the subnet mask is used to separate the network address and the host address. Also, CIDR (Classless Inter-Domain Routing) notation is an alternative to the subnet mask, allowing more flexible management of IP addresses.

IP Addressing and Subnetting Practices

Practicing is important to better grasp the topics of IP addressing and subnetting. In this section, we will present subnetting examples through different scenarios and explore IP addressing applications.

Example 1: Increasing the Number of Hosts in the Network

With the growth of a company, there arises a need to increase the number of hosts in the network. For instance, currently, 254 hosts can be supported with a subnet mask of 255.255.255.0. If the subnet mask is changed to 255.255.254.0, 510 hosts can be supported. This change allows the company to expand its network but can also increase security risks in the network.

Example 2: Determining the Network with Given IP Address and Subnet Mask Values

With given IP address and subnet mask values, the network address can be determined using these values. For example;

  • IP Address: 192.168.1.130
  • Subnet Mask: 255.255.255.192

In this case, the network address is determined by performing an AND operation with the IP address and subnet mask:

11000000.10101000.00000001.10000010 (192.168.1.130)
11111111.11111111.11111111.11000000 (255.255.255.192)
-----------------------------------
11000000.10101000.00000001.10000000 (192.168.1.128)

As a result, the network address is determined as 192.168.1.128.

These scenarios can help you understand and apply IP addressing and subnetting concepts. By practicing, you can learn to quickly perform these calculations and effectively solve network problems.

Example 3: Restricting IP Address Range with Subnetting

Sometimes, especially in large companies or organizations, it is necessary to define specific IP address ranges for certain departments or groups. Using subnetting, an IP address range can be divided into smaller pieces, thereby creating unique IP address ranges for each group.

For instance, a 192.168.0.0/24 network can be divided into 4 equal parts to form 4 different subnets, each with a capacity of 64 hosts. A subnet mask of 255.255.255.192 (or /26 CIDR) is used.

In this scenario, the resulting subnets and their broadcast addresses are as follows:

  • 192.168.0.0/26 – Broadcast address: 192.168.0.63
  • 192.168.0.64/26 – Broadcast address: 192.168.0.127
  • 192.168.0.128/26 – Broadcast address: 192.168.0.191
  • 192.168.0.192/26 – Broadcast address: 192.168.0.255

Example 4: Optimal IP Addressing Using VLSM (Variable Length Subnet Mask)

VLSM allows the usage of different subnet masks in different subnets, promoting more efficient utilization of IP addresses.

For instance, a company has three different departments needing different numbers of IP addresses:

Accounting: 120 IP addresses

Sales: 60 IP addresses

Human Resources: 30 IP addresses

In this case, we can devise an IP addressing plan as follows:

A subnet supporting 128 IP addresses for the accounting department (255.255.255.128 or /25 CIDR)

A subnet supporting 64 IP addresses for the sales department (255.255.255.192 or /26 CIDR)

A subnet supporting 32 IP addresses for the HR department (255.255.255.224 or /27 CIDR)

In this example, by using different subnet masks, we can ensure optimal and economical distribution of IP addresses according to the specific needs of each department.

Subnetting and Network Security

Subnetting is an important tool that enhances network security. By establishing firewalls between different subnets, we can prevent potential attacks from moving from one subnet to another.

By controlling the traffic between subnets with security policies, we can further increase the level of security. For example, access to a subnet where sensitive data is located can only be provided by authorized users.

Moreover, thanks to subnetting, we can better control network traffic flow, thus creating a line of defense against potential DDoS attacks.

Conclusion

Understanding the principles of IP addressing and subnetting is pivotal for anyone working in the network field. Through practical examples and exercises, one can acquire a better grasp of these concepts, and efficiently solve real-life networking problems, creating a more secure, efficient, and economical network environment.

MakdosTech Footer Logo

All Rights Reserved 2024 - Makdos Tech

Sharing of articles without permission or attribution is prohibited.