- Posts: 1700
- Thank you received: 0
Subnetting tips and tricks
21 years 1 month ago #1044
by sahirh
Sahir Hidayatullah.
Firewall.cx Staff - Associate Editor & Security Advisor
tftfotw.blogspot.com
Subnetting tips and tricks was created by sahirh
What cool method do you have when subnetting.. how do you calculate ranges, or remember how many bits per mask ?
Post away.. this should benefit everyone.
I personally always write down
128 64 32 16 8 4 2 1
for quick conversion. This is not really a trick.. but it makes conversion really quick and easy.
eg :
binary address: x.x.x.11001011
convert :
[code:1]
128 64 32 16 8 4 2 1
1 1 0 0 1 0 1 1
add all the numbers above a '1'
128 + 64 + 8 + 2 + 1 = 203
[/code:1]
another thing that helped me is identifying certain numbers in binary.. so if you look at
00000100 and you know that 100 in binary = 4 in decimal... you get the point ? It counts like this
[code:1]
DEC BIN
0 - 0
1 - 1
2 - 10
3 - 11
4 - 100
5 - 101
6 - 110
7 - 111
8 - 1000
9 - 1001
10 - 1010
[/code:1]
You see the pattern ?
All these things can help you do your subnet math much quicker on the exam when time is a problem.
So go on, get started with tips !
btw use the [code] tags in your post to format whitespace properly
Cheers,
Post away.. this should benefit everyone.
I personally always write down
128 64 32 16 8 4 2 1
for quick conversion. This is not really a trick.. but it makes conversion really quick and easy.
eg :
binary address: x.x.x.11001011
convert :
[code:1]
128 64 32 16 8 4 2 1
1 1 0 0 1 0 1 1
add all the numbers above a '1'
128 + 64 + 8 + 2 + 1 = 203
[/code:1]
another thing that helped me is identifying certain numbers in binary.. so if you look at
00000100 and you know that 100 in binary = 4 in decimal... you get the point ? It counts like this
[code:1]
DEC BIN
0 - 0
1 - 1
2 - 10
3 - 11
4 - 100
5 - 101
6 - 110
7 - 111
8 - 1000
9 - 1001
10 - 1010
[/code:1]
You see the pattern ?
All these things can help you do your subnet math much quicker on the exam when time is a problem.
So go on, get started with tips !
btw use the [code] tags in your post to format whitespace properly
Cheers,
Sahir Hidayatullah.
Firewall.cx Staff - Associate Editor & Security Advisor
tftfotw.blogspot.com
21 years 1 month ago #1053
by tfs
Thanks,
Tom
Replied by tfs on topic Re: Subnetting tips and tricks
I am trying to remember the trick I used for the CCNA test that worked really well. You can't bring your tables into the test, but what I did, was create all my tables and tips before I started the tests. This one works well for trying to figure out how many subnets and hosts will be available for each bit you borrow.
You set up your table (could be across or down) with
1) The number of bits across the top (don't worry if it isn't valid - the point is to quickly create the table under stress and the test is stressful).
2) The next row will be your number of networks and starts with the number 2 (number of possible patterns per bit - 0 and 1). This should be under the number 1. Keep doubling the number until you get to the end. For example, 2 doubled is 4, 4 doubled is 8, 8 doubled is 16 etc.
3) The last row is your number of hosts. You don't need to calculate it. Just take the number at the end of the previous row and put at the beginning, under the first column, which will have 1 and 2 in the first 2 rows (in a class C network with 8 bits, this will be 256, if class B it will be 65536). Then take the next to the last and put it under the 2nd row (in class C this will be 128). What you are doing is just reversing the numbers. Continue until you fill the row. When you are done, you should find 2 in the last column.
It should look like the following for a class C network:
[code:1]
# bits 1 2 3 4 5 6 7 8
# Networks 2 4 8 16 32 64 128 256
# Hosts 256 128 64 32 16 8 4 2
[/code:1]
These are the number of POSSIBLE networks and hosts (not usable). For USABLE, subtract 2 from each number.
What you do is figure out how many bits you want to borrow and the number of POSSIBLE networks will be directly below. The number of POSSIBLE hosts will be down and one to the right. For example, in the Class C network above, if you want to borrow 5 bits, you would :
1) Look for the number 5 in the first row and go directly down and in the 2nd row you would find 32. This is your number of POSSIBLE networks. Your USABLE networks will be 32 (32 - 2 = 30).
2) Now, go directly down and to the right and you will find the number 8. This is your number of POSSIBLE hosts. Your number of USABLE hosts is 6 ( 8 - 2 = 6).
Now the reason why you don't have set up valid bits (1, 7 and 8 are not valid), is because you will figure it out when you subtract 2 for to get your number of usable networks. For example, if you tried to pick 1, you would find 2 POSSIBLE Networks, but when you subtract 2 you get 0 networks (obviously, this won't fly). If you pick 7, you will get 2 POSSIBLE hosts, but after subtracting 2 to get the number of USABLE hosts, you will get 0 (again, what would be the point). 8 bits won't work as there is nothing in the hosts row.
This may look a little complicated to do at test time, but believe me it isn't and only takes a couple of minutes to set up. It works for all classes (for class B - you would have 16 columns and for class A - you would have 24 columns). When you first sit down at the table, you just build all three tables, and then you won't have to worry about it during the test. If you try to figure it out each time it comes up - and it will come up a few times during the test - you can easily make a mistake in your calculation (and we don't want that - do we?).
You set up your table (could be across or down) with
1) The number of bits across the top (don't worry if it isn't valid - the point is to quickly create the table under stress and the test is stressful).
2) The next row will be your number of networks and starts with the number 2 (number of possible patterns per bit - 0 and 1). This should be under the number 1. Keep doubling the number until you get to the end. For example, 2 doubled is 4, 4 doubled is 8, 8 doubled is 16 etc.
3) The last row is your number of hosts. You don't need to calculate it. Just take the number at the end of the previous row and put at the beginning, under the first column, which will have 1 and 2 in the first 2 rows (in a class C network with 8 bits, this will be 256, if class B it will be 65536). Then take the next to the last and put it under the 2nd row (in class C this will be 128). What you are doing is just reversing the numbers. Continue until you fill the row. When you are done, you should find 2 in the last column.
It should look like the following for a class C network:
[code:1]
# bits 1 2 3 4 5 6 7 8
# Networks 2 4 8 16 32 64 128 256
# Hosts 256 128 64 32 16 8 4 2
[/code:1]
These are the number of POSSIBLE networks and hosts (not usable). For USABLE, subtract 2 from each number.
What you do is figure out how many bits you want to borrow and the number of POSSIBLE networks will be directly below. The number of POSSIBLE hosts will be down and one to the right. For example, in the Class C network above, if you want to borrow 5 bits, you would :
1) Look for the number 5 in the first row and go directly down and in the 2nd row you would find 32. This is your number of POSSIBLE networks. Your USABLE networks will be 32 (32 - 2 = 30).
2) Now, go directly down and to the right and you will find the number 8. This is your number of POSSIBLE hosts. Your number of USABLE hosts is 6 ( 8 - 2 = 6).
Now the reason why you don't have set up valid bits (1, 7 and 8 are not valid), is because you will figure it out when you subtract 2 for to get your number of usable networks. For example, if you tried to pick 1, you would find 2 POSSIBLE Networks, but when you subtract 2 you get 0 networks (obviously, this won't fly). If you pick 7, you will get 2 POSSIBLE hosts, but after subtracting 2 to get the number of USABLE hosts, you will get 0 (again, what would be the point). 8 bits won't work as there is nothing in the hosts row.
This may look a little complicated to do at test time, but believe me it isn't and only takes a couple of minutes to set up. It works for all classes (for class B - you would have 16 columns and for class A - you would have 24 columns). When you first sit down at the table, you just build all three tables, and then you won't have to worry about it during the test. If you try to figure it out each time it comes up - and it will come up a few times during the test - you can easily make a mistake in your calculation (and we don't want that - do we?).
Thanks,
Tom
21 years 1 month ago #1103
by sahirh
Sahir Hidayatullah.
Firewall.cx Staff - Associate Editor & Security Advisor
tftfotw.blogspot.com
Replied by sahirh on topic Re: Subnetting tips and tricks
If you want to quickly calculate your subnet, broadcast and valid host range heres how you can do it (this is the method Todd Lammle uses in his CCNA guide books):
192.168.10.34
255.255.255.224
Ok so the first thing we do is find out which subnet this is in :
256 - 224 = 32
first subnet - 32
second subnet 32 + 32 = 64 ---- thats it ! our IP falls between 32 and 64.
Therefore the subnet address is 192.168.10.32, the broadcast is one less than the next subnet (64) thus its 192.168.10.63 and the valid host range is between these two.. therefore 33 - 62
Voila.
You can do that in your head.
192.168.10.34
255.255.255.224
Ok so the first thing we do is find out which subnet this is in :
256 - 224 = 32
first subnet - 32
second subnet 32 + 32 = 64 ---- thats it ! our IP falls between 32 and 64.
Therefore the subnet address is 192.168.10.32, the broadcast is one less than the next subnet (64) thus its 192.168.10.63 and the valid host range is between these two.. therefore 33 - 62
Voila.
You can do that in your head.
Sahir Hidayatullah.
Firewall.cx Staff - Associate Editor & Security Advisor
tftfotw.blogspot.com
20 years 10 months ago #2328
by indebluez
Replied by indebluez on topic Re: Subnetting tips and tricks
hi tfs:)
i looked at what u said again n again....but it doesnt sink it
could u jus give an example? plzz:) thx in advance
i looked at what u said again n again....but it doesnt sink it
could u jus give an example? plzz:) thx in advance
20 years 10 months ago #2345
by sahirh
Sahir Hidayatullah.
Firewall.cx Staff - Associate Editor & Security Advisor
tftfotw.blogspot.com
Replied by sahirh on topic Re: Subnetting tips and tricks
Hehe the poor man went to the trouble of using colour as well ! Its actually quite straightforward inde, just write it down on a sheet of paper :
at the top you write the number of subnetting bits you borrow, the second is the number of possible networks, thus if you borrow one bit, you have two possible networks..
the last row is possible hosts, its the same as the middle line but backwards..
Remember, lines 2 and 3 are 'possible' network and hosts.. you have to subtract 2 --- -1 for the network address, and -1 for the broadcast. Meaning if you have a class C network subnetted like
192.168.1.32
255.255.255.224
The hosts you can actually use for the first network are
192.168.1.33 - 62. This is because you can't use 192.168.1.32 (its the network address) and you can't use 192.168.1.63 because its the broadcast address for the subnet.
192.168.1.64 is where the next network starts..
Tfs' post helps you very quickly build a table that shows you exactly how many possible hosts and networks you have for each borrowed bit. Very useful.
[if our explanations confuse you, go read the section on subnetting on the site, you will see the light )
at the top you write the number of subnetting bits you borrow, the second is the number of possible networks, thus if you borrow one bit, you have two possible networks..
the last row is possible hosts, its the same as the middle line but backwards..
Remember, lines 2 and 3 are 'possible' network and hosts.. you have to subtract 2 --- -1 for the network address, and -1 for the broadcast. Meaning if you have a class C network subnetted like
192.168.1.32
255.255.255.224
The hosts you can actually use for the first network are
192.168.1.33 - 62. This is because you can't use 192.168.1.32 (its the network address) and you can't use 192.168.1.63 because its the broadcast address for the subnet.
192.168.1.64 is where the next network starts..
Tfs' post helps you very quickly build a table that shows you exactly how many possible hosts and networks you have for each borrowed bit. Very useful.
[if our explanations confuse you, go read the section on subnetting on the site, you will see the light )
Sahir Hidayatullah.
Firewall.cx Staff - Associate Editor & Security Advisor
tftfotw.blogspot.com
20 years 10 months ago #2346
by Chris
Chris Partsenidis.
Founder & Editor-in-Chief
www.Firewall.cx
Replied by Chris on topic Re: Subnetting tips and tricks
Top post on subnetting tricks Sahir!! We must include such a page in the subnetting topic as I'm sure a lot of people will want to read it, considering that subnetting is one of the most hottest topics on the site!!!!!!
Chris Partsenidis.
Founder & Editor-in-Chief
www.Firewall.cx
Time to create page: 0.135 seconds