SOCKS4 vs SOCKS5: Differences from a Cybersecurity Perspective
An in-depth comparison of SOCKS4 and SOCKS5 proxies, highlighting their features, differences, and implications for cybersecurity.
Dec 7, 2025Networking
In the vast and interconnected world of computer networks, efficient management and organization of IP addresses are paramount. Subnetting is a fundamental concept that enables network administrators to divide a large network into smaller, more manageable subnetworks. This process, known as network segmentation, offers numerous benefits, from improved performance and security to simplified troubleshooting and better utilization of IP address space.
At its core, subnetting involves taking a single, large IP network and breaking it down into multiple smaller logical networks, called subnets. Each subnet can then operate as an independent network within the larger organization. This is achieved by "borrowing" bits from the host portion of an IP address and dedicating them to the network portion, effectively creating more network IDs and fewer host IDs within each subnet.
The key to understanding subnetting lies in the subnet mask. The subnet mask is a 32-bit number that distinguishes the network portion of an IP address from the host portion. By manipulating the subnet mask, administrators can control the size and number of subnets created.
Subnetting offers several critical advantages for network design and management:
There are two primary approaches to subnetting, each with its own advantages depending on the network's requirements:
Fixed-Length Subnet Masking (FLSM) is the simplest form of subnetting. In FLSM, all subnets within a larger network have the same number of host addresses. This means that once a subnet mask is chosen, it is applied uniformly across all subnets created from the original network.
How it works: You determine the maximum number of hosts required in any single subnet, and then select a subnet mask that accommodates that number. This same mask is then used for all other subnets, even if some require fewer hosts.
Pros:
Cons:
Variable-Length Subnet Masking (VLSM) is a more advanced and efficient approach that allows for the use of different subnet masks for different subnets within the same larger network. This flexibility addresses the limitations of FLSM by enabling administrators to create subnets of varying sizes, tailoring the address allocation to the actual needs of each segment.
How it works: With VLSM, you start by identifying the largest subnet requirement and allocate addresses accordingly. Then, from the remaining address space, you further subnet for smaller requirements, and so on. This hierarchical approach allows for much finer control over IP address allocation.
Pros:
Cons:
To calculate the number of available addresses for a subnet, you first need to determine the number of host bits ($h$). This is found by subtracting the number of network bits (given by the CIDR prefix or subnet mask) from the total 32 bits in an IPv4 address. For example, if you have a subnet with a /26 CIDR prefix, it means 26 bits are dedicated to the network portion. Therefore, the number of host bits is $32 - 26 = 6$ bits. The total number of IP addresses in this subnet is $2^h$, which in this case is $2^6 = 64$ addresses. However, two addresses in each subnet are reserved: the network address (all host bits are 0) and the broadcast address (all host bits are 1). So, the number of usable host addresses for devices is $2^h - 2$, which equals $64 - 2 = 62$ usable IP addresses.
Calculating the number of available subnets involves understanding how many bits from the original network's host portion have been "borrowed" to create new subnets. If you start with a Class C network (e.g., 192.168.1.0/24), which has 8 host bits, and you decide to use a /26 subnet mask for your new subnets, you've essentially borrowed 2 bits from the original host portion ($26 - 24 = 2$ borrowed bits). The number of subnets that can be created from the original network is calculated as $2^s$, where $s$ is the number of borrowed bits. In this example, $2^2 = 4$ subnets can be created from the 192.168.1.0/24 network by applying a /26 subnet mask.
While a comprehensive "Cyber Mentor Subnetting Sheet" usually covers a wide range of CIDR blocks and their corresponding subnet masks, usable hosts, and other details for quick reference, I can provide a simplified version focusing on the default masks and CIDR blocks for the traditional IPv4 network classes.
Here's a basic subnetting sheet table based on network classes:
This table provides a high-level overview of the default network classes, their standard subnet masks, and the corresponding CIDR notation. Remember that modern networking primarily uses Classless Inter-Domain Routing (CIDR), which allows for much more flexible subnetting beyond these class boundaries.
| Network Class | Default Subnet Mask (Decimal) | Default Subnet Mask (Binary) | Default CIDR Block | Number of Network Bits (Default) | Number of Host Bits (Default) | Max. Usable Hosts (Default Class) |
|---|---|---|---|---|---|---|
| Class A | 255.0.0.0 | 11111111.00000000.00000000.00000000 | /8 | 8 | 24 | 16,777,214 |
| Class B | 255.255.0.0 | 11111111.11111111.00000000.00000000 | /16 | 16 | 16 | 65,534 |
| Class C | 255.255.255.0 | 11111111.11111111.11111111.00000000 | /24 | 24 | 8 | 254 |
/XX notation indicates the number of bits in the IP address that belong to the network portion. This is a more modern and flexible way of defining network boundaries compared to the rigid classful system. Representing the network prefix length (number of bits for the network portion).1s for the network portion and 0s for the host portion.This table should be a great resource for quickly looking up common subnetting values!
Subnetting is an indispensable skill for any network professional. Whether employing the simplicity of FLSM or the efficiency of VLSM, understanding how to effectively segment an IP network is crucial for building robust, secure, and high-performing network infrastructures. By strategically dividing networks into smaller subnets, organizations can optimize resource utilization, enhance security postures, and streamline network management, ultimately contributing to a more resilient and adaptable digital environment.
Love it? Share this article: