From Wikipedia, the free encyclopedia
Jump to: navigation, search
A graphic representation of relationships and source of the various variables representing a chunk of C subnets

A subnetwork is a logical partitioning of a computer network. Subnetting is the process by which a computer network is logically divided regardless of the physical layout of a network. It was originally introduced before the introduction of classful network numbers in IPv4, to allow a single larger network to have a number of smaller networks within it.

It has had an impact in mitigation of the IPv4 address shortage problem , along with private networks and NAT.

Network address[edit]

Computer and devices that are part of networks all have a network address. The network address is unique to that device and can either be dynamically or statically configured. This address allows the device to communicate with other devices connected to the network. The most common network addressing scheme is IPv4. The IPv4 network address consists of a 32 bit address divided into 4 octets and a subnet mask of like size. In order to facilitate the routing process the address is divided into two pieces. The network address and the host address. This works much like a postal address where the network address would represent the city and the host address would represent the street address. The subnet mask is used in conjunction with the network address to determine which part of the address is the network address and which part is the host address.

Binary subnet masks[edit]

While subnet masks are often represented in dot-decimal form their use becomes clearer in binary. Looking at a network address and a subnet mask in binary a device can determine which part of the address is the network address and which part is the host address. To do this, it performs a logical "AND" operation.


Dot-decimal Address Binary
Full Network Address 11000000.10101000.00000101.00001010
Subnet Mask 11111111.11111111.11111111.00000000
Network Portion 11000000.10101000.00000101.00000000

Subnet masks consist of a series of 1s in binary followed by 0s. The 1s designate that part of the address as being part of the network portion and the 0s designate that part as being part of the host address. Subnet Masks do not have to fill a given octet. This allows a classful network to be broken down into subnets. A classful network is a network that has a subnet mask of, or Subnet masks can also be expressed in a shorter form, which is known as Classless Inter-Domain Routing (CIDR) notation, gives the network number followed by a slash ("/") and the number of 'one' bits in the binary notation of the netmask (i.e. the number of relevant bits in the network number). For example, indicates an IP address where the first 24 bits are used as network address (same as

IPv4 classes[edit]

IPv4 addresses are broken down into three parts: the network part, the subnet part (now often considered part of the network part, although originally it was part of the rest part), and the host part. There are three classes of IP address which determine how much is which

Class Leading bits Start End Default Subnet Mask in dotted decimal CIDR notation
A 0 /8
B 10 /16
C 110 /24
D 1110
E 1111

The network is left out because it is designated for loopback and cannot be assigned to a network

Class D multicasting

Class E reserved

Subnetting is the process of allocating bits from the host portion as a network portion. The above example shows the logical "AND" process being performed on a classful network. The following example shows bits being borrowed to turn a classful network into a subnet.



Dot-decimal Address Binary
Full Network Address 11000000.10101000.00000101.10000010
Subnet Mask 11111111.11111111.11111111.11000000
Network Portion 11000000.10101000.00000101.10000000

In this example two bits were borrowed from the original host portion. This is beneficial because it allows a single network portion to be split into several smaller network portions. By design IPv4 address are limited in number and each classful network portion is capable of supporting a finite number of hosts. A classful C address for example has space for 254 hosts. If a network were to be split into four parts using classful address four different class C addresses would have to be used to serve those networks. Using the subnetting example above if each subnetwork were to have 62 hosts or less (see below for math) a single class C address could be split up to service the entire network while wasting the fewest host addresses.

Subnets and host count[edit]

It is possible to determine the amount hosts and subnetworks available for any subnet mask. In the above example two bits were borrowed to create subnetworks.

possible subnets available according to RFC 1812, otherwise using the old RFC 950 standard the number of usable subnets is 6. This is due to RFC 950 (section 2.1, page 5) not supporting subnets with either all 1s or all 0s.

possible hosts available to each subnetwork (2 addresses are reserved and cannot be used for hosts: subnet identifier (the first) and broadcast address (the last)).

Private subnets[edit]

The Internet Assigned Numbers Authority (IANA) has reserved the following three blocks of the IP address space for private networks:

Network address range CIDR notation - /8 - /12 - /16


  • RFC 950 Internet Standard Subnetting Procedure
  • RFC 1812 New Internet Subnetting Procedure
  • RFC 950 Utility of subnets of Internet networks
  • RFC 1101 DNS Encodings of Network Names and Other Types

See also[edit]


  • Understanding IP Addressing - Everything You Ever Wanted To Know : "[1]".  External link in |title= (help); [2] (PDF, May 2001, 1.08 MB, 76 pages , 3COM)

[[Category:Routing]] [[Category:Network addressing]] [[Category:Internet architecture]]