World Library  
Flag as Inappropriate
Email this Article


Article Id: WHEBN0000149426
Reproduction Date:

Title: Subnetwork  
Author: World Heritage Encyclopedia
Language: English
Subject: UDP Helper Address, Broadcast address, IPv4 subnetting reference, Routing Information Protocol, Computer network
Collection: Internet Architecture, Network Addressing, Routing
Publisher: World Heritage Encyclopedia


Creating a subnet by dividing the host identifier

A subnetwork, or subnet, is a logical, visible subdivision of an IP network.[1] The practice of dividing a network into two or more networks is called subnetting.

Computers that belong to a subnet are addressed with a common, identical, most-significant bit-group in their IP address. This results in the logical division of an IP address into two fields, a network or routing prefix and the rest field or host identifier. The rest field is an identifier for a specific host or network interface.

The routing prefix is expressed in CIDR notation. It is written as the first address of a network, followed by a slash character (/), and ending with the bit-length of the prefix. For example, is the prefix of the Internet Protocol Version 4 network starting at the given address, having 24 bits allocated for the network prefix, and the remaining 8 bits reserved for host addressing. The IPv6 address specification 2001:db8::/32 is a large address block with 296 addresses, having a 32-bit routing prefix. For IPv4, a network is also characterized by its subnet mask, which is the bitmask that when applied by a bitwise AND operation to any IP address in the network, yields the routing prefix. Subnet masks are also expressed in dot-decimal notation like an address. For example, is the network mask for the prefix.

Traffic is exchanged (routed) between subnetworks with special gateways (routers) when the routing prefixes of the source address and the destination address differ. A router constitutes the logical or physical boundary between the subnets.

The benefits of subnetting an existing network vary with each deployment scenario. In the address allocation architecture of the Internet using

  • Cisco-IP Addressing and Subnetting for New Users
  • Subnetworking at DMOZ
  • Netmask Quick Reference Chart

External links

  • RFC 1812 Requirements for IPv4 Routers
  • RFC 917 Utility of subnets of Internet networks
  • RFC 1101 DNS Encodings of Network Names and Other Type
  • Blank, Andrew G. TCP/IP Foundations Technology Fundamentals for IT Success. San Francisco, London: Sybex, Copyright 2004.
  • Lammle, Todd. CCNA Cisco Certified Network Associate Study Guide 5th Edition. San Francisco, London: Sybex, Copyright 2005.
  • Groth, David and Toby Skandier. Network + Study Guide, 4th Edition. San Francisco, London: Wiley Publishing, Inc., Copyright 2005.

Further reading

  1. ^ RFC 950, Internet Standard Subnetting Procedure, J. Mogul, J. Postel (August 1985), page 1, 16
  2. ^ RFC 1122, Requirements for Internet Hosts -- Communication Layers, Section 3.3.1, R. Braden, IETF (October 1989)
  3. ^ RFC 4861, Neighbor Discovery for IP version 6 (IPv6), T. Narten et al. (September 2007)
  4. ^ RFC 5942, IPv6 Subnet Model: The Relationship between Links and Subnet Prefixes, H. Singh, W. Beebee, E. Nordmark (July 2010)
  5. ^ "Document ID 13711 - Subnet Zero and the All-Ones Subnet".  
  6. ^ "Document ID 13711 - Subnet Zero and the All-Ones Subnet".  
  7. ^ "Document ID 13711 - Subnet Zero and the All-Ones Subnet".  
  8. ^ RFC 950, Jeffrey Mogul;  
  9. ^ RFC 1878, Troy Pummill; Bill Manning (December 1995). "Variable Length Subnet Table For IPv4". This practice is obsolete! Modern software will be able to utilize all definable networks.  (Informational RFC, demoted to category Historic)
  10. ^ VLSM Subnetting Chart published 13-May-2007 provided within correct information within: Network Funadmentals CCNA Exploration Companion Guide (c) 2008 by Dye, McDonald, Rufi (Cisco Networking Academy Publishers)
  11. ^ Cisco IOS® Software Releases prior to Cisco, "Enhanced Interior Gateway Routing Protocol", Cisco Document ID 164061.
  12. ^ RFC 4291, "IP Version 6 Addressing Architecture - section 2.5.1. Interface Identifiers". Internet Engineering Task Force. Retrieved 2011-02-13. For all unicast addresses, except those that start with the binary value 000, Interface IDs are required to be 64 bits long and to be constructed in Modified EUI-64 format. 
  13. ^ RFC 4862, "IPv6 Stateless Address Autoconfiguration - section 5.5.3.(d) Router Advertisement Processing". Internet Engineering Task Force. Retrieved 2011-02-13. It is the responsibility of the system administrator to ensure that the lengths of prefixes contained in Router Advertisements are consistent with the length of interface identifiers for that link type. [...] an implementation should not assume a particular constant. Rather, it should expect any lengths of interface identifiers. 
  14. ^ RFC 2464, "Transmission of IPv6 Packets over Ethernet Networks - section 4 Stateless Autoconfiguration". Internet Engineering Task Force. The Interface Identifier [AARCH] for an Ethernet interface is based on the EUI-64 identifier [EUI64] derived from the interface's built-in 48-bit IEEE 802 address. [...] An IPv6 address prefix used for stateless autoconfiguration [ACONF] of an Ethernet interface must have a length of 64 bits. 
  15. ^ RFC 6164, "Using 127-Bit IPv6 Prefixes on Inter-Router Links". Internet Engineering Task Force. On inter-router point-to-point links, it is useful, for security and other reasons, to use 127-bit IPv6 prefixes. 
  16. ^ RFC 6547, "RFC 3627 to Historic Status". Internet Engineering Task Force. This document moves "Use of /127 Prefix Length Between Routers Considered Harmful" (RFC 3627) to Historic status to reflect the updated guidance contained in "Using 127-Bit IPv6 Prefixes on Inter-Router Links" (RFC 6164). 
  17. ^ RFC 4291, "IP Version 6 Addressing Architecture - section 2 IPv6 Addressing". Internet Engineering Task Force. There are no broadcast addresses in IPv6, their function being superseded by multicast addresses. [...] In IPv6, all zeros and all ones are legal values for any field, unless specifically excluded. 
  18. ^ RFC 4291, "IP Version 6 Addressing Architecture - section 2.6.1 Required Anycast Address". Internet Engineering Task Force. This anycast address is syntactically the same as a unicast address for an interface on the link with the interface identifier set to zero. 
  19. ^ "IPv6 Addressing Plans". ARIN IPv6 Wiki. Retrieved 2010-04-25. All customers get one /48 unless they can show that they need more than 65k subnets. [...] If you have lots of consumer customers you may want to assign /56s to private residence sites. 
  20. ^ "IPv6 Address Assignment to End Sites". Internet Engineering Task Force. Retrieved 11 November 2013. APNIC, ARIN, and RIPE have revised the end site assignment policy to encourage the assignment of smaller (i.e., /56) blocks to end sites. 


See also

Subnetting in IPv6 is based on the concepts of variable-length subnet masking (VLSM) and the Classless Inter-Domain Routing methodology. It is used to route traffic between the global allocation spaces and within customer networks between subnets and the Internet at large.

The recommended allocation for an IPv6 customer site was an address space with an 48-bit (/48) prefix.[19] However, this recommendation was revised to encourage smaller blocks, for example using 56-bit prefixes.[20] Another common allocation is a /64 prefix for a residential customer network.

IPv6 does not implement special address formats for broadcast traffic or network numbers,[17] and thus all addresses in a subnet are valid host addresses. The all-zeroes address is reserved as the Subnet-Router anycast address.[18]

An RFC 4291 compliant subnet always uses IPv6 addresses with 64 bits for the host portion.[12] It therefore has a /64 routing prefix (128−64 = the 64 most significant bits). Although it is technically possible to use smaller subnets,[13] they are impractical for local area networks based on Ethernet technology, because 64 bits are required for stateless address auto configuration.[14] The Internet Engineering Task Force recommends the use of /127 subnets for point-to-point links, which consist of only two hosts.[15][16]

The design of the IPv6 address space differs significantly from IPv4. The primary reason for subnetting in IPv4 is to improve efficiency in the utilization of the relatively small address space available, particularly to enterprises. No such limitations exist in IPv6, as the large address space available, even to end-users, is not a limiting factor.

IPv6 subnetting

*only applicable for point-to-point links

Prefix size Network mask Available
Usable hosts
per subnet
usable hosts
/24 1 254 254
/25 2 126 252
/26 4 62 248
/27 8 30 240
/28 16 14 224
/29 32 6 192
/30 64 2 128
/31 128 2 * 256

A /24 network may be divided into the following subnets by increasing the subnet mask successively by one bit. This affects the total number of hosts that can be addressed in the /24 network (last column).

RFC 3021 specifies an exception to this rule for 31-bit subnet masks, which means the host identifier is only one bit long for two permissible addresses. In such networks, usually point-to-point links, only two hosts (the end points) may be connected and a specification of network and broadcast addresses is not necessary.

In general the number of available hosts on a subnet is 2h-2, where h is the number of bits used for the host portion of the address. The number of available subnets is 2n, where n is the number of bits used for the network portion of the address. This is the RFC 1878 standard used by the IETF, the IEEE and COMPTIA.

Only legacy technology not capable of using CIDR default in accordance with the RFC 1878 standard required the subtraction of subnets, one at the beginning of the range and one at the end of the range. Cisco added to this confusion by the use of subtracting from the subnet formula in its publications, for so-called usable subnets up until 2007. Cisco routers, by default, did not allow an IP address belonging to subnet zero to be configured on an interface.[10][11]

For example, under CIDR /28 all 16 subnets are usable. Each broadcast, i.e. .15 .31 - .255 comes off the client count, not the network, thus making the last subnet also usable.

The all-zeros value and all-ones values are reserved for the network address and broadcast address respectively. In systems that can handle CIDR a count of two is therefore subtracted from the host availability, rather than the subnet availability, making all 2n subnets available and removing a need to subtract two subnets.

The remaining bits after the subnet bits are used for addressing hosts within the subnet. In the above example the subnet mask consists of 26 bits, leaving 6 bits for the host identifier. This allows for 62 host combinations (26-2).

CIDR-compliant routing protocols transmit both length and suffix. RFC 1878 provides a subnetting table with examples.

The RFC 950 specification recommended reserving the subnet values consisting of all zeros (see above) and all ones (broadcast), reducing the number of available subnets by two. However, due to the inefficiencies introduced by this convention it was abandoned for use on the public Internet, and is only relevant when dealing with legacy equipment that does not implement CIDR. The only reason not to use the all-zeroes subnet is that it is ambiguous when the prefix length is not available. RFC 950 itself did not make the use of the zero subnet illegal; it was however considered best practice by engineers.

Network Network (binary) Broadcast address 11000000.10101000.00000101.00000000 11000000.10101000.00000101.01000000 11000000.10101000.00000101.10000000 11000000.10101000.00000101.11000000

The number of subnetworks available, and the number of possible hosts in a network may be readily calculated. In the example (above) two bits were borrowed to create subnetworks, thus creating 4 (22) possible subnets.

Subnet and host counts

The IETF originally discouraged the production use of these two subnets due to possible confusion of having a network and subnet with the same address.[8] The practice of avoiding subnet zero and the all-ones subnet was declared obsolete in 1995 by RFC 1878, an informational, but now historical document.[9]

The first subnet obtained from subnetting has all bits in the subnet bit group set to zero (0). It is therefore called subnet zero.[6] The last subnet obtained from subnetting has all bits in the subnet bit group set to one (1). It is therefore called the all-ones subnet.[7]

Subnet zero and the all-ones subnet

Internet Protocol version 4 uses specially designated address formats to facilitate recognition of special address functionality. The first and the last subnets obtained by subnetting have traditionally had a special designation and, early on, special usage implications.[5] In addition, IPv4 uses the all ones host address, i.e. the last address within a network, for broadcast transmission to all hosts on the link.

Special addresses and subnets

Binary form Dot-decimal notation
IP address 11000000.10101000.00000101.10000010
Subnet mask 11111111.11111111.11111111.11000000
Network prefix 11000000.10101000.00000101.10000000
Host part 00000000.00000000.00000000.00000010

Subnetting is the process of designating some high-order bits from the host part and grouping them with the network mask to form the subnet mask. This divides a network into smaller subnets. The following diagram modifies the example by moving 2 bits from the host part to the subnet mask to form four smaller subnets one quarter the previous size:


The mathematical operation for calculating the network prefix is the bitwise AND of IP address and subnet mask. The result of the operation yields the network prefix The host part 130 can be derived by using bitwise AND of IP address and one's complement of the subnet mask.

Binary form Dot-decimal notation
IP address 11000000.10101000.00000101.10000010
Subnet mask 11111111.11111111.11111111.00000000
Network prefix 11000000.10101000.00000101.00000000
Host part 00000000.00000000.00000000.10000010

The following example shows the separation of the network prefix and the host identifier from an address ( and its associated /24 network mask ( The operation is visualized in a table using binary address formats.

An IPv4 network mask consists of 32 bits, a sequence of ones (1) followed by a block of 0s. The trailing block of zeros (0) designates that part as being the host identifier.

Determining the network prefix

The process of subnetting involves the separation of the network and subnet portion of an address from the host identifier. This is performed by a bitwise AND operation between the IP address and the (sub)network mask. The result yields the network address or prefix, and the remainder is the host identifier.

IPv4 subnetting

While subnetting may improve network performance in an organizational network, it increases routing complexity, since each locally connected subnet must be represented by a separate entry in the routing tables of each connected router. However, by careful design of the network, routes to collections of more distant subnets within the branches of a tree-hierarchy can be aggregated by single routes. Variable-length subnet masking (VLSM) functionality in commercial routers made the introduction of CIDR seamless across the Internet and in enterprise networks.

In IPv4, on-link determination for an IP address is given simply by the address and netmask configuration, as the address cannot be disassociated from the on-link prefix.[2] For IPv6, however, on-link determination is different in detail and requires the Neighbor Discovery Protocol (NDP).[3][4] IPv6 address assignment to an interface carries no requirement of a matching on-link prefix and vice versa, with the exception of link-local addresses.

In classful networking in IPv4, prior to the introduction of CIDR, the network prefix could be directly obtained from the IP address, based on its highest order bit sequence. This determined the class (A, B, C) of the address and therefore the network mask. Since the introduction of CIDR, however, assignment of an IP address to a network interface requires two parameters, the address and its network mask.

This notation was introduced with Classless Inter-Domain Routing (CIDR) in RFC 4632. In IPv6 this is the only acceptable form to denote network or routing prefixes.

  •, netmask is written as
  • In IPv6, 2001:db8::/32 designates the address 2001:db8:: and its network prefix consisting of the most significant 32 bits.

The modern standard form of specification of the network prefix is CIDR notation, used for both IPv4 and IPv6. It counts the number of bits in the prefix and appends that number to the address after a slash (/) character separator:

The routing prefix of an address is written in a form identical to that of the address itself. This is called the network mask, or subnet mask, of the address. For example, a specification of the most-significant 18 bits of an IPv4 address, 11111111.11111111.11000000.00000000, is written as If this mask designates a subnet within a larger network, it is also called the subnet mask. This form of denoting the network mask, however, is only used for IPv4 networks.

This logical addressing structure permits the selective routing of IP packets across multiple networks via special gateway computers, called routers, to a destination host if the network prefixes of origination and destination hosts differ, or sent directly to a target host on the local network if they are the same. Routers constitute logical or physical borders between the subnets, and manage traffic between them. Each subnet is served by a designated default router, but may consist internally of multiple physical Ethernet segments interconnected by network switches or network bridges.

For the purpose of network management, an IP address is divided into two logical parts, the network prefix and the host identifier or rest field. All hosts on a subnetwork have the same network prefix. This routing prefix occupies the most-significant bits of the address. The number of bits allocated within a network to the internal routing prefix may vary between subnets, depending on the network architecture. While in IPv6 the prefix must consist of a set of contiguous 1-bits, in IPv4 this is not enforced, though there is no advantage to using non-contiguous 1-bits. The host part is a unique local identification and is either a host number on the local network or an interface identifier.

An address fulfills the functions of identifying the host and locating it on the network. The most common network addressing architecture is Internet Protocol version 4 (IPv4), but its successor, IPv6, has been increasingly deployed since approximately 2006. An IPv4 address consists of 32 bits, for readability written in a form consisting of four decimal octets separated by dots, called dot-decimal notation. An IPv6 address consists of 128 bits written in a hexadecimal notation and grouping 16 bits separated by colons.

Computers participating in a network such as the Internet each have at least one logical address. Usually this address is unique to each device and can either be configured automatically with the Dynamic Host Configuration Protocol (DHCP) by a network server, manually by an administrator, or automatically by stateless address autoconfiguration.

Network addressing and routing

  • Network addressing and routing 1
  • IPv4 subnetting 2
    • Determining the network prefix 2.1
    • Subnetting 2.2
    • Special addresses and subnets 2.3
      • Subnet zero and the all-ones subnet 2.3.1
    • Subnet and host counts 2.4
  • IPv6 subnetting 3
  • See also 4
  • References 5
  • Further reading 6
  • External links 7


This article was sourced from Creative Commons Attribution-ShareAlike License; additional terms may apply. World Heritage Encyclopedia content is assembled from numerous content providers, Open Access Publishing, and in compliance with The Fair Access to Science and Technology Research Act (FASTR), Wikimedia Foundation, Inc., Public Library of Science, The Encyclopedia of Life, Open Book Publishers (OBP), PubMed, U.S. National Library of Medicine, National Center for Biotechnology Information, U.S. National Library of Medicine, National Institutes of Health (NIH), U.S. Department of Health & Human Services, and, which sources content from all federal, state, local, tribal, and territorial government publication portals (.gov, .mil, .edu). Funding for and content contributors is made possible from the U.S. Congress, E-Government Act of 2002.
Crowd sourced content that is contributed to World Heritage Encyclopedia is peer reviewed and edited by our editorial staff to ensure quality scholarly research articles.
By using this site, you agree to the Terms of Use and Privacy Policy. World Heritage Encyclopedia™ is a registered trademark of the World Public Library Association, a non-profit organization.

Copyright © World Library Foundation. All rights reserved. eBooks from World eBook Library are sponsored by the World Library Foundation,
a 501c(4) Member's Support Non-Profit Organization, and is NOT affiliated with any governmental agency or department.