{"id":233,"date":"2011-11-23T17:08:23","date_gmt":"2011-11-23T17:08:23","guid":{"rendered":"http:\/\/microsoftgeek.com\/?p=233"},"modified":"2018-09-06T22:59:03","modified_gmt":"2018-09-06T22:59:03","slug":"how-to-subnet-a-network","status":"publish","type":"post","link":"https:\/\/microsoftgeek.com\/?p=233","title":{"rendered":"How to Subnet a Network"},"content":{"rendered":"<p><span class=\"newbody\"> <\/span><\/p>\n<p class=\"first\">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 255.255.255.0. This usually  means that temporary or smaller networks do not need to be subnetted.<\/p>\n<p>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.<\/p>\n<h3>A Basic Review on Subnetting<\/h3>\n<p class=\"white\">If you\u2019re a little rusty on the basics of subnetting,  don\u2019t worry. We\u2019ll cover everything you need to know from beginning to  end. First thing first: we need to learn about the IP basics.<\/p>\n<p>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.<\/p>\n<p style=\"text-align: center;\"><img decoding=\"async\" src=\"http:\/\/www.learn-networking.com\/wp-content\/oldimages\/ip-address-scheme.jpg\" alt=\"subnet\" \/><\/p>\n<p>Each IP address is usually represented in decimal form, as seen above  as \u201c192.168.2.1\u201d. 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,294,967,296 unique IP addresses can be created. 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.<\/p>\n<p>The IP version 6 protocol was created for when the transition is  needed. Most computers don\u2019t use IPv6 just yet, but in the future it  will inevitably be used. (In case you were wondering, IPv6 will support  2^128 unique IP addresses\u2026 egad!)<\/p>\n<h3>Classes<\/h3>\n<p>There are three main types of classifications of IP addresses in  IPv4: class A, class B, and class C. There are class D and class E  types, but those are for multicasting and private uses, respectively.  Each class differs by the number of network and host octets it has. Each  network octet is for classifying which network a host is on. More  network octets will mean more networks! Likewise, each host octet  specifies a host that can be assigned to the network. More host octets  means more computers per network.<\/p>\n<p>Each class has a certain range that the first octet can be assigned  to. This lets us know to what network class any IP belongs to with ease.  Review the diagram below to see a visual diagram.<\/p>\n<p style=\"text-align: center;\"><img decoding=\"async\" src=\"http:\/\/www.learn-networking.com\/wp-content\/oldimages\/network-ranges.jpg\" alt=\"how to subnet\" \/><\/p>\n<p>Now the bad news: you must memorize each range for each class if you  hope to pass most network exams. Don\u2019t worry! It\u2019s actually easy- just  memorize how we get the numbers, not the numbers themselves! All you  have to do is remember <strong>n^8<\/strong> (read as \u201cn\u201d to the eighth power), and how many network portions each class has. Review the diagram below.<\/p>\n<p style=\"text-align: center;\"><img decoding=\"async\" src=\"http:\/\/www.learn-networking.com\/wp-content\/oldimages\/network-range-help.jpg\" alt=\"subnetting a network\" \/><\/p>\n<p>One final note before we move on. Notice how we didn\u2019t use the IP  address 127 for the class A network- that\u2019s because this is loopback  address. We use this for testing configurations on the IP network. Also  take note that there are reserved IP addresses, such as those for  private networks. These IP addresses will not connect to the internet,  which is handy if you just want computers to be connected with each  other- and not the whole world.<\/p>\n<h3>Subnet Masks<\/h3>\n<p>A subnet mask is what we use to assign different amounts of networks  and hosts to an IP network. It essentially divides the IP address into  two parts: the network and host. This is a trading game- the more hosts  you have, the fewer networks you will have. And yet the more networks  you have, the fewer hosts you will have. Review the class A default  subnet masks as shown below.<\/p>\n<p style=\"text-align: center;\"><img decoding=\"async\" src=\"http:\/\/www.learn-networking.com\/wp-content\/oldimages\/class-a-subnet.jpg\" alt=\"class a subnet\" \/><\/p>\n<p>The class B network will need to recognize two network portions, and two host portions. This can be seen in the below diagram.<\/p>\n<p style=\"text-align: center;\"><img decoding=\"async\" src=\"http:\/\/www.learn-networking.com\/wp-content\/oldimages\/class-b-subnet.jpg\" alt=\"class b subnet\" \/><\/p>\n<p>Lastly, we have the class C subnet. It is the most commonly used  subnet, so pay special attention to it in the upcoming lecture. You can  see a diagram of the default subnet below.<\/p>\n<p style=\"text-align: center;\"><img decoding=\"async\" src=\"http:\/\/www.learn-networking.com\/wp-content\/oldimages\/class-c-subnet.jpg\" alt=\"class c subnet\" \/><\/p>\n<h3>We\u2019ve laid Down the Foundation, Let\u2019s Build the House!<\/h3>\n<p class=\"white\">We just reviewed the basics of IP addresses and subnet  masks. The bad news is, we usually don\u2019t use the default subnet mask at  all when we subnet a network! The good news is, learning how to subnet  isn\u2019t too hard. It will, however, take some practice.<\/p>\n<h3>An Example of Subnetting a Class C Network<\/h3>\n<p>Subnetting varies in difficulty, depending on which class you are  subnetting. More often than not, you will need to create a subnet for a  class C network. A class C network allows for many networks to be  created, but not as many hosts. In fact, you can create a hefty  2,097,152 networks- but only 254 hosts per network are allowed.<\/p>\n<p>Let\u2019s say we are subnetting a school\u2019s network. We need 5 separate networks that have 30 computers on each subnet.<\/p>\n<p>First we calculate how many usable subnets we need. Next we will need  to determine how many hosts are required. Both of these values can be  calculated with the following equations:<\/p>\n<p><strong>Two Important Equations to Remember:<\/strong><\/p>\n<ul>\n<hr \/>\n<li> <strong>1.<\/strong> Usable Subnets = (2^n) \u2013 2 , where N = power of bits assigned<\/li>\n<li><strong>2.<\/strong> Usable Hosts = (2^n) \u2013 2 , where N = power of bits remaining<\/li>\n<\/ul>\n<p>Let\u2019s start with usable subnets. Review the diagram below for a visual example.<\/p>\n<p style=\"text-align: center;\"><img decoding=\"async\" src=\"http:\/\/www.learn-networking.com\/wp-content\/oldimages\/subnet-problem.jpg\" alt=\"subnet practice\" \/><\/p>\n<p>If you are wondering what the \u201c-2\u201d part of the equation is for, this  is how we account for the two addresses in each subnet we can\u2019t use. We  will review what these addresses are for more specifically later on. For  now, let\u2019s find out what our usable hosts are!<\/p>\n<p style=\"text-align: center;\"><img decoding=\"async\" src=\"http:\/\/www.learn-networking.com\/wp-content\/oldimages\/subnet-solution.jpg\" alt=\"subnet solutions\" \/><\/p>\n<h3>Alright Already! What\u2019s My Subnet Mask?!<\/h3>\n<p class=\"white\">Getting your subnet mask at this point is incredibly  easy. Simply take all of your network bits, and add them up. Look at the  diagram below for a visual guide.<\/p>\n<p style=\"text-align: center;\"><img decoding=\"async\" src=\"http:\/\/www.learn-networking.com\/wp-content\/oldimages\/subnet-mask.jpg\" alt=\"subnet mask\" \/><\/p>\n<p>That\u2019s it! You\u2019re done. You have successfully created a subnet mask  that can be used on the school\u2019s network. Keep in mind that every  computer must have the subnet mask set in order for them to be on the  same network. Also note that since we are using a class C network, the  first three octets will always be 255. When subnetting other classes, be  sure to keep the network portions in mind.<\/p>\n<h3>Closing Comments<\/h3>\n<p>Subnetting may not be fun, but it is required for students to know on  networking exams. That means you should stay away from subnet  calculators until you have grasped the full concept of how to do it  yourself. These calculators should only be used as a time saving tool,  not a learning tool or way to cheat on homework.<\/p>\n<p>With enough practice, subnetting will become much easier. Class A and  Class B networks are a bit trickier, but follow the same example as  shown above and it should be quite easy to accomplish.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>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 255.255.255.0. This usually means that temporary or [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-233","post","type-post","status-publish","format-standard","hentry","category-networking-stuff"],"_links":{"self":[{"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=\/wp\/v2\/posts\/233","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=233"}],"version-history":[{"count":4,"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=\/wp\/v2\/posts\/233\/revisions"}],"predecessor-version":[{"id":2623,"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=\/wp\/v2\/posts\/233\/revisions\/2623"}],"wp:attachment":[{"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=233"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=233"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=233"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}