Stumbled accross this on another forum and thought I'd make a stab at answering it. Keep in mind that I'm no teacher, so what makes sense to me, may not help another. I've added a link below to additional help.
Ok, we have an IP address of 22.214.171.124 which we know is a "B" class (255.255.0.0)
But the subnet mask given was 255.255.252.0
How did they get the .252??
Another example.....126.96.36.199 (Which is a "C" class, 255.255.255.0)
Yet the subnet given is 255.255.255.224.
How did they arrive at the .224?
Is this a matter of subnetting, or is this a CIDR issue.
Keep in mind that the subnet mask defines the network by defining, or segregating the network bits in an address from the host bits.
Class B subnet mask begins
at 255.255 0.0. As you move down the heirarchy of subnets, the mask will further define lower level networks. The highest level Class B networks will use 255.255.0.0 as a subnet mask.
255.255.0.0 - Top level Class B Network = 11111111.11111111.00000000.00000000
255.255.128.0 - Second level subnet = 11111111.11111111.10000000.00000000
255.255.192.0.- Third level subnet = 11111111.11111111.11000000.00000000
255.255.224.0 - Fourth level subnet = 11111111.11111111.11100000.00000000
255.255.240.0 - Fifth level subnet = 11111111.11111111.11110000.00000000
255.255.248.0 - Sixth level subnet = 11111111.11111111.11111000.00000000255.255.252.0 - Seventh level subnet = 11111111.11111111.11111100.00000000
255.255.254.0 - Eighth level subnet = 11111111.11111111.11111110.00000000
These are all Class B subnet masks.
255.255.255.0 - Top level Class C network = 11111111.11111111.11111111.00000000
255.255.255.128 - Second level subnet = 11111111.11111111.11111111.10000000
And so on for Class C.Learn to Subnet