What Is CIDR Notation?
Because classful addressing wasted millions of IPv4 addresses, IETF replaced it in 1993 with CIDR.1 The notation combines any IP address with a prefix length, written as address/prefix, such as 192.168.0.0/24, 10.0.0.0/8, or 2001:db8::/32.
What is CIDR notation?
/24 means 24 network bits and 8 host bits, equivalent to a 255.255.255.0 mask.2 Any prefix length from /0 (all addresses) to /32 (single host) is valid in IPv4, and /0 to /128 is valid in IPv6.How CIDR replaced classful addressing
Before CIDR, IPv4 addresses fell into Class A (/8, 16M hosts), Class B (/16, 65K hosts), and Class C (/24, 254 hosts).3 An organization needing 1,000 hosts received an entire Class B (/16, 65,534 hosts), which meant wasting 64,534 addresses. CIDR allows any prefix length, so a 1,000-host network receives a /22 (1,022 usable hosts) instead. Consequently, one former Class B block can be split into 256 /24s for 256 separate organizations. Building on this, route aggregation (supernetting) lets providers advertise a single /20 route instead of 16 separate /24 routes, shrinking global routing tables. Furthermore, CIDR is the foundation of VLSM (Variable Length Subnet Masking) used in all modern network design.
Why classful addressing forced wasteful allocations
Classful addressing assigned an entire /8, /16, or /24 block to every organization regardless of actual need, so an enterprise requiring 1,000 hosts could not fit into a /24 (254 hosts) and had to consume a /16 (65,534 hosts). The gap between class sizes was enormous, and the internet ran out of address space faster as a result. CIDR removed this constraint by allowing prefixes of any length, so a registry can delegate a /22 to an organization that needs 1,002 usable hosts and reserve the adjacent blocks for other customers. This fine-grained allocation is what kept IPv4 alive for decades after the classful system would have exhausted the entire address space.
Reading CIDR blocks in practice
A CIDR block like 10.0.0.0/24 always identifies a network, not a specific host. The network address has all host bits set to zero, so for a /24 the last octet is always 0. The broadcast address has all host bits set to one, so for a /24 the last octet is always 255. Addresses between these two boundaries are the usable host range. Conversely, a /32 like 192.168.1.5/32 identifies exactly one host because the mask is all 1s, so there are no host bits and no broadcast. Cloud security groups and firewall rules use /32 for single-host rules and wider prefixes like /16 or /24 for network-wide rules.
How the network and broadcast addresses bound the usable range
The broadcast address of a subnet is always one less than the next subnet boundary, which means the highest address in a /24 is 255 and the lowest is 0, leaving 1 through 254 as the usable host range. For a /25, the boundary falls at 128, so a subnet starting at 10.0.0.0 has a broadcast of 10.0.0.127 and usable range of 10.0.0.1 through 10.0.0.126.
This pattern holds for every prefix length: the usable range sits between the network address (all host bits zero) and the broadcast address (all host bits one), and the count of usable hosts equals two to the power of the host-bit count minus two except for /31 and /32 subnets where the subtraction rules differ.
CIDR in cloud and infrastructure contexts
AWS, Azure, and GCP use CIDR notation for every network primitive, from address spaces to security groups to route advertisements. VPC address spaces are CIDR blocks (/16 is common for production), and each subnet within the VPC takes a smaller slice such as /24 or /27. Security group rules express allowed sources as CIDR: 0.0.0.0/0 means all addresses while 10.0.0.0/8 means the entire RFC 1918 private range. Kubernetes clusters partition their address space into pod CIDRs and service CIDRs as distinct non-overlapping blocks, so that pods and services never collide. Understanding CIDR lets you read any cloud console or routing configuration without ambiguity.
How route precedence works when multiple prefixes overlap
BGP route advertisements are CIDR prefixes, and a more specific /24 overrides a covering /20 when both are present in the same routing table. This longest-prefix-match rule is the same logic that cloud providers use inside virtual routers: the most specific matching prefix always wins over a broader one. In practice, a security group allowing 10.0.0.0/16 does not override a separate rule restricting 10.0.1.0/24 if both apply to the same traffic, so always verify rule ordering in your cloud console.
CIDR in BGP and internet routing
BGP (Border Gateway Protocol) is the protocol that holds the global internet together, and every BGP route advertisement is a CIDR prefix.4 When an ISP announces 203.0.113.0/24 to its peers, it tells the world that it can deliver traffic to any address in that /24. Building on this, more specific prefixes override less specific ones: if 203.0.113.0/25 is also announced separately, traffic for 203.0.113.0 through 203.0.113.127 follows the /25 route while the rest of the /24 follows the less specific announcement.4 This longest-prefix-match behavior is how BGP anycast works: the same IP block is announced from multiple datacenters, and the nearest one by routing distance wins. CIDR made this possible by replacing classful boundaries with arbitrary prefix lengths that ISPs can delegate and sub-delegate.
CIDR allocation through IANA and regional registries
IANA allocates large CIDR blocks to the five Regional Internet Registries (RIPE NCC, ARIN, APNIC, LACNIC, AFRINIC), which in turn allocate smaller blocks to ISPs and organizations. The final /8 blocks from the old Class A space were exhausted in 2011,5 and IPv4 address trading markets now exist where organizations buy and sell /16 and /24 blocks. Building on this, when your company requests IP address space from ARIN or your regional registry, you receive a CIDR allocation (commonly a /22 or /19 for modest organizations) that you subdivide internally using VLSM. Maintaining documentation of your allocated block and internal subdivisions in an IPAM system prevents fragmentation : a problem that mirrors disk fragmentation, where free addresses exist but are scattered across non-contiguous blocks.
CIDR notation in firewall rules and security groups
Every cloud security group rule, iptables rule, and network ACL entry uses CIDR notation to define address ranges.6 AWS Security Groups accept CIDR source fields: 0.0.0.0/0 means all IPv4 traffic, 10.0.0.0/8 means the entire RFC 1918 private A range, and 192.168.1.10/32 means one specific host. Building on this, a common misconfiguration opens ports to 0.0.0.0/0 when the intent was to allow traffic from a specific office subnet : for example, 203.0.113.0/24. Regular audits of security group rules with overly broad CIDR sources (especially /0 and /8) catch this drift. Automated tools like AWS Config rules or OpenPolicy Agent policies can flag security groups that expose sensitive ports (22, 3389, 3306) to CIDR ranges wider than an approved list of office subnets. The CapyToolkit calculator helps determine the correct CIDR for each office location before adding it to an allow list.
Try in the tool
Open the IPv4 / IPv6 Subnet & CIDR Calculator tool pre-filled to CIDR notation to verify it or try a different one.
Check CIDR notation in the tool →- 1.
V. Fuller, T. Li, J. Yu, and K. Varadhan, "Classless Inter-Domain Routing (CIDR): an Address Assignment and Aggregation Strategy," RFC 1519, IETF, September 1993. https://www.rfc-editor.org/rfc/rfc1519.html
- 2.
V. Fuller and T. Li, "The CIDR Address Strategy," RFC 4632, IETF, September 2006. https://datatracker.ietf.org/doc/html/rfc4632
- 3.
"Classful network," Wikipedia, accessed June 2026. https://en.wikipedia.org/wiki/Classful_network
- 4.
Y. Rekhter and T. Li, "A Border Gateway Protocol 4 (BGP-4)," RFC 4271, IETF, January 2006. https://www.rfc-editor.org/rfc/rfc4271.html
- 5.
IANA, "IANA IPv4 Address Free Pool Depleted," iana.org, February 2011. https://www.iana.org/reports/2011/ipv4-free-pool-depleted
- 6.
Amazon Web Services, "Security Group Rules," docs.aws.amazon.com, accessed June 2026. https://docs.aws.amazon.com/vpc/latest/userguide/VPC_SecurityGroups.html
It is the prefix length, which is the count of consecutive 1-bits in the subnet mask. CapyToolkit reads this value and displays the network address, broadcast address, and usable range for any prefix you enter. /24 means 24 bits are the network portion (255.255.255.0), leaving 8 bits for host addresses within the subnet.
Yes, 0.0.0.0/0 is valid because it has a prefix of zero bits, so no bits need to match. It matches all IPv4 addresses and appears in default routes and security groups meaning "all traffic." CapyToolkit treats this as a valid input and reports the full four-octet range in its output.
/32 in IPv4 identifies exactly one address. /128 does the same in IPv6. These are used in host routes, security group rules targeting one specific IP, and BGP advertisements for individual servers.
Overlap is possible, and when two blocks coexist in a routing table the most specific (longest) prefix wins. A /24 is more specific than a /20, so traffic matching both goes via the /24 route. In DHCP configurations and security groups, overlapping CIDRs are usually a misconfiguration.
An IP address identifies a single interface. A CIDR block like 192.168.1.0/24 identifies a group of 256 addresses that share the same 24-bit network prefix. The IP address is one point, and the CIDR block is the range that contains it.
What Is a Subnet Mask?
When a device applies a subnet mask to an IP address, it identifies which network that address belongs to. The mask separates the network portion from the host portion using a sequence of 1-bits followed by 0-bits.1
What is a subnet mask?
255.255.255.0 for a /24. The 1-bits in the mask cover the network portion while the 0-bits cover the host portion, and a bitwise AND between an IP address and its mask produces the network address.1How subnet masks work in binary
A subnet mask is always a contiguous run of 1-bits followed by 0-bits. 255.255.255.0 in binary is 11111111.11111111.11111111.00000000. When a router performs bitwise AND between an IP address and this mask, the result is the network address: 192.168.1.100 AND 255.255.255.0 produces 192.168.1.0. Consequently, the host portion (the low bits) is erased, revealing the network identity. Comparing two IPs against the same mask tells the router whether they belong to the same network, and if the ANDed results match, the two devices share a subnet and can communicate directly without going through a gateway.
Why the contiguous mask constraint matters
A valid subnet mask must have all 1-bits contiguous from the left, so 255.255.255.0 is valid but 255.0.255.0 is not. Routers and operating systems reject non-contiguous masks at the configuration level, because the prefix-length counting that CIDR depends on only works when every 1-bit precedes every 0-bit. This constraint also simplifies hardware forwarding logic: network chips can mask an address by counting leading ones rather than evaluating arbitrary bit patterns, which keeps wire-speed routing feasible on throughput-intensive core links.
Subnet masks versus CIDR notation
Subnet masks and CIDR prefix lengths express the same information in different formats. /24 is equivalent to 255.255.255.0; /25 is equivalent to 255.255.255.128.2 Older networking equipment and software requires dotted-decimal masks; modern cloud consoles, firewalls, and documentation use CIDR. Conversely, Cisco IOS configuration files use dotted-decimal masks for interface addresses but wildcard masks (the bitwise inverse) in access control lists. Building on this, the relationship is straightforward: count the consecutive 1-bits in the mask to get the CIDR prefix length. 255.255.252.0 has 22 consecutive 1-bits, making it /22.2 Furthermore, the subnet mask must always be a valid contiguous mask, so non-contiguous patterns like 255.0.255.0 are invalid in standard IPv4.
Subnet masks in practice
Network devices use subnet masks during every routing and forwarding decision. A host checks whether a destination IP shares its subnet by ANDing both addresses with the subnet mask, and if results match, the traffic goes directly to the destination without a gateway. If results differ, the traffic is sent to the default gateway. Building on this, firewalls use subnet masks (or CIDR prefixes) in access rules: a rule for 10.0.0.0/255.255.0.0 applies to all 65,534 addresses in that range. DHCP servers assign a subnet mask alongside the IP address, telling the new device the boundary of its local segment. Yet in modern networks, CIDR notation has largely replaced dotted-decimal masks in documentation and configuration, so knowing both formats remains essential for reading legacy configurations.
Subnet masks and the ARP process
Every time your computer sends data to another device on the same subnet, it first checks whether the destination IP shares its own network. The subnet mask makes this possible: your OS performs a bitwise AND between the destination IP and the mask, then compares the result to its own network address. When the results match, the destination is local and your machine sends an ARP broadcast to resolve the MAC address directly. 3
When the results differ, the destination sits on a different subnet. Your computer forwards the packet to the default gateway instead, which handles routing between segments. The subnet mask directly controls which ARP requests your machine generates: a /24 mask means ARP for 254 possible hosts, while a /16 mask means ARP for 65,534. Consequently, oversized subnets generate excessive ARP traffic that degrades performance on busy networks, which is one reason VLANs and smaller segments matter in enterprise design.
How ARP storms expose subnet mask misconfigurations
A misconfigured subnet mask (for example, a /16 where a /24 was intended) causes a device to ARP for addresses that actually reside on a different VLAN. Those ARP requests flood the entire /16 broadcast domain, waking interfaces that should never see them, and the resulting broadcast storm can saturate links that normally carry only unicast traffic.
Network engineers who segment a /16 into /24 VLANs but forget to update the DHCP scope mask create exactly this problem: devices ARP across VLAN boundaries, generating broadcast traffic that the switch must forward to every port. Verifying that the subnet mask in every DHCP scope matches the intended VLAN prefix prevents this class of outage.
Variable Length Subnet Masks and subnet mask boundaries
Not all subnets in a network need the same mask. Variable Length Subnet Masking (VLSM) lets you assign a /27 to a 30-host segment and a /30 to a point-to-point WAN link from the same parent block.4 The subnet mask is the mechanism that makes this work: each segment's mask defines its own boundary, and routers use the longest-prefix-match rule to forward packets to the correct one.
Inside a VLSM design, the subnet mask on each interface must match the prefix length assigned to that segment. A router interface connected to a /27 segment uses mask 255.255.255.224; an interface on a /30 WAN link uses 255.255.255.252. Building on this, routing protocols like OSPF and EIGRP must advertise the correct mask alongside each network, or neighbors will calculate wrong boundaries. Classless routing protocols (OSPF, EIGRP, BGP) carry the mask in every route update; classful protocols (RIPv1) do not, which is why RIPv1 cannot support VLSM designs.5
Planning VLSM with the subnet calculator
Use the subnet calculator to verify each segment's mask before configuring router interfaces, because a mismatched mask on even one interface can blackhole traffic for an entire subnet without any obvious error message. Enter the network address and prefix length to confirm the exact range, then check that adjacent segments do not overlap. A /26 starting at 10.0.0.64 and a /28 starting at 10.0.0.72 overlap because the /26 covers through 10.0.0.127, which means the /28 sits entirely inside the /26 boundary. Catching these conflicts in the calculator prevents routing black holes that are time-consuming to trace in production.
Try in the tool
Open the IPv4 / IPv6 Subnet & CIDR Calculator tool pre-filled to a subnet mask to verify it or try a different one.
Check a subnet mask in the tool →- 1.
J. Mogul and J. Postel, "Internet Standard Subnetting Procedure," RFC 950, IETF, August 1985. https://www.rfc-editor.org/rfc/rfc950.html
- 2.
V. Fuller and T. Li, "The CIDR Address Strategy," RFC 4632, IETF, September 2006. https://datatracker.ietf.org/doc/html/rfc4632
- 3.
D. Plummer, "Using ARP to Implement Transparent Subnet Gateways," RFC 1027, IETF, June 1988. https://www.rfc-editor.org/rfc/rfc1027.html
- 4.
R. Braden, "Requirements for Internet Gateways," RFC 1009, IETF, June 1987. https://datatracker.ietf.org/doc/html/rfc1009
- 5.
"Routing Information Protocol," Wikipedia, accessed June 2026. https://en.wikipedia.org/wiki/Routing_Information_Protocol
255.255.255.0. The first 24 bits are all ones (three full octets of 255), and the remaining 8 bits are zeros. This is the most common subnet mask for local area networks.
An IP address identifies a specific interface on a network. A subnet mask is a pattern applied to an IP address to extract the network portion. Every IP address on the same subnet shares the same network address after the mask is applied.
A default subnet mask comes from the classful era: Class A used 255.0.0.0, Class B used 255.255.0.0, Class C used 255.255.255.0. These defaults are largely obsolete because modern networks use any prefix length via CIDR. CapyToolkit does not assume a default mask and instead calculates the exact range from the prefix length you provide.
All devices in the same subnet must share the same subnet mask. Different masks for the same network prefix would cause routing inconsistencies. Different subnets can use different masks.
A wildcard mask is the bitwise inverse of a subnet mask. 255.255.255.0 (/24) inverts to 0.0.0.255. Wildcard masks are used in Cisco ACL syntax and OSPF area configurations. Where a subnet mask has 1s in network bits, the wildcard has 0s, and vice versa.
What Are Private IP Address Ranges?
Because the internet would exhaust 4 billion IPv4 addresses without address reuse, RFC 1918 reserved three blocks for private networks.1 Routers on the public internet drop packets destined for these ranges.
What is private IP ranges?
RFC 1918 that are reserved for use inside private networks and are not routable on the public internet. The three ranges are: 10.0.0.0/8 (10.0.0.0 to 10.255.255.255), 172.16.0.0/12 (172.16.0.0 to 172.31.255.255), and 192.168.0.0/16 (192.168.0.0 to 192.168.255.255).1 Network Address Translation (NAT) allows devices with private IPs to reach the internet by mapping them to a public IP at the network edge.The three RFC 1918 ranges
The 10.0.0.0/8 range provides 16,777,214 usable addresses, which is large enough for enterprise-wide addressing across campuses, data centers, and cloud VPCs without running out. The 172.16.0.0/12 range (a supernet covering 172.16.x.x through 172.31.x.x) provides 1,048,574 addresses, commonly used for medium-sized organizations and some cloud provider infrastructure. The 192.168.0.0/16 range provides 65,534 addresses and appears in nearly every home router as the default local network (typically 192.168.1.0/24 or 192.168.0.0/24). RFC 1918 deliberately selected one full Class A block, a Class B-sized supernet, and one Class C block so that organizations of any scale could pick a range that fit their growth plans. Consequently, these three ranges are the starting point for any private network design, whether at home or in a cloud VPC.
Why private IPs are not routable on the internet
Internet routers are configured to discard (blackhole) traffic destined for RFC 1918 addresses.2 Because millions of organizations reuse these ranges independently, no single routing path to 192.168.1.100 can be meaningful because every network has its own 192.168.1.100. Building on this, NAT (Network Address Translation) solves the outbound routing problem by replacing the private source IP with the router's public IP before packets leave the private network.3 Return traffic arrives at the public IP and the NAT table translates it back to the originating private IP. Yet NAT breaks inbound connections without explicit port forwarding rules, which is why hosting a server at home requires configuring NAT on your router.
Choosing private ranges for cloud and enterprise networks
In enterprise and cloud environments, range selection matters because VPCs, office networks, and on-premises data centers must not overlap if they are peered together or connected via a site-to-site VPN. Using 192.168.0.0/16 for an AWS VPC means any office network that also uses 192.168.x.x cannot peer with it without address conflict.
Why 10.0.0.0/8 dominates VPC design
Consequently, AWS, Azure, and GCP recommend the 10.0.0.0/8 range for VPCs, partitioned by region or environment. Its size lets you carve out dozens of non-overlapping /16 blocks for different teams and workloads without renumbering later. 172.16.0.0/12 is less commonly used and thus less likely to conflict with existing office ranges. Building on this, maintaining an IPAM (IP Address Management) system that tracks all RFC 1918 allocations across sites prevents overlap conflicts before they occur.
This preference traces back to RFC 1918 itself: Section 5 of the RFC recommends using the 24-bit block (10.0.0.0/8) whenever a suitable subnetting scheme can be designed, specifically to support a good long-term growth path, and suggests falling back to the smaller 192.168.0.0/16 block only when subnetting the larger range proves impractical. The cloud providers' modern default simply follows the same logic the RFC laid out for enterprise networks decades earlier.
RFC 1918 overlaps and how to avoid them in hybrid networks
The most common RFC 1918 conflict happens when a VPN connects two networks that both use 192.168.1.0/24. Traffic destined for the remote 192.168.1.10 routes locally, never reaching the VPN tunnel : the shorter prefix length of the local /24 wins over the VPN's route. Building on this, organizations that acquire other companies or merge office networks encounter this overlap frequently during integration projects. The fix requires renumbering one side, which means updating DHCP scopes, static routes, DNS entries, and firewall rules in one coordinated maintenance window. Planning unique RFC 1918 allocations from a shared /8 block : site A gets 10.1.0.0/16, site B gets 10.2.0.0/16 : prevents overlap before it occurs. CapyToolkit's calculator validates that selected ranges do not collide with existing allocations across your infrastructure.
The 172.16.0.0/12 range and its unusual boundaries
The 172.16.0.0/12 range confuses many network engineers because it does not align to an octet boundary. Unlike the clean Class A and Class B boundaries that align neatly to octet edges, the /12 allocation splits the second octet partway through, which is why manual calculations so often go wrong. The range covers 172.16.0.0 through 172.31.255.255, meaning the second octet can be any value from 16 to 31. A common mistake is treating 172.16.0.0/16 as the full range, which misses 15 additional /16 blocks.
Reading the /12 mask in binary
Building on this, the correct subnet mask for /12 is 255.240.0.0: the first 4 bits of the second octet are fixed (0001xxxx, which covers decimal 16 through 31). Because the /12 prefix spans a portion of the second octet rather than filling it entirely, the usable values in that octet range only from sixteen through thirty-one, which catches off-by-one errors during manual allocation. When allocating from this range, verify that addresses like 172.31.100.50 and 172.16.50.100 both belong to the same /12 block : a prefix calculator confirms this instantly without mental binary arithmetic.
Allocating subnets from the /12 block
When you carve smaller subnets from the /12 range, always start at 172.16.0.0 and advance by the full size of each subnet so the boundaries stay aligned and easy to audit. A /16 taken from the start consumes 172.16.0.0 through 172.16.255.255, leaving 172.17.0.0 as the next available block, and this predictable stepping is what makes the range manageable despite its non-octet alignment. The subnet calculator shows the exact start and end of each allocation, which removes the guesswork and prevents accidental overlaps when several teams request space from the same parent block.
Carrier-grade NAT and the 100.64.0.0/10 shared space
RFC 6598 defines 100.64.0.0/10 as a shared address space for carrier-grade NAT (CGNAT) deployments.4 ISPs use this range to translate thousands of subscriber connections through a small pool of public IPv4 addresses. Devices behind CGNAT share the same 100.x.x.x addresses within the ISP's infrastructure, and port mapping at the ISP level distinguishes individual connections. Building on this, if you see 100.64.x.x addresses in packet captures or traceroutes, you are looking at CGNAT infrastructure, not a misconfigured private network. Hosting servers behind CGNAT is impractical because inbound connections require the ISP's cooperation; for self-hosted services, request a static public IP from your ISP or use an IPv6 tunnel. The subnet calculator helps identify whether a given address falls within RFC 1918, RFC 6598, or public address space.
Try in the tool
Open the IPv4 / IPv6 Subnet & CIDR Calculator tool pre-filled to private IP ranges to verify it or try a different one.
Check private IP ranges in the tool →- 1.
R. Baker, "Address Allocation for Private Internets," RFC 1918, IETF, February 1996. https://www.rfc-editor.org/rfc/rfc1918.html
- 2.
"Network Address Translation," Wikipedia, accessed June 2026. https://en.wikipedia.org/wiki/Network_address_translation
- 3.
P. Francis, "The IP Network Address Translator (NAT)," RFC 1631, IETF, May 1994. https://datatracker.ietf.org/doc/html/rfc1631
- 4.
J. Weil, V. Kuarsingh, C. Donley, C. Liljenstolpe, and M. Azinger, "IANA-Reserved IPv4 Prefix for Shared Address Space," RFC 6598, IETF, April 2012. https://www.rfc-editor.org/rfc/rfc6598.html
10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16, as defined by RFC 1918. Any address within these ranges can be used freely on private networks without registration.
Most home routers default to the 192.168.1.0/24 or 192.168.0.0/24 subnet and assign themselves .1 as the gateway. This is a manufacturer convention rather than a protocol requirement, so any address in a private range can serve as a gateway.
Yes, that is the point of private addressing. Millions of home networks all use 192.168.1.0/24 independently. Problems arise only when two networks using the same range need to be connected, because then address conflicts prevent routing.
IPv6 uses Unique Local Addresses (ULA) in the fc00::/7 range for private networking, which is equivalent to RFC 1918 for IPv4. Additionally, link-local addresses (fe80::/10) are auto-assigned to every interface for local communication only.
169.254.0.0/16 is the APIPA range, defined by RFC 3927 rather than RFC 1918. A device assigns itself a 169.254.x.x address when DHCP fails, and CapyToolkit does not treat it as an RFC 1918 range, so the calculator flags it separately. It is usable only for communication with other devices on the same link.
What Is a Broadcast Address?
Because sending a packet to every device on a network requires one specific destination, IPv4 reserves the last address in every subnet as the broadcast address.1 Devices on the subnet receive any packet sent to this address.
What is a broadcast address?
192.168.1.0/24 subnet, the broadcast address is 192.168.1.255.1 Packets addressed to the broadcast address are delivered to all devices on that subnet simultaneously. The broadcast address cannot be assigned to any host because it is reserved alongside the network address, which is why usable host counts are 2 fewer than the total address count.How broadcast addresses are calculated
The broadcast address results from setting all host bits in an IP address to 1. For 192.168.1.0/24, the last 8 bits are the host portion. Setting them all to 1 gives the binary result 11111111 = 255, producing 192.168.1.255. Consequently, for any prefix /n, the broadcast address is the network address with the last (32 − n) bits all set to 1.
Computing the broadcast with bitwise OR
A bitwise OR between the network address and the inverted subnet mask computes this: broadcast = network_address | ~mask. Building on this, a /28 network 192.168.1.48 has a broadcast at 192.168.1.63 because 48 + 15 (the 4-bit host space) equals 63. The subnet calculator performs this calculation for any valid CIDR input. You can verify the result by checking that subtracting one from the broadcast address gives you the last usable host, which is a quick sanity check when documenting subnet plans.
This all-ones convention is not arbitrary: RFC 950 defines the address with all host bits set to one as meaning 'all', as in 'all hosts' on that link, which is precisely why OR-ing the network address with the inverted mask produces a destination that every device on the segment recognizes as addressed to itself. The same RFC treats an all-zero host portion as meaning 'this network', the semantic root of why the lowest address in a subnet is reserved as the network identifier rather than a usable host.
Why broadcasts matter in networking
Broadcast packets underpin several essential network protocols. ARP (Address Resolution Protocol) sends a broadcast when a device needs the MAC address for a given IP2, and every device on the subnet hears the request. These broadcasts are not optional overhead but the actual mechanism through which address resolution and dynamic configuration work on Ethernet networks.
Protocols that depend on broadcast
DHCP Discovery messages are sent to the broadcast address because the requesting client does not yet have an IP and does not know the server's address. Building on this, excessive broadcasts are a scalability concern on large flat networks because each broadcast wakes up every network interface. Consequently, VLANs limit broadcast domains so that an ARP storm in one segment does not flood unrelated devices. Routing stops broadcast traffic at every network boundary, which is why 192.168.1.255 cannot reach a device in a different subnet.
IPv6 and the end of broadcast
IPv6 eliminated broadcast entirely.3 Its designers replaced broadcast with multicast and anycast, which deliver packets only to devices that subscribe to a specific multicast group rather than all devices on a subnet. Yet many protocols that used broadcast in IPv4 still need the same discovery capability in IPv6, and ARP became Neighbor Discovery Protocol (NDP), which uses the IPv6 all-nodes multicast address (ff02::1)4 instead of 255.255.255.255. Building on this, DHCP broadcasts became DHCPv6 messages to ff02::1:2 (the all-DHCP-agents multicast group). The absence of broadcast in IPv6 reduces unnecessary traffic on large segments and is part of why /64 is the standard segment size.
Directed broadcasts and smurf attack prevention
A directed broadcast sends a packet to the broadcast address of a remote subnet (for example, sending to 10.0.1.255 from a host in 10.0.0.0/24). Routers that forward directed broadcasts enable smurf attacks: an attacker sends an ICMP echo request to the directed broadcast address with a spoofed source IP, and every host in the target subnet replies to the victim, amplifying the traffic volume.
Modern routers disable directed broadcast forwarding by default.5 Cisco IOS uses no ip directed-broadcast on each interface; Linux kernels set net.ipv4.icmp_echo_ignore_broadcasts=1. Building on this, the subnet calculator helps you identify broadcast addresses for each segment so you can verify that your router configurations correctly block forwarding to those addresses. For networks that still rely on directed broadcasts (some legacy Wake-on-LAN implementations), explicitly permitting only the required source subnets in the directed broadcast ACL limits the attack surface while preserving the needed functionality.
Broadcast domains and switch behavior
A broadcast domain is the set of devices that receive each other's broadcast frames. In an unmanaged switch, every port belongs to one broadcast domain. VLANs on a managed switch create separate broadcast domains: a broadcast sent on VLAN 10 reaches only ports assigned to VLAN 10, not ports on VLAN 20. The subnet mask defines the IP-level broadcast boundary; the VLAN defines the Layer 2 broadcast boundary. When these two boundaries do not align (for example, a /24 IP range spanning two VLANs), ARP broadcasts from one VLAN never reach hosts in the other, breaking local communication.
Building on this, the subnet calculator's output for each CIDR (network address, broadcast address, usable range) maps directly to one VLAN's broadcast domain, so you can read the results as a complete description of a single segment without cross-referencing separate tools. The broadcast address in the output is the value that every port in that VLAN would receive, which makes it the natural reference point when configuring DHCP scopes and default gateways for the segment.
Mapping one subnet to each broadcast domain
Planning one subnet per VLAN keeps the IP and Layer 2 boundaries synchronized. For environments with private VLANs (a Cisco feature that isolates ports within the same VLAN), the broadcast domain shrinks further: isolated ports can communicate only with the promiscuous port (typically the gateway), not with each other. Consequently, private VLANs add a Layer 2 isolation layer within a single subnet, useful for multi-tenant environments where devices must share a gateway but must not communicate directly.
Try in the tool
Open the IPv4 / IPv6 Subnet & CIDR Calculator tool pre-filled to a broadcast address to verify it or try a different one.
Check a broadcast address in the tool →- 1.
J. Mogul and J. Postel, "Internet Standard Subnetting Procedure," RFC 950, IETF, August 1985. https://www.rfc-editor.org/rfc/rfc950.html
- 2.
D. Plummer, "An Ethernet Address Resolution Protocol," RFC 826, IETF, November 1982. https://datatracker.ietf.org/doc/html/rfc826
- 3.
R. Hinden and S. Deering, "IP Version 6 Addressing Architecture," RFC 4291, IETF, February 2006. https://datatracker.ietf.org/doc/html/rfc4291
- 4.
T. Narten, E. Nordmark, W. Simpson, and H. Soliman, "Neighbor Discovery for IP version 6 (IPv6)," RFC 4861, IETF, September 2007. https://www.rfc-editor.org/rfc/rfc4861.html
- 5.
Cisco, "IP Broadcast Attack Mitigation," cisco.com, accessed June 2026. https://www.cisco.com/c/en/us/support/docs/ip/ip-multicast/12228-12.html
192.168.1.255. All host bits in a /24 are in the last octet. Setting them all to 1 gives 255. The broadcast is always the last address in the subnet.
No. The broadcast address is reserved and cannot be assigned to any device. Attempting to configure a host with the broadcast address causes address conflicts and routing errors on the network.
255.255.255.255 is the limited broadcast, which targets all hosts on the local network segment regardless of subnet mask. A router does not forward it beyond the local link. DHCP Discovery uses 255.255.255.255 because the client does not yet know its subnet broadcast address.
No. IPv6 replaced broadcast with multicast. The all-nodes multicast address ff02::1 serves the role of a broadcast address on the local link, but only devices that have joined the multicast group receive the packets.
One address per subnet is reserved for the broadcast, and one for the network address. This reduces usable hosts by 2 from the total address count. A /24 has 256 total addresses, 2 are reserved, leaving 254 usable, and A /30 has 4 total with 2 usable. CapyToolkit's calculator shows the usable host count for any prefix so you can plan address allocation without manual subtraction.
What Is Network Address Translation (NAT)?
Because IPv4 address space is exhausted, billions of devices share public IPs through NAT. A single public IP can serve thousands of private hosts by tracking connection state on the gateway.
What is NAT?
192.168.1.x) with its single public IP address as packets leave the network, and reverses the translation for returning traffic using a connection tracking table.How NAT works step by step
When a device with IP 192.168.1.10 sends a request to 93.184.216.34, the router intercepts the packet and replaces the source IP 192.168.1.10 with its public IP (for example 203.0.113.5) and records the mapping: public port 45000 → internal 192.168.1.10:52000 in its NAT table. Consequently, the destination server responds to 203.0.113.5:45000, the router looks up port 45000 in its table, and forwards the reply to 192.168.1.10:52000. This entire exchange happens in milliseconds and is completely transparent to the application, which sees only the destination server reply arriving at its own socket.
How the NAT table tracks connections
Building on this, multiple internal devices can reach the internet simultaneously by using different ephemeral port numbers on the same public IP. The NAT table entry expires after the connection closes or a timeout, releasing the port for reuse. Each entry records the internal IP, internal port, public port, and the remote destination so the router can reverse the translation correctly when a response arrives.
RFC 3022 formalizes this mechanism under the term NAPT (Network Address Port Translation), defining the translation as a binding from the tuple of (private address, private port) to the tuple of (assigned public address, assigned public port) for each connection. This tuple-based definition is why a single public IP supports tens of thousands of simultaneous connections: each unique private-address-plus-port combination gets its own binding, not just each private IP address.
SNAT versus DNAT
Source NAT (SNAT) modifies the packet source address, which typically applies to outbound traffic from a private network to the internet. Destination NAT (DNAT) modifies the destination address, which typically applies to inbound traffic to expose a server behind a NAT gateway. Port forwarding is a form of DNAT: packets arriving on public port 443 are redirected to an internal server at 192.168.1.20:443. Furthermore, load balancers implement DNAT to distribute connections across multiple backend servers, so the client connects to one public IP while the load balancer rewrites the destination to a backend server IP. Building on this, cloud providers implement NAT gateways that allow private subnet instances to reach the internet without a public IP, using SNAT to rewrite the source to the NAT gateway's elastic IP.1
NAT and IPv6
IPv6's enormous address space (2^128 addresses) means every device can have a globally unique IP without NAT. Yet NAT persists in IPv6 deployments as NAT66 (IPv6-to-IPv6 translation) or as part of carrier-grade NAT in mobile networks. Building on this, IPv6 Unique Local Addresses (fc00::/7) serve a similar role to RFC 1918 private ranges and sometimes appear behind NAT66 when an organization does not want to expose its internal IPv6 structure externally.2 Consequently, NAT64, which translates between IPv4 and IPv6, is used in transition scenarios where IPv6-only clients need to reach IPv4-only services. The long-term vision for IPv6 is a fully NAT-free internet, but practical deployments still include NAT for security segmentation and privacy.
NAT traversal techniques for peer-to-peer applications
Peer-to-peer applications (VoIP, video calls, gaming, file sharing) struggle behind NAT because inbound connections are blocked by default. NAT traversal techniques solve this by establishing outbound connections first, then punching holes through the NAT mapping table. STUN (Session Traversal Utilities for NAT) lets a device discover its public IP and port by querying a STUN server,3 which the application then shares with the remote peer.
Why symmetric NAT breaks peer-to-peer
When STUN fails (as it does with symmetric NATs, where each destination gets a unique port mapping), TURN (Traversal Using Relays around NAT) relays all traffic through a server.4 Building on this, ICE (Interactive Connectivity Establishment) combines STUN and TURN: it tries direct connectivity first, falls back to STUN-reflexive addresses, and uses TURN relay as a last resort.5 Consequently, most modern VoIP and WebRTC applications implement ICE by default, which is why video calls work from behind home routers without manual port forwarding. Understanding which NAT type your router uses (full-cone, restricted-cone, port-restricted, symmetric) explains why some P2P applications work reliably and others do not.
NAT in cloud environments: SNAT port exhaustion
Cloud NAT gateways (AWS NAT Gateway, Azure NAT Gateway, GCP Cloud NAT) perform SNAT for instances in private subnets, exactly like a home router but at much larger scale. Each connection from a private instance consumes one SNAT port on the NAT gateway's public IP. A single NAT gateway supports approximately 64,512 concurrent connections per IP address (the ephemeral port range 1024–65535).
Detecting SNAT port exhaustion before it causes outages
When a private subnet runs thousands of microservices making outbound API calls, SNAT port exhaustion occurs: new connections fail with timeout errors even though the NAT gateway shows no CPU or bandwidth issues. Building on this, AWS recommends distributing outbound traffic across multiple NAT gateways (one per AZ) or using a NAT instance with multiple elastic IPs to multiply the available port pool. Azure NAT Gateway assigns a minimum of 64,000 SNAT ports per public IP and supports up to 16 IPs, giving over 1 million concurrent connections. Monitoring SNAT port allocation metrics in CloudWatch or Azure Monitor catches exhaustion before it causes production outages.
Try in the tool
What to look for
- Total IPv4 address space about 4.3 billion addresses
Open the IPv4 / IPv6 Subnet & CIDR Calculator tool to try this yourself.
Open the tool →- 1.
P. Srisuresh and M. Holdrege, "Traditional IP Network Address Translator (Traditional NAT)," RFC 3022, IETF, January 2001. https://www.rfc-editor.org/rfc/rfc3022.html
- 2.
"Network Address Translation," Wikipedia, accessed June 2026. https://en.wikipedia.org/wiki/Network_address_translation
- 3.
J. Rosenberg, R. Mahy, P. Matthews, and D. Wing, "Session Traversal Utilities for NAT (STUN)," RFC 5389, IETF, October 2008. https://datatracker.ietf.org/doc/html/rfc5389
- 4.
R. Mahy, P. Matthews, and J. Rosenberg, "Traversal Using Relays around NAT (TURN)," RFC 5766, IETF, October 2010. https://www.rfc-editor.org/rfc/rfc5766.html
- 5.
A. Keranen, C. Holmberg, and J. Rosenberg, "Interactive Connectivity Establishment (ICE): A Protocol for Network Address Translator (NAT) Traversal," RFC 8445, IETF, July 2020. https://datatracker.ietf.org/doc/html/rfc8445
IPv4 has only about 4.3 billion addresses. NAT allows millions of devices to share a single public IP by tracking connection state. Without NAT, IPv4 address exhaustion would have made internet growth impossible well before IPv6 adoption.
NAT translates addresses. A firewall filters packets based on rules. Home routers combine both: NAT hides internal addresses, and implicit firewall rules block unsolicited inbound connections to private IPs. They are separate functions often running on the same device.
Yes. Applications that embed their IP address in the application payload (like older FTP, SIP VoIP, and some peer-to-peer protocols) break behind NAT unless the NAT device has specific support called an Application Layer Gateway (ALG). CapyToolkit does not depend on NAT because all processing happens locally in your browser, yet understanding ALG requirements still matters when troubleshooting why a specific application fails behind a home router. Modern protocols are designed to avoid this problem.
Carrier-grade NAT (CGNAT) is NAT applied by an ISP to translate hundreds or thousands of customers through a single public IP. It adds an extra NAT layer beyond the customer's home router, which can break applications that rely on a consistent public IP and makes port forwarding impossible without ISP cooperation.
IPv6 provides enough addresses for every device to have a public IP without NAT. However, many organizations use NAT for security segmentation even in IPv6 deployments. NAT66 and NAT64 persist in transition scenarios. Full NAT elimination depends on complete IPv6 adoption.