subnetting increment question...
chickenlicken09
Member Posts: 537 ■■■■□□□□□□
in CCNA & CCENT
Hi, is there a technique ye guys use to count up? eg you want to see if .242 sits in the .238 subnet.
Obviously i dont want to be counting up in increments of 16 for example in the exam, is there a quick way
to do this?
Thanks
Obviously i dont want to be counting up in increments of 16 for example in the exam, is there a quick way
to do this?
Thanks
Comments
-
sucanushie Member Posts: 163You can use the boolean and method.
for example...
192.168.1.242 /28
take your last octet in this example and convert it to Binary. Compare it to the mask, then if you have a 1 in the same spot in each then that is a 1 the rest are zeros.
Then convert your result back to decimal and that is your network address.
242- 11110010
240- 11110000
11110000 =240
So your network address is 240, and we know by the mask the increment is 16.
So your range is 192.168.1.240-192.168.1.255
I hope that makes sense. -
smcclenaghan Member Posts: 139Hi, is there a technique ye guys use to count up?
I do this:
for a question like: "Is 192.168.1.X/30 in the 192.168.1.Y/30 network?", I basically do this.
Is 128 lower than X? If not, add 64. Still too low? Add 32, etc...
Or, if 128 was too high to start, try 64, or 32, etc...
Basically keep adding this highest number you can without going over and never using a unit smaller than the subnet size (so 4 in the above example). Once you add a number, keep trying to add the largest number you can without going over.
So for 192.168.1.222/30 in 192.168.1.220/30, I do this:
128 < 251
128 + 64 = 192 < 222
128 + 64 + 32 = 224 > 222
ok, too far...
128 + 64 + 16 = 208 < 222
128 + 64 + 16 + 8 = 216 < 222
128 + 64 + 16 + 8 + 4 = 220 (we have to be done because we can't add numbers smaller than the subnet of 4), so 220, 221, 222, 223 included 222, so the answer is yes.
A lot of typing, but it goes quicker in your head. -
D-star Member Posts: 18 ■□□□□□□□□□I do the addition in my head which just takes practice to get faster. You will be surprised at how fast you can get multiples of 16 since you don't need to go higher than 255.
16 + 16 = 32
32 + 32 = 64
64 + 64 = 128
128 + 64 = 192
192 + 32 = 224
224 + 16 = 240
You will start to notice that many of the multiples of 16 are how you add up octets.