The Broadband Guide
search advanced
 forgot password?

Subnetting and IPv4 Address Classes

2005-10-20 (updated: 2009-11-09) by
Tags: , , , ,

Subnetting Concept

Subnetting an IP network allows for the flow of network traffic to be segregated based on a network configuration. It essentially organizes the hosts into logical groups, and provides for improving network security and performance. The most common reason for subnetting IP networks is to control network traffic. Traditionally, in an Ethernet network, it is very common for all nodes on a segment to see all the packets transmitted by all the other nodes on that segment, which introduces collisions, and the resulting retransmissions under heavy traffic loads. For additional information on subnetting, see RFC 1817, and RFC 1812.


IPv4 TCP/IP Subnet Table

While subnetting might be easy enough to grasp as a concept, it can be a bit involved, and even mind-boggling in part due to the required manipulations of binary numbers. Many people understand the ideas behind subnetting, but find it hard to follow the actual steps required to subnet a network. The table bellow is intended as a quick reference and a fairly complete example of IPv4 subnetting.

Subnet Mask (Netmask) Binary CIDR Hosts* Inverse Mask** Notes 11111111.11111111.11111111.11111111 /32 1 single host mask 11111111.11111111.11111111.11111110 /31 0   unusable mask, no host bits 11111111.11111111.11111111.11111100 /30 2 11111111.11111111.11111111.11111000 /29 6 11111111.11111111.11111111.11110000 /28 14 11111111.11111111.11111111.11100000 /27 30 11111111.11111111.11111111.11000000 /26 62 11111111.11111111.11111111.10000000 /25 126 11111111.11111111.11111111.00000000 /24 254 1 Class C network
   11111111.11111111.11111110.00000000 /23 510 2 Class C networks 11111111.11111111.11111100.00000000 /22 1022 4 Class C 11111111.11111111.11111000.00000000 /21 2046 8 Class C 11111111.11111111.11110000.00000000 /20 4094 16 Class C 11111111.11111111.11100000.00000000 /19 8190 32 Class C 11111111.11111111.11000000.00000000 /18 16382 64 Class C 11111111.11111111.10000000.00000000 /17 32766 128 Class C 11111111.11111111.00000000.00000000 /16 65534 1 Class B Network (255 Class C)
   11111111.11111110.00000000.00000000 /15 131070 2 Class B networks 11111111.11111100.00000000.00000000 /14 262142 4 Class B 11111111.11111000.00000000.00000000 /13 524286 8 Class B 11111111.11110000.00000000.00000000 /12 1M 16 Class B 11111111.11100000.00000000.00000000 /11 2M 32 Class B 11111111.11000000.00000000.00000000 /10 4M 64 Class B 11111111.10000000.00000000.00000000 /9 8M 128 Class B 11111111.00000000.00000000.00000000 /8 16M 1 Class A Network (255 Class B)
   11111110.00000000.00000000.00000000 /7 32M 2 Class A 11111100.00000000.00000000.00000000 /6 64M 11111000.00000000.00000000.00000000 /5 128M 11110000.00000000.00000000.00000000 /4 256M 11100000.00000000.00000000.00000000 /3 512M 11000000.00000000.00000000.00000000 /2 1024M 10000000.00000000.00000000.00000000 /1 2048M 00000000.00000000.00000000.00000000 /0 4096M  

* Usable Hosts - (2^N-2) method.

** Inverse mask is calculated by subtracting each subnet mask octet value from 255. The inverse mask is primarily used in Cisco access control lists (ACLs). The rationale behind an inverse mask is that logical ANDing an inverse mask and an IP address gives the host portion of the address, instead of the network / subner portion that a standard subnet mask would. This is of more interest to certain TCP/IP functions.

Notes:  Certain potions of the IPv4 address space are specifically allocated by RFCs for special uses, such as loopback (RFC 1643), private networks (RFC 1918), and zeroconf (RFC 3927) usage.


IPv4 Address Classes

Class Address Ranges

Class A - to
Class B - to
Class C - to

Class D* - to
Class E* - to

Class A, Class B, and Class C are the three classes of addresses used on IP networks in common practice. Class D addresses are reserved for multicast. Class E addresses are simply reserved, meaning they should not be used on IP networks (used on a limited basis by some research organizations for experimental purposes).


Reserved Address Ranges

Address ranges below are reserved by IANA for private intranets, and not routable to the Internet. For additional information, see RFC 1918. - (10/8 prefix) - (172.16/12 prefix) - (192.168/16 prefix)


Other reserved addresses: is reserved for loopback and IPC on the localhost. - is reserved for multicast addresses. is the limited broadcast address (limited to all other nodes on the LAN)


  User Reviews/Comments:
by anonymous - 2007-05-02 07:46
Thanks, really nice explanation
by unix13 - 2007-05-08 02:14
What a good explanation.... Thanks a lot guys....
by cody - 2009-05-16 10:39
good reference for public..thanks,
by anonymous - 2010-06-24 08:59
Brief and concise
by anonymous - 2011-04-18 23:15
great explanation...thx a lot
by Blagoev - 2011-05-12 05:52
Well,that explane alot :)
by Paul - 2011-11-07 18:49
Class C - to
by Paul - 2011-11-07 18:51
My own correction :o)

Class C - to
by anonymous - 2011-11-10 02:56
Thanks yaar, good one :)
by anonymous - 2012-06-29 07:43
Thank you so much,good material for beginner.
by zuleikha - 2013-08-19 10:15
Hey, thanks for sharing a nice piece of information, but i have a query. My teacher told me that the valid network number in class B is from till and not till I am really confused why. Can any one please help me out?
by nasir - 2013-09-04 05:06
it is realy good information to the classes of ipv4 addresses
by anonymous - 2013-11-17 15:00
This is the first time I'm commenting on an article because i found it immensely useful. You read this once and thats it, it just gets registered in your mind forever. Hats off to the author.
by CCNA bound - 2014-02-09 16:51
Great Reference
by anonymous - 2014-05-03 13:10
THANX well explained keep it up
by Robert - 2015-08-13 11:19
News Glossary of Terms FAQs Polls Cool Links SpeedGuide Teams SG Premium Services SG Gear Store
Registry Tweaks Broadband Tools Downloads/Patches Broadband Hardware SG Ports Database Security Default Passwords User Stories
Broadband Routers Wireless Firewalls / VPNs Software Hardware User Reviews
Broadband Security Editorials General User Articles Quick Reference
Broadband Forums General Discussions
Advertising Awards Link to us Server Statistics Helping SG About