← Todos os Guias
Guia

Guia de Sub-Rede IPv4

Domine a arte da sub-rede — aprenda como dividir redes IP eficientemente usando máscaras de sub-rede, notação CIDR e exemplos práticos.

What is Subnetting?

Subnetting is the practice of dividing a larger IP network into smaller, more manageable logical networks called subnets. When an organization receives a block of IP addresses, subnetting allows them to segment that block into multiple isolated networks, each serving a different department, floor, or function within the organization.

The benefits of subnetting are substantial. By creating smaller broadcast domains, network traffic is reduced because broadcast packets only reach devices within the same subnet rather than every device on the entire network. This improves overall network performance and reduces congestion. Subnetting also enhances security by isolating sensitive systems — for example, keeping financial servers on a separate subnet from guest Wi-Fi devices.

Beyond performance and security, subnetting enables more efficient use of IP addresses. Instead of wasting an entire Class C block (256 addresses) on a network that only needs 30 hosts, administrators can create a /27 subnet with exactly 32 addresses. This conservation of IP addresses is critical given the exhaustion of the IPv4 address space.

Understanding Subnet Masks

A subnet mask is a 32-bit number that separates an IP address into its network portion and host portion. The mask uses consecutive 1-bits to mark the network portion and consecutive 0-bits for the host portion. When a device performs a bitwise AND operation between an IP address and its subnet mask, the result identifies which network the address belongs to.

For example, with the IP address 192.168.1.100 and subnet mask 255.255.255.0, the AND operation yields 192.168.1.0 — this is the network address. The remaining bits (the last octet in this case) identify the specific host within that network. Understanding this relationship is fundamental to configuring routers, firewalls, and any network infrastructure.

/24 Subnet

Mask 255.255.255.0 — provides 256 total IPs (254 usable hosts). The most common subnet size for small to mid-sized networks.

/16 Subnet

Mask 255.255.0.0 — provides 65,536 total IPs. Used by large enterprises and ISPs for broad network allocations.

/8 Subnet

Mask 255.0.0.0 — provides over 16 million IPs. Reserved for the largest organizations and legacy Class A allocations.

Custom Masks

Masks like /25, /26, /27, /28 allow precise allocation. Choose the mask that best fits the number of hosts you need.

CIDR Notation

Classless Inter-Domain Routing (CIDR) was introduced in 1993 to replace the rigid classful networking system. Instead of being limited to /8, /16, or /24 boundaries dictated by address classes, CIDR allows network administrators to specify any prefix length from /0 to /32, providing far greater flexibility in allocating IP address space.

CIDR notation appends a slash and a number to an IP address (e.g., 192.168.1.0/24) to indicate how many bits of the address represent the network portion. A /24 means the first 24 bits are the network ID, leaving 8 bits for host addresses. This compact notation replaces the need to write out full subnet masks and is universally used in modern routing configurations.

One of the most powerful features enabled by CIDR is Variable Length Subnet Masking (VLSM). With VLSM, different subnets within the same organization can use different prefix lengths. A department with 200 users might get a /24, while a point-to-point link between two routers only needs a /30 (4 IPs, 2 usable). This eliminates the massive waste that characterized classful addressing.

Subnetting Examples

Consider a common scenario: you have a /24 network (192.168.1.0/24) with 256 addresses, but you need two separate networks. By borrowing one bit from the host portion, you create two /25 subnets — 192.168.1.0/25 (hosts .1 to .126) and 192.168.1.128/25 (hosts .129 to .254), each with 128 addresses and 126 usable hosts.

For more granular divisions, splitting a /24 into four /26 subnets gives you four networks of 64 addresses each (62 usable). This is ideal for small departments or VLAN segmentation. The subnets would be 192.168.1.0/26, 192.168.1.64/26, 192.168.1.128/26, and 192.168.1.192/26.

In enterprise environments, a /16 block might be subdivided into 256 individual /24 subnets, one for each branch office or department. Each /24 provides 254 usable host addresses — more than enough for most office environments. This hierarchical approach simplifies routing tables and makes network management predictable.

/25 Split

2 subnets with 128 addresses each (126 usable hosts). Created by borrowing 1 bit from the host portion.

/26 Split

4 subnets with 64 addresses each (62 usable hosts). Ideal for departmental segmentation.

/27 Split

8 subnets with 32 addresses each (30 usable hosts). Perfect for small office networks.

/28 Split

16 subnets with 16 addresses each (14 usable hosts). Often used for server farms and DMZ segments.

Why Subnet Your Network?

Security is one of the primary drivers for subnetting. By placing sensitive systems (such as databases, payment processing servers, or management interfaces) on isolated subnets, you can apply firewall rules and access controls at the subnet boundary. Even if an attacker compromises one subnet, lateral movement to other subnets is significantly harder when proper inter-subnet filtering is in place.

Performance optimization and regulatory compliance also benefit from subnetting. Smaller broadcast domains mean less unnecessary traffic, which is especially important in large networks with hundreds or thousands of devices. For compliance with standards like PCI-DSS, network segmentation via subnetting is often a mandatory requirement to isolate cardholder data environments from the rest of the network.

Security Isolation

Separate sensitive systems from general-purpose networks. Apply granular firewall rules between subnets.

Broadcast Control

Reduce broadcast traffic by limiting broadcast domains. Each subnet has its own broadcast boundary.

IP Conservation

Allocate exactly the right number of addresses per network segment, avoiding waste in scarce IPv4 space.

Network Organization

Logically organize your network by function, location, or department for easier management and troubleshooting.

Common Subnet Sizes

In the IPv4 marketplace, certain subnet sizes are far more common than others. A /24 block (256 IPs) is the smallest independently routable block accepted by most ISPs and is the standard unit for smaller deployments. A /23 provides 512 IPs, a /22 gives 1,024, and a /21 offers 2,048 — these mid-range sizes are popular with growing businesses and regional ISPs.

Larger allocations like /20 (4,096 IPs), /19 (8,192 IPs), and /16 (65,536 IPs) are typically acquired by data centers, cloud providers, and large enterprises. The price per IP generally decreases with larger blocks due to economies of scale, but the total investment is significantly higher. Understanding these sizes helps buyers and sellers communicate effectively in the IPv4 transfer market.

Perguntas Frequentes

Perguntas comuns sobre sub-rede IPv4 respondidas

A /24 subnet uses a 24-bit network prefix (subnet mask 255.255.255.0), providing 256 total IP addresses with 254 usable host addresses. It is the most common subnet size and the smallest block that can be independently routed on the internet.

A /24 subnet has 254 usable host addresses. Out of 256 total addresses, the first address is reserved as the network address and the last address is the broadcast address, leaving 254 for devices.

Variable Length Subnet Masking (VLSM) is a technique that allows different subnets within the same network to use different prefix lengths. This enables efficient allocation — large departments get bigger subnets while point-to-point links use tiny /30 or /31 subnets.

Subnetting is necessary for security isolation, broadcast traffic reduction, efficient IP address usage, and logical network organization. Without subnetting, large flat networks would suffer from excessive broadcast traffic, poor security boundaries, and wasted IP addresses.

A /24 has 256 addresses (254 usable) while a /25 has 128 addresses (126 usable). Splitting a /24 into two /25s creates two equal subnets. The /25 uses one additional bit for the network portion, halving the available host addresses.

To calculate subnets, determine how many subnets or hosts you need. The formula for usable hosts is 2^(32 - prefix) - 2. For the number of subnets created by borrowing n bits: 2^n subnets. Use our subnet calculator tool for quick results.

Precisa de Blocos de Endereços IP?

Explore nosso mercado para blocos IPv4 em vários tamanhos de sub-rede, de /24 a /16 e além.