Sie sind auf Seite 1von 8

How to Subnet a Network 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. 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 youre a little rusty on the basics of subnetting, dont worry. Well 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 192.168.2.1. 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.

The IP version 6 protocol was created for when the transition is needed. Most computers dont 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 egad!) Classes 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. 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.

Now the bad news: you must memorize each range for each class if you hope to pass most network exams. Dont worry! Its actually easy- just memorize how we get the numbers, not the numbers themselves! All you have to do is remember n^8 (read as n to the eighth power), and how many network portions each class has. Review the diagram below.

One final note before we move on. Notice how we didnt use the IP address 127 for the class A network- thats 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. Subnet Masks 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.

The class B network will need to recognize two network portions, and two host portions. This can be seen in the below diagram.

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.

Weve laid Down the Foundation, Lets Build the House! We just reviewed the basics of IP addresses and subnet masks. The bad news is, we usually dont use the default subnet mask at all when we subnet a network! The good news is, learning how to subnet isnt too hard. It will, however, take some practice. An Example of Subnetting a Class C Network 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. Lets say we are subnetting a schools network. We need 5 separate networks that have 30 computers on each subnet. 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: Two Important Equations to Remember: 1. Usable Subnets = (2^n) 2 , where N = power of bits assigned 2. Usable Hosts = (2^n) 2 , where N = power of bits remaining Lets start with usable subnets. Review the diagram below for a visual example.

If you are wondering what the -2 part of the equation is for, this is how we account for the two addresses in each subnet we cant use. We will review what these addresses are for more specifically later on. For now, lets find out what our usable hosts are!

Alright Already! Whats My Subnet Mask?! 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.

Thats it! Youre done. You have successfully created a subnet mask that can be used on the schools 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. Closing Comments 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. 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.

Subnetting Notes for Beginners


Here are some notes on IP subnetting for beginners. 1 and 1 = 1, everything else = 0. An IP v4 IP address is 32 bit and made up of four octets, each 8 bits long. The minimum octet value is 0 and the maximum octet value is 255. 4 x 8 = 32. The decimal notation to binary chart for IP subnetting is: 128, 64, 32, 16, 8, 4, 2, 1 The sum of which is 255 (128+64+32+16+8+4+2+1). 128 is the first 1 in binary chart, 1 is the last. To convert a IP address from decimal to binary separate each octet, e.g. 203.170.50.1 203 = 128+64+8+2+1 or 11001011 170 = 128+32+8+1 or 10101001

50 = 32+16+2 or 00110010 1 = 00000001 1 and 1 = 1 1 and 0 = 0 0 and 1 = 0 0 and 0 = 0 If your IP address is 192.168.183.91 and your subnet mask is 255.255.255.224 you can find the network address as follows: Convert 192.168.183.91 to binary: 192=11000000, 168=10101000, 183 =10110111, 91=01011011 In full: 11000000101010001011011101011011 Convert 255.255.255.224 to binary: 255=11111111, 255=11111111, 255=11111111, 224=11100000 In full: 11111111111111111111111111100000 Now use Boolean algebra (anding) to identify the network address in binary format, remember only 1 and 1 = 1. IP Address: Subnet Mask: 11000000101010001011011101011011 11111111111111111111111111100000

Network Address: 11000000101010001011011101000000 11000000.10101000.10110111.01000000 = 192.168.183.64 We now know the IP address: 192.168.183.91 has a subnet mask of 255.255.255.224, a network address if 192.168.183.64. We can calculate the broadcast by subtracting the number of missing bits from the subnet mask, example: 255.255.255.255 255.255.255.224 = 31. Network Address 192.168.183.64 + 31 = 95 The network broadcast address is 192.168.183.95

Das könnte Ihnen auch gefallen