Networking & Routing

What is Subnet?

Also known as: Subnetwork

Definition

A logical subdivision of an IP network, created by borrowing host bits to form a subnet identifier, allowing efficient address allocation and traffic isolation within a larger network.

A subnet (short for subnetwork) is a logical partition of an IP network. In IPv4, a subnet is defined by an IP address combined with a subnet mask (or prefix length in CIDR notation), which separates the address into a network portion and a host portion. By extending the network prefix beyond the default classful boundary, administrators can create multiple smaller networks from a single larger address block.

Subnetting works by borrowing bits from the host part of the address. For example, a /24 network (255.255.255.0) provides 254 host addresses. If you borrow one bit from the host field, you get two /25 subnets, each with 126 usable hosts. Routers use the subnet mask to determine whether a destination address is local or must be forwarded to another subnet. All devices on the same subnet can communicate directly at Layer 2; traffic to a different subnet must go through a router or Layer 3 switch.

Subnets are fundamental to IPv4 address management. They reduce broadcast domain size, improve security by isolating traffic, and make routing tables more efficient through route summarization. IPv6 also uses subnetting, typically with a /64 prefix as the standard subnet size for a LAN. The concept is defined in RFC 950 for standard subnetting and RFC 4632 for CIDR, which supersedes classful addressing.

Key facts

  • A subnet mask (e.g., 255.255.255.0) or CIDR prefix (e.g., /24) defines the boundary between network and host bits.
  • Subnetting reduces broadcast domain size, limiting unnecessary traffic and improving network performance.
  • Routers use the subnet mask to decide whether a packet's destination is on the local subnet or requires forwarding.
  • IPv6 almost universally uses /64 subnets for LAN segments, allowing Stateless Address Autoconfiguration (SLAAC).
  • CIDR (RFC 4632) replaced classful subnetting in 1993, enabling variable-length subnet masks (VLSM).

How it works in practice

A company owns the IPv4 block 192.168.1.0/24. It has two departments: Engineering and Sales. The network engineer creates two /25 subnets: 192.168.1.0/25 (hosts .1-.126) for Engineering and 192.168.1.128/25 (hosts .129-.254) for Sales. A router connects the two subnets and enforces access control policies between them. Each subnet can accommodate up to 126 devices, and broadcasts from one side never reach the other.

Related terms

CIDR Subnet Mask VLSM Supernet Broadcast Domain Default Gateway IPv4

References

More in Networking & Routing

Anycast

Anycast is a network addressing and routing method where a single IP address is assigned to multiple servers, and routers send traffic to the nearest server based on routing protocol metrics.

AS Path

A BGP path attribute that lists the sequence of autonomous system numbers a route has passed through, used for loop detection and path selection.

ASN

A globally unique 16 or 32 bit number assigned to an autonomous system for use in BGP routing between organizations on the Internet.

Autonomous System

An Autonomous System (AS) is a group of IP networks under a single administrative routing policy, identified by a unique ASN (Autonomous System Number) for exterior gateway routing.

BGP

BGP (Border Gateway Protocol) is the path vector routing protocol that networks use to exchange reachability information between autonomous systems on the public internet.

CIDR

CIDR (Classless Inter-Domain Routing) is a method for allocating IP addresses and routing packets using variable-length subnet masks (e.g., /24) instead of fixed classful boundaries.

Hop

A hop is one passage of a packet through a router or other layer-3 forwarding device as it travels from source to destination across an internetwork.

IPv4

IPv4 is the core Internet Protocol using 32-bit addresses, providing roughly 4.3 billion unique identifiers for network interfaces on the global internet.

IPv6

IPv6 is the most recent version of the Internet Protocol, using 128-bit addresses to provide an effectively unlimited number of unique identifiers for networked devices.

Latency

Latency (or round-trip time, RTT) is the time required for a packet to travel from a source to a destination and back, measured in milliseconds, and is a critical metric in network performance.

Who Is Online

In total there are 76 users online: 0 registered, 70 guests and 6 bots.

Bots: AhrefsBot Facebook Majestic Other Bot Other Spider SemrushBot

Users active in the past 15 minutes. Total registered members: 340