Axis wrote:
Infinite wrote:
One thing I tend to do a lot in my head is count the bits in binary. eg. 1 2 4 8 16 32 64 128. But actually, I do it backwards since this is all represented in little endian. 128 64 32 16 8 4 2 1.
I also find that I need to remember the addition as well. 128 192 224 240 248 252 254 255.
128+64=192
192+32=224
224+16=240
240+8=248
248+4=252
252+2=254
254+1=255
By memorizing those two sets of numbers I find I can calculate a given subnet fairly quickly.
Not bad, actually pretty helpful for doing it in my head without the chart...just take the sum, subtract it from 256 and you have your range of ips. So...
Normally when I do subnetting in my head without the "Magic Chart" I follow some crazy math logic like converting binary in my head
What are the subnet and broadcast IPs for host 10.65.231.31/22?
22 is 22 bits on 11111111.11111111.11111100.00000000
255.255.xxx.0
take the 6 bits on in the 3rd octet and add them up 128+64+32+16+8+4=252
256-252 = 4
So we know the ips are in multiples of 4
4x 60 is 240 which is too high, but close enough to know that if you take 2 away you're at 232 so make it 3 and your at 228.0 which is your subnet ip address and that makes 231.255 the broadcast
However doing it that way, I know the last bit on is the 6th so 248+4 = 252
256-252 = 4
Way less steps and less steps = less time, I'm down with that...thanks

That's nuts.
I just take the IP 10.65.231.31/22 and think in terms of /8, /16. /24 where is it? /22 is two binary bits into the 3rd octet from the right, which makes the Subnet increment a multiple of 4, then just figure out the closest common multiple of 4 and 231, which 228. making 228.0 the network, 231.255 the broadcast and everything in the middle fair game.
What I have the most trouble with are story type question, ones that require several types of calculations to arrive at the correct answer, like "given the IP address 10.10.0.0 devise an IP scheme that will allow for up to 500 hosts, but no more then 32 subnets". I though that out there, I didn't bother to look if it's even possible.