Subnetting Tutorial

Networking Topics > Layer 3 Routing > Subnetting Tutorial

The process of subnetting involves dividing a network up into smaller networks called subnets or subnetworks.

To create these additional networks we use a subnet mask. The subnet mask simply determines which portion of the IP address belongs to the host.

The subnet mask does not alter the class of the IP address, it simply "borrows" bits from the host portion and uses these to create subnets. This naturally reduces the maximum number of hosts your network can have, because you are using some of your host bits for your subnet bits.

The subnet mask can borrow as many bits as you like, the more bits you borrow, the more subnets you can create. Bear in mind though, that increasing the number of subnets decreases the number of hosts that each subnet can have.

You can calculate the number of bits to borrow using the following equation.

2n - 2 = number of subnets

n = number of host or node bits

Notice that this equation is very similar to the number of available hosts equation.

Subnetting Example

Dotted Decimal IP1755000
Binary IP10101111001101000000000000000000
Standard subnet mask for Class B25525500
Binary standard subnet mask11111111111111110000000000000000
Subnetted mask2552552240
Binary subnetted mask11111111111111111110000000000000

As you can see form the example above if we use the subnet mask of 255.255.224.0 on a class B IP address then we will be "borrowing" 3 host bits to use for subnetting. From our equation we can calculate that this will create 23-2 = 6 useable subnets and this will leave us with 13 host bits for each subnet, which will provide us with 213-2=8190 hosts per subnet.

Subnet Ranges

1st 2 Octets (dotted decimal)3rd Octet (binary)4th Octet (binary)
175.500010000000000000First usable subnet
175.500100000000000000
175.500110000000000000
175.501000000000000000
175.501010000000000000
175.501100000000000000Last usable subnet

Lets look at the first subnet in more detail. 175.50.32.0. This address is the "wire" or "network" address of the subnet.

First Subnet Range

1st 2 Octets (dotted decimal)3rd Octet (binary)4th Octet (binary)
175.500010000000000000Network ID
175.500010000000000001First host
175.500011111111111110Last host
175.500011111111111111Broadcast address

First Subnet Range in Dotted Decimal

175.50.32.0Network ID
175.50.32.1First host
175.50.63.254Last host
175.50.63.255Broadcast host

As you can see from the above example, it's much easier to work out subnetting in binary than decimal format.

© 2012 Internetwork Training

Internetwork Training cannot guarantee that the informtion on this website is complete and free from errors. If you feel there are errors on this page then please tell us.

Cisco CCNA Training
Share |

Copyright © 2002-2012 Internetwork Training | Privacy Policy | Terms & Conditions

This material is not sponsored, endorsed or affiliated with Cisco Systems, Inc. Cisco, Cisco Systems, CCIP, the CCIP Logo, the CCNA Logo, the CCNP Logo, the CCDA Logo and the CCDP Logo are trademarks of Cisco Systems, Inc. and its affiliates. CCENT®, CCNA®, CCNP®, CCDA® and CCDP® are registered trademarks of Cisco Systems, Inc. and its affiliates.
Although the authors of this site have made every effort to ensure the information on this website is correct, the authors do not assume and hereby disclaim any liability to any party for loss or damage caused by errors, omissions or misleading information.