Stuck on CIDR
random ip : 191.253.169.201 /22
1011111.11111101.10101001.11001001
now to find subnet mask....
/22
22/8=2 with 6 remainder
255.255.???.0
I know what it is only because i looked . . (255.255.252.0)
but. How do i get to that 252?
1011111.11111101.10101001.11001001
now to find subnet mask....
/22
22/8=2 with 6 remainder
255.255.???.0
I know what it is only because i looked . . (255.255.252.0)
but. How do i get to that 252?
Comments

jahaziel Member Posts: 175 ■■■□□□□□□□128 + 64 + 32 + 16 + 8 + 4 = 252 since you have 6 bits left you can do backwards math. Start at 128 then divide by 2 you get 64. Keep going till you have 6 bits taken. Then add all of it together to get your answer.
Best way, I can explain it. 
{davros} Registered Users Posts: 3 ■□□□□□□□□□so
128 is 1 bit 64 is 2nd bit etc. . 4 is the 6th bit, add them up 252.
say it was a remainder of 3 that would be
128+64+32= 224 lol wrong. 
Jon_Cisco Member Posts: 1,772 ■■■■■■■■□□well the /22 is the shorthand. To understand it you need to follow the binary.
N for network
H for host
NNNNNNNN.NNNNNNNN.NNNNNNHH.HHHHHHHH
so you have 22 network bits hence the /22
Now convert that to binary mask. 1s for network 0s for host
11111111.11111111.11111100.00000000
binary numbers
128/64/32/16/8/4/2/1 add them up and you get 255 for your octet.
so the first two are 255.255.?.?
next octet does not have the 2/1 because they are 0s so 2553=252 or (128+64+32+16+8+4=252)
last octet is all 0s so the final subnet mask is 255.255.252.0
Keep in mind this is a long explanation just to describe the parts. It's pretty simple with a little practice but you need to remember your binary math.
try this site for practice
Subnetting Practice Questions 
johnpfusco Registered Users Posts: 2 ■□□□□□□□□□The guy in the video below in my opinion explains CIDR better than anyone else. Once you think you got it use the practice site below to test your knowledge. Hope this helps.
Joshua Butcher CIDR video
https://www.youtube.com/channel/UC26h2eo1F4VwLpN1pjrl9Ew
Practice site:
Subnetting Quiz #2 (CIDR)