<?xml version="1.0" encoding="utf-8"?>
<!-- generator="" -->
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>Subnetting</title>
		<description><![CDATA[Leading Network Security & Cyber Security site. Cisco Routing/Switching, VPN, Microsoft, SASE, SSE, F5, PaloAlto Firewalls, Protocol Analysis, Tips & more.]]></description>
		<link>https://www.firewall.cx/networking/network-protocols/subnetting.html</link>
		<lastBuildDate>Sat, 11 Apr 2026 12:39:32 +1000</lastBuildDate>
		<generator></generator>
		<atom:link rel="self" type="application/rss+xml" href="https://www.firewall.cx/networking/network-protocols/subnetting.feed?type=rss"/>
		<language>en-gb</language>
		<item>
			<title>IP Subnet Calculator</title>
			<link>https://www.firewall.cx/networking/network-protocols/subnetting/free-online-ip-subnet-calculator.html</link>
			<guid isPermaLink="true">https://www.firewall.cx/networking/network-protocols/subnetting/free-online-ip-subnet-calculator.html</guid>
			<description><![CDATA[<script src="https://www.firewall.cx//./subnet-calculator.js" type="text/javascript"></script>
<p style="text-align: justify;">This<strong> free online Subnet Calculator</strong> provides a fast and easy way to calculate all aspects of any IP Address and Subnet Mask. Simply enter your desired IP Address and Subnet Mask below and press <strong>Calculate</strong>. The results will appear in the fields located to your right side.</p>
<div class="formfield"><form action="(Empty Reference!)" method="get" name="FormName">
<table>
<tbody>
<tr>
<td style="width: 8px;">&nbsp;</td>
<td rowspan="14" style="width: 8px;">&nbsp;</td>
<td colspan="2" style="width: 355px;" align="left" valign="top"><span class="bold"><strong>Enter IP Address and Subnet Mask Below<br /></strong></span></td>
<td rowspan="14" style="width: 8px;" align="left" valign="top">&nbsp;</td>
<td colspan="2" style="width: 353px;" align="left" valign="top"><span class="bold"><strong>Results</strong></span></td>
</tr>
<tr>
<td style="width: 8px;">&nbsp;</td>
<td valign="middle"><span class="normal">IP Address:</span></td>
<td style="width: 204px;" align="left" valign="bottom"><input maxlength="15" name="ipinput" size="15" type="text" tabindex="1" /></td>
<td valign="middle"><span class="normal">Start Host Address:</span></td>
<td style="width: 176px;" align="left" valign="bottom"><input maxlength="15" name="starthost" size="15" type="text" value="0.0.0.0" /></td>
</tr>
<tr>
<td style="width: 8px;">&nbsp;</td>
<td valign="middle"><span class="normal">Subnet Mask:</span></td>
<td style="width: 204px;" align="left" valign="bottom"><input maxlength="15" name="sminput" size="15" type="text" tabindex="2" /></td>
<td valign="middle"><span class="normal">End Host Address:</span></td>
<td style="width: 113px;" align="left" valign="bottom"><input maxlength="15" name="endhost" size="15" type="text" value="0.0.0.0" /></td>
</tr>
<tr>
<td style="width: 8px;">&nbsp;</td>
<td style="width: 149px;" align="center" valign="top">&nbsp;</td>
<td style="width: 204px;" align="center" valign="top">&nbsp;</td>
<td valign="middle"><span class="normal">Max No. of Hosts:</span></td>
<td style="width: 168px;" align="left" valign="bottom"><input maxlength="15" name="numofhosts" size="9" type="text" value="0" /></td>
</tr>
<tr>
<td rowspan="2" style="width: 8px;">&nbsp;</td>
</tr>
<tr>
<td rowspan="2" style="width: 149px;" align="right" valign="top"><input name="submitButtonName" type="button" value="Calculate" onclick="calculate(this.form)" /></td>
<td rowspan="2" style="width: 204px;" align="left" valign="top"><input type="reset" value=" Clear" /></td>
</tr>
<tr>
<td style="width: 8px;">&nbsp;</td>
</tr>
<tr>
<td style="width: 8px;">&nbsp;</td>
<td rowspan="2" style="width: 149px;" align="center" valign="top">&nbsp;</td>
<td rowspan="2" style="width: 204px;" align="center" valign="top">&nbsp;</td>
<td rowspan="2" style="width: 175px;" align="left" valign="middle"><span class="normal">Network Address:</span></td>
<td rowspan="2" style="width: 176px;" align="left" valign="bottom"><input maxlength="15" name="subnetaddress" size="15" type="text" value="0.0.0.0" /></td>
</tr>
<tr>
<td style="width: 8px;">&nbsp;</td>
</tr>
<tr>
<td rowspan="5" style="width: 8px;">&nbsp;</td>
<td colspan="2" rowspan="5" style="width: 355px;" align="left" valign="middle"><span class="bold">Additional Information:</span>
<p><textarea cols="33" name="reportbox" rows="7" style="width: 336px; height: 90px;">Enter the IP Address and subnet mask in fields above and press "Calculate".</textarea></p>
</td>
</tr>
<tr>
<td style="width: 175px;" align="left" valign="middle"><span class="normal">Broadcast Address:</span></td>
<td style="width: 176px;" align="left" valign="bottom"><input maxlength="15" name="broadcastaddress" size="15" type="text" value="0.0.0.0" /></td>
</tr>
<tr>
<td style="width: 175px;" align="left" valign="middle"><span class="normal">Network Class:</span></td>
<td colspan="1" style="width: 113px;" align="left" valign="bottom"><input maxlength="1" name="networkclass" size="1" type="text" value="-" /></td>
</tr>
<tr>
<td style="width: 175px;" align="left" valign="middle"><span class="normal">Network Address Size (Bits):<br /></span></td>
<td colspan="1" style="width: 113px;" align="left" valign="bottom"><input maxlength="2" name="subsizebits" size="2" type="text" value="0" /></td>
</tr>
<tr>
<td style="width: 175px;" align="left" valign="middle"><span class="normal">Host Address Size (Bits):<br /></span></td>
<td colspan="1" style="width: 113px;" align="left" valign="bottom"><input maxlength="2" name="hostsizebits" size="2" type="text" value="0" /></td>
</tr>
</tbody>
</table>
</form></div>]]></description>
			<category>Subnetting</category>
			<pubDate>Thu, 03 Jul 2014 17:22:44 +1000</pubDate>
		</item>
		<item>
			<title>﻿IP Subnetting - Part 5: Subnetting Guidelines</title>
			<link>https://www.firewall.cx/networking/network-protocols/subnetting/subnetting-guidelines.html</link>
			<guid isPermaLink="true">https://www.firewall.cx/networking/network-protocols/subnetting/subnetting-guidelines.html</guid>
			<description><![CDATA[<p style="text-align: justify;">There is always that day when you are called upon to provide a solution to a network problem. The number of problems that can occur in a network are numerous and believe it or not, most of them can be avoided if the initial design and installation of the network are done properly.</p>
<p style="text-align: justify;" align="left">This article covers subnetting guidelines. These are used to correctly design and implement networks of any size.</p>
<p style="text-align: justify;" align="left">When I say "done properly" I don't just mean connecting the correct wires into the wall sockets ! Looking at it from an Administrator's point of view, I'd say that a "properly done job" is one that has had a lot of thought put into it to avoid silly routing problems and solve today's and any future needs.</p>
<p style="text-align: justify;" align="left">This page contains all the information you need to know in order to design a network that won't suffer from any of the above problems. I've seen some network setups which suffered from all the above, and you would be amazed how frequently I see them at large companies.</p>
<h2>Guidelines - Plan for Growth</h2>
<p style="text-align: justify;" align="left">When creating subnets for your network, answer the following questions:</p>
<ul style="text-align: justify;">
<li><span style="color: #003300;"><strong>How many subnets are currently required?</strong> </span>
<p>Calculate the maximum number of subnets required by rounding up<br /> the maximum number to the nearest power of two.<br /> For example, if an organization needs five subnets, 2 to the power of 2 will not provide enough subnet addressing space, so you must round up to<br /> 2 to the power of 3 = 8 subnets.</p>
</li>
<li><strong><span style="color: #003300;">How many subnets are required in the future?</span></strong><br />
<p>You must plan for future growth. For example, if 9 subnets are<br /> required today, and you choose to provide for 2 to the power of 4 = 16 subnets, this<br /> might not be enough when the seventeenth subnet needs to be deployed.<br /> In this example, it might be wise to provide for more growth and<br /> select 2 to the power of 5 = 32 as the maximum number of subnets.</p>
</li>
<li><strong><span style="color: #003300;">What are the maximum number of hosts on a given segment?</span></strong><br />
<p>You must ensure that there are enough bits available to assign host<br /> addresses to the organization’s largest subnet.<br /> If the largest subnet needs to support 40 host addresses today, 2 to the power of 5 =<br /> 32 will not provide enough host address space, so you would need<br /> to round up to 2 to the power of 6 = 64.</p>
</li>
<li><span style="color: #003300;"><strong>How many hosts will there be in the future?</strong> </span>
<p>Besides planning for additional subnets, you must also plan for more<br /> hosts to be added to each subnet in the future.<br /> Make sure the organization’s address allocation provides enough<br /> bits to deploy the required subnet addressing plan.</p>
<p>When developing subnets, class C addresses present the greatest<br /> challenge because fewer bits are available to divide between subnet<br /> addresses and host addresses. If you accommodate too many<br /> subnets, there may be no room for additional hosts and growth in<br /> the future.</p>
</li>
</ul>
<p style="text-align: justify;">All the above points will help you succeed in creating a well designed network which will have the ability to cater for any additional future requirements. And if you do happen to have any problems, well, there is always the website's forum where you can post your questions and problems :)</p>
<p><br /><br /></p>]]></description>
			<category>Subnetting</category>
			<pubDate>Fri, 20 May 2011 05:46:55 +1000</pubDate>
		</item>
		<item>
			<title>IP Subnetting - Part 4: Routing Between Subnets</title>
			<link>https://www.firewall.cx/networking/network-protocols/subnetting/subnetting-routing.html</link>
			<guid isPermaLink="true">https://www.firewall.cx/networking/network-protocols/subnetting/subnetting-routing.html</guid>
			<description><![CDATA[<p style="text-align: justify;">Routing and Communication between subnets is the main topic here. This article analyses communications between subnets. We provide examples on different methods that can be used to enable subnet communications in an effective and secure manner. Generally, this article puts in practice all subnetting theory covered until now.</p>
<h2>Communication Between Subnets</h2>
<p style="text-align: justify;">So, after reading all the previous pages about subnetting, let me ask you the following:</p>
<p style="text-align: justify;">Do you think computers that are on the same physical network but configured to be on separate subnets are able to communicate?</p>
<p style="text-align: justify;">The answer is <strong>no</strong>. Why? Simply because you must keep in mind that we are talking about the communication between 2 different networks!</p>
<p style="text-align: justify;">Looking at our example of the Class C network on the previous page, the fact is that one computer is part of the network 192.168.0.0 and the other one part of network 192.168.0.32, and these are two different networks. In our example, from the moment we modified the default subnet mask from 255.255.255.0 to 255.255.255.224, we split that one network to 8 smaller ones.</p>
<h2 style="text-align: justify;">Putting Theory to the Test</h2>
<p style="text-align: justify;">And because we just have to prove it..... we are going to try it on my home network ! In the worst case we'll have to spend all night trying to figure out what went wrong but it will be worth it! :)</p>
<p style="text-align: justify;">Without complicating things, here is a diagram of our lab network:</p>
<p align="center"><img src="https://www.firewall.cx/images/stories/ip-subnetting-routing-1.gif" alt="ip-subnetting-routing-1" width="399" height="389" style="display: block; margin-left: auto; margin-right: auto;" /></p>
<p style="text-align: justify;" align="left">Well, that's the network we have to play with. We've put on the diagram the results of a few simple pings from each host and as you can see, they all came out nice: PASS.</p>
<p style="text-align: justify;">So in order to proceed to phase 2 of our experiment, we've modified the Subnet mask of our workstation to 192.168.0.35 / 255.255.255.224, Slackware Linux Firewall to 192.168.0.1 / 255.255.255.224 (internal Network Interface Card) and NetWare Server to 192.168.0.10 / 255.255.255.224 as shown in the diagram below:</p>
<p align="center"><img src="https://www.firewall.cx/images/stories/ip-subnetting-routing-2.gif" alt="ip-subnetting-routing-2" width="408" height="411" style="display: block; margin-left: auto; margin-right: auto;" /></p>
<p style="text-align: justify;">As you can see, the results from our workstation were devastating ... alone and totaly unaware that the other two servers are still there! When our workstation tries to actually ping the Linux Firewall, it will get no reply, because its Gateway is a host which belongs to another network, something that we knew would never work.</p>
<p style="text-align: justify;">So, we have concluded that there cannot be any sort of communication between the computers of Network 1 and Network 2. The next question would be how can two hosts in two different subnets talk to each other? That's what we are going to have a look at right now !</p>
<h2>Routing Between Subnets - Networks</h2>
<p style="text-align: justify;">There is a way to allow the communication between my workstation and my servers and the Internet. Actually there are a few ways to achieve this and I'm going to show you a few ways, even though some might seem silly or impractical. We are not interested in the best solution at the moment, we just want to know the ways in which we can establish communication between the two subnets.</p>
<p style="text-align: justify;">Considering that subnets are smaller networks, you would remember that we use routers to achieve communications between two networks. This example of my home network is no exception to this rule.</p>
<p style="text-align: justify;">We need a router which will route packets from one network to the other. Let's have a look at the different ways we can solve this problem:</p>
<h4><span style="color: #008080;"><strong>Method 1: Using a Server with 2 Network Cards</strong></span></h4>
<p style="text-align: justify;">Our first option is to use one of the Servers, or a new Server which has at least 2 network cards installed. By connecting each network card to one of our networks and configuring the network cards so that each one belongs to one subnet/network we can route packets between them:</p>
<p align="center"><img src="https://www.firewall.cx/images/stories/ip-subnetting-routing-3.gif" alt="ip-subnetting-routing-3" width="428" height="385" style="display: block; margin-left: auto; margin-right: auto;" /></p>
<p style="text-align: justify;" align="left">The above diagram shows pretty much everything that's needed. The 2nd network card has been installed and it's been assigned an IP Address that falls within our Network 1 range and therefore can communicate with our workstation. On the other hand the NetWare server now acts as a Gateway for Network 1, so our workstation is reconfigured to use it as its Gateway. Any packets from Network 1 to Network 2 or the Internet will pass through the NetWare server.</p>
<h4><strong><span style="color: #008080;">Method 2: Binding 2 IP Addresses to the same network card</span></strong></h4>
<p style="text-align: justify;" align="left">This method is possibly the best and easiest way around our problem. We use the same network card on the NetWare server and bind another IP Address to it.</p>
<p style="text-align: justify;" align="left">This second IP Address will obviously fall within the Network 1 IP range so that our workstation can communicate with the server:</p>
<p align="center"><img src="https://www.firewall.cx/images/stories/ip-subnetting-routing-4.gif" alt="ip-subnetting-routing-4" width="428" height="385" style="display: block; margin-left: auto; margin-right: auto;" /></p>
<p style="text-align: justify;" align="left">As noted on the diagram, the only problem we might encounter is the need for the operating system of the server to support this type of configuration, but most modern operating systems would comply.</p>
<p style="text-align: justify;" align="left">Once configured, the Server takes care of any routing between the two networks.</p>
<h4><span style="color: #008080;"><strong>Method 3: Installing a router</strong></span></h4>
<p style="text-align: justify;" align="left">The third method is to install a router in the network.</p>
<p style="text-align: justify;" align="left">This might seem a bit far fetched but remember that we are looking at all possible ways to establish communications between our networks ! If this was a large network, then a router could possibly be the ideal solution, but given the size of my network, well... let's just say it would be a silly idea :)</p>
<p align="center"><img src="https://www.firewall.cx/images/stories/ip-subnetting-routing-5.gif" alt="ip-subnetting-routing-5" width="454" height="411" style="display: block; margin-left: auto; margin-right: auto;" /></p>
<p style="text-align: justify;" align="left">Our workstation in this setup would forward all packets to its Gateway, which is the router's interface and is connected to Network 1 and it will be able to see all other servers and access the Internet. It's a similar setup to Method 1 but instead of a Server we have a dedicated router. Oh, and by the way, if we would end up using such a configuration in real life.. the hub which both of the router's interface's connect to, would be replaced by some type of WAN link.</p>
<p style="text-align: justify;" align="left">That completes our discussion on Subnet routing and communication.</p>
<p style="text-align: right;" align="right">Next -<a href="https://www.firewall.cx/networking/network-protocols/subnetting/subnetting-guidelines.html" title="IP Subnetting - Part 5: Subnetting Guidelines">IP Subnetting - Part 5: Subnetting Guidelines</a></p>]]></description>
			<category>Subnetting</category>
			<pubDate>Fri, 20 May 2011 05:24:07 +1000</pubDate>
		</item>
		<item>
			<title>IP Subnetting - Part 3: Subnet Mask Bits &amp; Analysis</title>
			<link>https://www.firewall.cx/networking/network-protocols/subnetting/subnetting-analysis.html</link>
			<guid isPermaLink="true">https://www.firewall.cx/networking/network-protocols/subnetting/subnetting-analysis.html</guid>
			<description><![CDATA[<p style="text-align: justify;">So we have covered to some depth the subnetting topic, but there is still much to learn ! We are going to explain here the available subnet masks and analyse a Class C network, using a specific subnet mask. It's all pretty simple, as long as you understand the logic behind it.</p>
<h2>Understanding the use, and analysing different subnet masks</h2>
<p style="text-align: justify;">Okay, so we know what a subnet mask is, but we haven't spoken (yet) about the different values they take, and the guidelines we need when we use them. That's what we are going to do here !</p>
<p style="text-align: justify;">The truth is that you cannot take any subnet mask you like and apply it to a computer or any other device, because depending on the random subnet mask you choose, it will either create a lot of routing and communication problems, or it won't be accepted at all by the device you're trying to configure.</p>
<p style="text-align: justify;">For this reason we are going to have a look at the various subnet masks so you know exactly what you need to use, and how to use it. Most important, we are going to make sure we understand WHY you need to choose specific subnet masks, depending on your needs. Most people simply use a standard subnet mask without understanding what that does. This is not the case for the visitors to this site.</p>
<p style="text-align: justify;">Let's first have a look at the most common subnet masks and then I'll show you where these numbers come from :)</p>
<h2>Common Subnet Masks</h2>
<p style="text-align: justify;">In order to keep this place tidy, we are going to see the common Subnet masks for each Class. Looking at each Class's subnet mask is possibly the best and easiest way to learn them.</p>
<table border="1" style="width: 96%; height: 259px; background-color: #ffffff;" align="center">
<tbody>
<tr>
<td style="width: 22%; height: 26px;" bgcolor="#006699">
<div align="center"><span style="color: #ffffff;"><strong>Numer</strong><strong> of bits</strong></span></div>
</td>
<td style="width: 23%; height: 26px;" bgcolor="#006699">
<div align="center"><span style="color: #ffffff;"><strong>Class A</strong></span></div>
</td>
<td style="width: 26%; height: 26px;" bgcolor="#006699">
<div align="center"><span style="color: #ffffff;"><strong>Class B</strong></span></div>
</td>
<td style="width: 29%; height: 26px;" bgcolor="#006699">
<div align="center"><span style="color: #ffffff;"><strong>Class C</strong></span></div>
</td>
</tr>
<tr>
<td style="width: 22%;">
<div align="center"><span style="color: #000000;"><strong>0 (default mask)</strong></span></div>
</td>
<td style="background-color: #ffffff;">
<div align="center">255.0.0.0 (default_mask)</div>
</td>
<td style="background-color: #ffffff;">
<div align="center">255.255.0.0 (default_mask)</div>
</td>
<td style="background-color: #ffffff;">
<div align="center">255.255.255.0 (default_mask)</div>
</td>
</tr>
<tr>
<td style="width: 22%;">
<div align="center"><span style="color: #000000;"><strong>1</strong></span></div>
</td>
<td style="background-color: #ffffff;">
<div align="center">255.128.0.0 (default +1)</div>
</td>
<td style="background-color: #ffffff;">
<div align="center">255.255.128.0 (default+1)</div>
</td>
<td style="background-color: #ffffff;">
<div align="center">255.255.255.128 (default+1)</div>
</td>
</tr>
<tr>
<td style="width: 22%;">
<div align="center"><span style="color: #000000;"><strong>2</strong></span></div>
</td>
<td style="background-color: #ffffff;">
<div align="center">255.192.0.0 (default+2)</div>
</td>
<td style="background-color: #ffffff;">
<div align="center">255.255.192.0 (default+2)</div>
</td>
<td style="background-color: #ffffff;">
<div align="center">255.255.255.192 (default+2)</div>
</td>
</tr>
<tr>
<td style="width: 22%;">
<div align="center"><span style="color: #000000;"><strong>3</strong></span></div>
</td>
<td style="background-color: #ffffff;">
<div align="center">255.224.0.0 (default+3)</div>
</td>
<td style="background-color: #ffffff;">
<div align="center">255.255.224.0 (default+3)</div>
</td>
<td style="background-color: #ffffff;">
<div align="center">255.255.255.224 (default+3)</div>
</td>
</tr>
<tr>
<td style="width: 22%;">
<div align="center"><span style="color: #000000;"><strong>4</strong></span></div>
</td>
<td style="background-color: #ffffff;">
<div align="center">255.240.0.0 (default+4)</div>
</td>
<td style="background-color: #ffffff;">
<div align="center">255.255.240.0 (default+4)</div>
</td>
<td style="background-color: #ffffff;">
<div align="center">255.255.255.240 (default+4)</div>
</td>
</tr>
<tr>
<td style="width: 22%;">
<div align="center"><span style="color: #000000;"><strong>5</strong></span></div>
</td>
<td style="background-color: #ffffff;">
<div align="center">255.248.0.0 (default+5)</div>
</td>
<td style="background-color: #ffffff;">
<div align="center">255.255.248.0 (default+5)</div>
</td>
<td style="background-color: #ffffff;">
<div align="center">255.255.255.248 (default+5)</div>
</td>
</tr>
<tr>
<td style="width: 22%;">
<div align="center"><span style="color: #000000;"><strong>6</strong></span></div>
</td>
<td style="background-color: #ffffff;">
<div align="center">255.252.0.0 (default+6)</div>
</td>
<td style="background-color: #ffffff;">
<div align="center">255.255.252.0 (default+6)</div>
</td>
<td style="background-color: #ffffff;">
<div align="center">255.255.255.252 (default+6)</div>
</td>
</tr>
<tr>
<td style="width: 22%; height: 24px;">
<div align="center"><span style="color: #000000;"><strong>7</strong></span></div>
</td>
<td style="background-color: #ffffff;">
<div align="center">255.254.0.0 (default+7)</div>
</td>
<td style="background-color: #ffffff;">
<div align="center">255.255.254.0 (default+7)</div>
</td>
<td style="background-color: #ffffff;">
<div align="center">255.255.255.254 (default+7) * Only 1 Host per subnet</div>
</td>
</tr>
<tr>
<td style="width: 22%; height: 19px;">
<div align="center"><span style="color: #000000;"><strong>8</strong></span></div>
</td>
<td style="background-color: #ffffff;">
<div align="center">255.255.0.0 (default+8)</div>
</td>
<td style="background-color: #ffffff;">
<div align="center">255.255.255.0 (default+8)</div>
</td>
<td style="background-color: #ffffff;">
<div align="center">255.255.255.255 (default+8) * Reserved for Broadcasts</div>
</td>
</tr>
</tbody>
</table>
<p style="text-align: justify;">The above table might seem confusing at first, but don't despair ! It's simple, really, you just need to look at it in a different way!</p>
<p style="text-align: justify;">The trick to understanding the pattern of the above table is to think of it in the following way: Each Class has its default subnet mask, which I have noted using the Green colour, and all we are doing is borrowing a Bit at a time (starting from 1, all the way to 8) from the Host ID portion of each class. I have used various colours to show you the decimal numbers that we get each time we borrow a bit from the Host ID portion. If you can't understand how these decimal numbers work out, then you should read up on the <a href="https://www.firewall.cx/networking/network-protocols/ip-protocol/protocols-ip-binary.html" target="_blank" title="Binary &amp; IP">Binary &amp; IP</a> page.</p>
<p style="text-align: justify;">Each time we borrow a bit from the Host ID, we split the network into a different number of networks. For example, when we borrowed 3 Bits in the Class C network, we ended up partitioning the network into 8 smaller networks. Let's take a look at a detailed example (which we will break into three parts) so we can fully understand all the above.</p>
<p style="text-align: justify;">We are going to do an analysis using the Class C network and 3 Bits which we took from the Host ID. The analysis will take place once we convert our decimal numbers to binary, something that's essential for this type of work. We will see how we get 8 networks from such a configuration and their ranges !</p>
<p align="center"><img src="https://www.firewall.cx/images/stories/ip-subnetting-mask-bits-1.gif" alt="ip-subnetting-mask-bits-1" width="510" height="295" style="display: block; margin-left: auto; margin-right: auto;" /></p>
<p style="text-align: justify;">In this first part, we can see clearly where the 8 Networks come from. The rule applies to all types of Subnets, no matter what Class they are. Simply take the Subnet Bits and place them into the power of 2 and you get your Networks.</p>
<p style="text-align: justify;">Now, that was the easy part. The second part is slightly more complicated and I need you focused so you don't get mixed up!</p>
<p style="text-align: justify;">At first the diagram below seems quite complex, so try to follow me as we go through it:</p>
<p align="center"><img src="https://www.firewall.cx/images/stories/ip-subnetting-mask-bits-2.gif" alt="ip-subnetting-mask-bits-2" width="510" height="413" style="display: block; margin-left: auto; margin-right: auto;" /></p>
<p style="text-align: justify;" align="left">The IP Address and Subnet mask is show in Binary format. We focus on the last octet which contains all the information we are after. Now, the last octet has 2 parts, the Subnet ID and Host ID. When we want to calculate the Subnets and Hosts, we deal with them one at a time. Once that's done, we put the Subnet ID and Host ID portion together so we can get the last octet's decimal number.</p>
<p style="text-align: justify;" align="left">We know we have 8 networks (or subnets) and, by simply counting or incrementing our binary value by one each time, we get to see all the networks available. So we start off with 000 and finish at 111. On the right hand side I have also put the equivalent decimal number for each network.</p>
<p style="text-align: justify;" align="left">Next we take the Host ID portion, where the first available host is 0 0001 (1 in Decimal), because the 0 0000 (0 in Decimal) value is reserved as it is the Network Address (see <a href="https://www.firewall.cx/networking/network-protocols/ip-protocol/protocols-ip-network-id.html" target="_blank" title="IP Classes">IP Classes</a> page), and the last value which is 1 1111 (31 in decimal) is used as a Broadcast Address for each Subnet (see <a href="https://www.firewall.cx/networking/network-fundamentals/network-broadcast.html" target="_blank" title="Broadcast">Broadcast</a> page).</p>
<p style="text-align: justify;" align="left"><strong>Note</strong></p>
<p style="text-align: justify;" align="left">We've provided a formula in the <a href="https://www.firewall.cx/networking/network-protocols/ip-protocol/protocols-ip-network-id.html" target="_blank" title="IP Classes">IP Classes</a> page that allows you to calculate the available hosts, and that's exactly what we are doing here for each subnet. This formula is :2 to the power of X -2. Where X is the number of Bits we have in the Host ID field, which for our example is 5. When we apply this formula, we get 2 to the power of 5 - 2 = 30 Valid (usable) IP Addresess. If you're wondering why we subtract 2, it's because one is used for the Network Address of that subnet and the other for the Broadcast Address of that subnet. This shouldn't be new news to anyone :)</p>
<p style="text-align: justify;" align="left">Summing up, these are the ranges for each subnet in our new network:</p>
<p align="center"><img src="https://www.firewall.cx/images/stories/ip-subnetting-mask-bits-3.gif" alt="ip-subnetting-mask-bits-3" width="440" height="350" style="display: block; margin-left: auto; margin-right: auto;" /></p>
<p align="center"><img src="https://www.firewall.cx/images/stories/ip-subnetting-mask-bits-4.gif" alt="ip-subnetting-mask-bits-4" width="454" height="369" style="display: block; margin-left: auto; margin-right: auto;" /></p>
<p style="text-align: justify;" align="left">We hope the example didn't confuse you too much; the above example is one of the simplest type, which is why I chose a Class C network, they are the easiest to work with.</p>
<p style="text-align: justify;" align="left">If you did find it somewhat difficult, try to read over it slowly. After a few times, you will get to understand it. These things do need time to sink in!</p>
<p style="text-align: right;" align="right">Next -<a href="https://www.firewall.cx//networking-topics/protocols/ip-subnetting/170-subnetting-routing.html" title="IP Subnetting - Part 4: Routing Between Subnets">IP Subnetting - Part 4: Routing Between Subnets</a></p>]]></description>
			<category>Subnetting</category>
			<pubDate>Wed, 18 May 2011 05:57:51 +1000</pubDate>
		</item>
		<item>
			<title>IP Subnetting - Part 2: Subnet Masks &amp; Their Effect</title>
			<link>https://www.firewall.cx/networking/network-protocols/subnetting/subnetting-mask.html</link>
			<guid isPermaLink="true">https://www.firewall.cx/networking/network-protocols/subnetting/subnetting-mask.html</guid>
			<description><![CDATA[<p>There are a few different ways to approach subnetting and it can get confusing because of the complexity of some subnets and the flexibility they offer. For this reason I created this little paragraph to let you know how we are going to approach and learn subnetting. So.....</p>
<p style="text-align: justify;" align="left">We are going to analyse the common subnet masks for each Class, giving detailed examples for most of them and allowing you to "see" how everything is calculated and understand the different effects a subnet mask can have as you change it. Once you have mastered this, you can then go on and create your custom subnet masks using any type of Class.</p>
<h2>Default Subnet masks of each Class</h2>
<p style="text-align: justify;" align="left">By now you should have some idea what the subnet mask does and how it's used to partition a network. What you need to keep in mind is that each Class has its DEFAULT subnet mask, which we can change to suit our needs. I have already mentioned this in the previous page, but we need to look into it in a bit more detail.</p>
<p style="text-align: justify;" align="left">The picture below shows our 3 Network Classes with their respective default subnet mask:</p>
<p align="center"><img src="https://www.firewall.cx/images/stories/ip-subnetting-mask-effect-1.gif" alt="ip-subnetting-mask-effect-1" width="615" height="159" style="display: block; margin-left: auto; margin-right: auto;" /></p>
<h2 align="left">The Effect of a Subnet Mask on an IP Address</h2>
<p style="text-align: justify;" align="left">In the <a href="https://www.firewall.cx/networking/network-protocols/ip-protocol/protocols-ip-network-id.html" target="_blank" title="IP Classes">IP Classes</a> page we analysed and showed clearly how an IP Address consists of two sections:</p>
<p style="text-align: justify;" align="left">1) <strong>The Network ID</strong>&nbsp;</p>
<p style="text-align: justify;" align="left">2) <strong>The Host ID</strong></p>
<p style="text-align: justify;" align="left">This rule applies for all IP Addresses that use the default subnet mask and we call them Classful IP Addresses.</p>
<p style="text-align: justify;" align="left">We can see this once again in the picture below, where the IP Address is analysed in Binary, because this is the way you should work when dealing with subnet masks:</p>
<p align="center"><img src="https://www.firewall.cx/images/stories/ip-subnetting-mask-effect-2.gif" alt="ip-subnetting-mask-effect-2" width="510" height="264" style="display: block; margin-left: auto; margin-right: auto;" /></p>
<p style="text-align: justify;" align="left">We are looking at an IP Address with its subnet mask for the first time. What we have done is take the decimal subnet mask and converted it to binary, along with the IP Address. It is essential to work in binary because it makes things clearer and we can avoid making silly mistakes. The ones (1) in the subnet mask "lock" or, if you like, define the Network ID portion. If we change any bit within the Network ID of the IP Address, then we immediately move to a different network. So in this example, we have a 24 bit subnet mask.</p>
<p style="text-align: justify;" align="left"><strong>NOTE:</strong></p>
<ul class="check">
<li style="text-align: justify;">All Class C Classful IP Addresses have a 24 bit subnet mask (255.255.255.0).</li>
<li style="text-align: justify;">All Class B Classful IP Addresses have a 16 bit subnet mask (255.255.0.0).</li>
<li style="text-align: justify;">All Class A Classful IP Addresses have an 8 bit subnet mask (255.0.0.0).</li>
</ul>
<p style="text-align: justify;" align="left">On the other hand, the use of an IP Address with a subnet mask other than the default results in the standard Host bits (the Bits used to indentify the HOST ID) being divided in to two parts: a Subnet ID and Host ID. These type of IP Addresses are called Classless IP Addresses.</p>
<p style="text-align: justify;" align="left">In order to understand what a "Classless IP Address" is without getting confused, we are going to take the same IP Address as above, and make it a Classless IP Address by changing the default subnet mask:</p>
<p align="center"><img src="https://www.firewall.cx/images/stories/ip-subnetting-mask-effect-3.gif" alt="ip-subnetting-mask-effect-3" width="510" height="242" style="display: block; margin-left: auto; margin-right: auto;" /></p>
<p style="text-align: justify;" align="left">Looking at the picture above you will now notice that we have a Subnet ID, something that didn't exist before. As the picture explains, we have borrowed 3 bits from the Host ID and used them to create a Subnet ID. Effectively we partitioned our Class C network into smaller networks.</p>
<p style="text-align: justify;" align="left">If you're wondering how many smaller networks, you'll find the answer on the next page. I prefer that you understanding everything here rather than blasting you with more Subnet ID's, bits and all the rest :)</p>
<h2 align="left">Summary</h2>
<p style="text-align: justify;" align="left">In this page we saw the default subnet mask of each Class and also introduced the Classful and Classless IP Addresses, which are a result of using various subnet masks.</p>
<p style="text-align: justify;" align="left">When we use IP Addresses with their default subnet masks, e.g 192.168.0.10 is a Class C IP Address so the default subnet mask would be 255.255.255.0, then these are "Classful IP Addresses".</p>
<p style="text-align: justify;" align="left">On the other hand, Classless IP Addresses have their subnet mask modified in a way so that there is a "Subnet ID". This Subnet ID is created by borrowing Bits from the Host ID portion.</p>
<p style="text-align: justify;" align="left">The picture below shows us both examples:</p>
<p align="center"><img src="https://www.firewall.cx/images/stories/ip-subnetting-mask-effect-4.gif" alt="ip-subnetting-mask-effect-4" width="400" height="204" style="display: block; margin-left: auto; margin-right: auto;" /></p>
<p style="text-align: justify;" align="left">We hope you have understood the new concepts and material on this page. Next we are going to talk about subnet bits, learn how to calculate how many bits certain subnet masks are and see the different and most used subnet masks available.</p>
<p style="text-align: right;" align="right">Next -<a href="https://www.firewall.cx/networking/network-protocols/subnetting/subnetting-analysis.html" title="IP Subnetting - Part 3: Subnet Mask Bits &amp; Analysis">IP Subnetting - Part 3: Subnet Mask Bits &amp; Analysis</a></p>]]></description>
			<category>Subnetting</category>
			<pubDate>Wed, 18 May 2011 05:50:44 +1000</pubDate>
		</item>
		<item>
			<title>IP Subnetting - Part 1: The Basic Concepts</title>
			<link>https://www.firewall.cx/networking/network-protocols/subnetting/subnetting-basic-concepts.html</link>
			<guid isPermaLink="true">https://www.firewall.cx/networking/network-protocols/subnetting/subnetting-basic-concepts.html</guid>
			<description><![CDATA[<p style="text-align: justify;" align="left">When we subnet a network, we basically split it into smaller networks. For example, when a set of IP Addresses is given to a company, e.g 254 they might want to "break" (the correct term is "partition") that one network into smaller ones, one for each department. This way, their Technical department and Management department can each have a small network of their own. By subnetting the network we can partition it to as many smaller networks as we need and this also helps reduce traffic and hides the complexity of the network.</p>
<p style="text-align: justify;" align="left">By default, all type of Classes (A, B and C) have a subnet mask, we call it the "Default Subnet mask". You need to have one because:</p>
<p style="text-align: justify;" align="left">1) All computers need the subnet mask field filled when configuring IP</p>
<p style="text-align: justify;" align="left">2) You need to set some logical boundaries in your network</p>
<p style="text-align: justify;" align="left">3) You should at least enter the default subnet mask for the Class you're using</p>
<p style="text-align: justify;" align="left">In the previous pages I spoke about IP Classes, Network IDs and Host IDs, the fact is that the Subnet mask is what determines the Network ID and Host ID portion of an IP Address.</p>
<p style="text-align: justify;" align="left">The table below shows clearly the subnetmask that applies for each network Class.</p>
<p align="center"><img src="https://www.firewall.cx/images/stories/ip-subnetting-basic-concepts-1.gif" alt="ip-subnetting-basic-concepts-1" width="330" height="124" style="display: block; margin-left: auto; margin-right: auto;" /></p>
<p style="text-align: justify;" align="left">When dealing with subnet masks in the real world, we are free in most cases to use any type of subnet mask in order to meet our needs. If for example we require one network which can contain up to 254 computers, then a Class C network with its default subnet mask will do fine, but if we need more, then we might consider a Class B network with its default subnet mask.</p>
<p style="text-align: justify;" align="left">Note that the default subnet masks have been set by the IEEE committee, the same guys that set and approve the different standards and protocols.</p>
<p style="text-align: justify;" align="left">We will have a closer look at this later on and see how we can achieve a Class C network with more than 254 hosts.</p>
<h2 align="left">Understanding the Subnetting Concept</h2>
<p style="text-align: justify;" align="left">Let's stop here for one moment and have a look at what I mean by partitioning one network into smaller ones by using different subnet masks.</p>
<p style="text-align: justify;" align="left">The picture below shows our example network (192.168.0.0). All computers here have been configured with the default Class C subnet mask (255.255.255.0):</p>
<p align="center"><img src="https://www.firewall.cx/images/stories/ip-subnetting-basic-concepts-2.gif" alt="ip-subnetting-basic-concepts-2" width="471" height="383" style="display: block; margin-left: auto; margin-right: auto;" /></p>
<p style="text-align: justify;" align="left">Because of the subnet mask we used, all these computers are part of the one network marked in blue. This also means that any one of these hosts (computers, router and server) can communicate with each other.</p>
<p style="text-align: justify;" align="left">If we now wanted to partition this network into smaller segments, then we would need to change the subnet mask appropriately so we can get the desired result. Let's say we needed to change the subnet mask from 255.255.255.0 to 255.255.255.224 on each configured host.</p>
<p style="text-align: justify;" align="left">The picture below shows us how the computers will see the network once the subnet mask has changed:</p>
<p align="center"><img src="https://www.firewall.cx/images/stories/ip-subnetting-basic-concepts-3.gif" alt="ip-subnetting-basic-concepts-3" width="459" height="369" style="display: block; margin-left: auto; margin-right: auto;" /></p>
<p style="text-align: justify;" align="left">In reality, we have just created 8 networks from the one large (blue) network we had, but I am keeping things simple for now and showing only 2 of these smaller networks because I want you to understand the concept of subnetting and see how important the subnet mask is.</p>
<p style="text-align: justify;" align="left">In the next pages which are to follow I will analyse in great depth the way subnetting works and how to calculate it. It is very important that you understand the concepts introduced in this section, so make sure you do, before continuing !</p>
<p style="text-align: right;" align="right">Next -<a href="https://www.firewall.cx/networking/network-protocols/subnetting/subnetting-mask.html" title="IP Subnetting - Part 2: Subnet masks and Their Effect">IP Subnetting - Part 2: Subnet masks and their effect</a></p>
<p>&nbsp;</p>]]></description>
			<category>Subnetting</category>
			<pubDate>Wed, 18 May 2011 05:44:17 +1000</pubDate>
		</item>
	</channel>
</rss>
