How to Subnet a Network

January 27th, 2008 • Related • Filed Under

A properly designed subnet can do wonders for the security and performance of a network. The main idea in subnetting is to divide a network into smaller pieces, which we call subnets. Actually implementing a subnet is typically more difficult than simply using the default subnet mask of This usually means that temporary or smaller networks do not need to be subnetted. Security sees benefit since the IP addresses of the host computers on each subnet are masked by the network address- which means they are invisible to the outside world. We call this network address translation, or NAT. This same technique helps conserve IP addresses, since all hosts on the subnet essentially just use the network IP address during communication.
A Basic Review on Subnetting

If you’re a little rusty on the basics of subnetting, don’t worry. We’ll cover everything you need to know from beginning to end. First thing first: we need to learn about the IP basics. The current version of internet protocol, or IP, is IP version 4. This IP version allows four octets of data to represent an IP address. Each octet is considered to be a byte, so there are 8 bits in every octet. Note that in binary form you can see that there are 8 numbers, each one consisting of a bit. Finally, each octet is separated by a period, as shown below.

Each IP address is usually represented in decimal form, as seen above as “”. However, each IP address is actually used by computers in binary form. You may have noticed a huge flaw in IP version 4: the amount of unique IP addresses is limited! To be exact, only

4. More network octets will mean more networks! Likewise.296 unique IP addresses can be created. More host octets means more computers per network. respectively. Each network octet is for classifying which network a host is on. but in the future it will inevitably be used. The IP version 6 protocol was created for when the transition is needed. This lets us know to what network class any IP belongs to with ease. There are class D and class E types. (In case you were wondering. Each class differs by the number of network and host octets it has. Don’t worry! It’s actually easy. and how many network portions each class has. This may seem like a large number but keep in mind every single device in the world needs a unique IP address to communicate with one another while online.967. Review the diagram below.294.just memorize how we get the numbers. class B. each host octet specifies a host that can be assigned to the network. Now the bad news: you must memorize each range for each class if you hope to pass most network exams. but those are for multicasting and private uses. Each class has a certain range that the first octet can be assigned to. not the numbers themselves! All you have to do is remember n^8 (read as “n” to the eighth power). Review the diagram below to see a visual diagram. Most computers don’t use IPv6 just yet. IPv6 will support 2^128 unique IP addresses… egad!) Classes There are three main types of classifications of IP addresses in IPv4: class A. . and class C.

the fewer hosts you will have. Notice how we didn’t use the IP address 127 for the class A network.One final note before we move on. Review the class A default subnet masks as shown below.the more hosts you have.that’s because this is loopback address. . This is a trading game. Also take note that there are reserved IP addresses. It essentially divides the IP address into two parts: the network and host. which is handy if you just want computers to be connected with each other. These IP addresses will not connect to the internet.and not the whole world. Subnet Masks A subnet mask is what we use to assign different amounts of networks and hosts to an IP network. the fewer networks you will have. such as those for private networks. We use this for testing configurations on the IP network. And yet the more networks you have.

The class B network will need to recognize two network portions. we have the class C subnet. . Lastly. You can see a diagram of the default subnet below. and two host portions. This can be seen in the below diagram. It is the most commonly used subnet. so pay special attention to it in the upcoming lecture.

you will need to create a subnet for a class C network.We’ve laid Down the Foundation. Usable Subnets = (2^n) – 2 . Let’s Build the House! We just reviewed the basics of IP addresses and subnet masks. take some practice. learning how to subnet isn’t too hard. It will. but not as many hosts. Next we will need to determine how many hosts are required.but only 254 hosts per network are allowed. we usually don’t use the default subnet mask at all when we subnet a network! The good news is. Both of these values can be calculated with the following equations: Two Important Equations to Remember:   1. A class C network allows for many networks to be created. you can create a hefty 2. More often than not. depending on which class you are subnetting. where N = power of bits assigned 2. The bad news is. where N = power of bits remaining .097.152 networks. We need 5 separate networks that have 30 computers on each subnet. An Example of Subnetting a Class C Network Subnetting varies in difficulty. Usable Hosts = (2^n) – 2 . however. In fact. Let’s say we are subnetting a school’s network. First we calculate how many usable subnets we need.

For now. . Simply take all of your network bits. Look at the diagram below for a visual guide. and add them up. Review the diagram below for a visual example. this is how we account for the two addresses in each subnet we can’t use. If you are wondering what the “-2” part of the equation is for.Let’s start with usable subnets. We will review what these addresses are for more specifically later on. let’s find out what our usable hosts are! Alright Already! What’s My Subnet Mask?! Getting your subnet mask at this point is incredibly easy.

That means you should stay away from subnet calculators until you have grasped the full concept of how to do it yourself. Keep in mind that every computer must have the subnet mask set in order for them to be on the same network. Class A and Class B networks are a bit trickier. be sure to keep the network portions in mind. These calculators should only be used as a time saving tool. subnetting will become much easier. not a learning tool or way to cheat on homework. . When subnetting other classes.That’s it! You’re done. the first three octets will always be 255. but follow the same example as shown above and it should be quite easy to accomplish. Closing Comments Subnetting may not be fun. but it is required for students to know on networking exams. You have successfully created a subnet mask that can be used on the school’s network. With enough practice. Also note that since we are using a class C network.

Sign up to vote on this title
UsefulNot useful