Soon, I will be faced with some subnetting questions and will not be allowed to use any form of calculator. I will be getting questions such as:
If you have IP address 192.168.50.0/28, determine the IP addresses that are useable as hosts.
It will then give me a list of IP addresses beginning with 192.168.50 and I have to pick out the ones which are useable by hosts. This means I have to leave out the subnetwork and broadcast addresses.
I need a really quick way to do this. Like a very quick way of drawing a subnet table. Or a quick way to determine which are useable and which are network/broadcast addresses just by looking at them.
Any tips will be appreciated.
If you're given a /28, identify the masked bits (1) and unmasked bits (0). 2^(masked bits) will be your no. of subnets and (2^[unmasked bits]-2) will be your no. of hosts.
/28 -> 11111111.11111111.11111111.11110000
Masked bits = 1111 = 4
Unmasked bits = 0000 =4
No. of subnets = 2^4 = 16 if ip subnet 0 is not allowed but you have to remove the first and last subnet giving you a total of 14 subnets.
No. of hosts = (2^4)-2 = 14 because the network and broadcast address is not used.
To identify the network address, find the decimal eqivalent of the octet. For example, 11110000 gives you 240. Then subtract it from 256. This will be your block size thus your 1st address will be .0 then .16 then so on... Your broadcast address is 1 less than the next network address like .15 then .31 and so on...
Class C /26 -> 11111111.11111111.11111111.11000000
Masked bits = 11 = 2
Unmasked bits = 000000 = 6
No. of subnets = 2^2 = 4
No. of hosts = (2^6)-2 = 62
256 - 192 = 64
Network address = .0, .64, .128 and so on...
Broadcast address = .63, .127, .191 and so on...
I have attached some additional reference...
Hope this helps...
Wow! Thank you very much! I had found out my own way of finding the block size for the network address after concentrating on it very desperately but your way of taking away 256 from the subnet network bits is so much easier!
Thank your for the spreadsheet as well. I have saved it and will go through it soon.
Yes it will do but it is quite difficult to get the result of 2^(unmasked bits) if it's more than 8. You see the same process goes for the no. of subnets by raising 2^(masked bits) 3rd octet for class B and 2nd octet for class A. But if you'll have /10 for example, you'll have to get the result of 2^22.
Try viewing my attachment to get a clearer idea of subnetting. And of course, if you'd be able to get some new ideas from it, these are very much welcome.
I do not want to confuse the way you think about subnetting now, However you must think in Binary. Use the binary byte template and burn it in your head.
x x x x x x x x
128 64 32 16 8 4 2 1
Know this and you can implement any subnet mask into it. From this you can gather the amount of addresses allowed minus (2).
So for your example above
192.168.50.0 / 28
The 28 means 28 bit mask which goes to the 4th bit from the left. All remaining bits are a max of 8 combinations, so you have a max of 8 addresses to use minus (2) addresses for the subnet and broadcast. So you can only use (6) addresses. So it will be 192.168.50.1 thru to 192.168.50.6 . Hope this helps..Good Luck.....
Does anyone know a quick way of doing 2 to the power of x without a calculator and without multiplying 2 by itself continuously?
Just remember that any number to the power of Zero is always 1. So 2^0 = 1. 2^1 = 2, then just double the numbers as you go up.
2^2 = 4
2^3 = 8
2^4 = 16
2^5 = 32
and so on 64, 128, 256, 512, 1024, 2048, 4096....
I remember those questions...
I've never used subnet tables, so can't recommend that, but there is a very quick method (if you teach yourself before the exam), that'll sort these type of questions out.
Write out 128 64 32 16 8 4 2 1
In your example, the mask is /28, so you know you are dealing with the last octect.
Moving slightly away from your example, if they gave you 192.168.50.50, then mark 50 (32+16) and you will instantly see that you are dealing with 192.168.50.48 as a subnet. Fill the rest of the octect and you get 63, the broadcast. So very quickly, you know the subnet, broadcast, host range (49 to 62), and next subnet. This should make it easy to spot the right and wrong addresses they give in the list of choices.
I found it quite easy, but if you've not done this before it might seem strange at first, but it worked for me.
Memorize (or write down):
1 - 128
2 - 192
3 - 224
4 - 240
5 - 248
6 - 252
7 - 254
Each bit beyond a Class boundary (let's use the most simple - Class C) takes you down 1 level. Since a Class C is /24, let's add 1 and make it a /25 mask, which takes us to the first memorized number, 128. With this, your subnets will be .0 and .128 (using this process, subnets are separated by 256 minus the number in the memorized list, i.e 128). Exclude the first address (which will be your subnet number) and the last address (the broadcast address), and that gives you the list of useable host IP's.
If you need to use, say, a /28 mask (Class C boundary + 4), just step down the list - 128, 192, 224, 240, and you have hit your subnet mask. Subtract the mask from 256 (256 - 240 = 16), and you determine your subnets (multiples of 16: 0, 16, 32, 48, 64, etc.). Take away the first address (subnet) and the last (broadcast), and you will find that you have 14 useable host IP's.
Really just another way of expressing what malambert stated, but the way it worked for me. That's really the key - finding a way that it makes sense to you as an individual.