Question by naz m: Data Communication & Networking. IPv4?
Hey there..
Given a network IPv4 address of 166.48.13.50 and a subnet mask of 255.255.255.248.0
1)What is the network class?
i know it’s class B after converting ip address to binary..
2)How many subnets are created?
i dont know what is the formula..
3)How many host are there per subnet?
For Question 2 & 3,
I’ve done the bitwise AND of address and mask which is;
10100110.00110000.00001101.00110000 = 166.48.13.48
i dont know which bits to take to answer question 2 & 3..
Best answer:
Answer by jnojr
You should be learning subnetting, not asking your homework questions here.
A Class B (which is an old term, for years it’s been a /16 ) has a mask of 255.255.255.0
255.255.255.248 is a /29 It is most emphatically NOT a “Class B”
I remember having a really tough time with the concept of subnetting. It was a giant mystery to me. I broke through with “Teach Yourself TCP/IP in 24 Hours” by SAMS Publishing Now, this was probably 13 years ago, so I have no idea if it’s still around, or if you could find a 13 year old copy at abebooks.com for a couple of bucks.
Trust me… it’s worth it to really understand this concept. If you don’t, networking will be an enormous PITA for you. And when you do, you stand heads and shoulders above others. When I’m hiring, I always do a technical screen, and some simple questions like this quickly sort out those who have some idea what they’re talking about vs. those who have passed some tests.
Add your own answer in the comments!
1) as you determined, the network is a class B. Given the mask it has been subnetted.
2) Well you know you started with a /16. 255.255.255.248 is a /29. The difference is 13 bits. So those additional bits went toward the subnets. there are 2^13 subnets: 8192 subnets
3) hosts use the remaining bits. It’s a /29 so that leaves 32-29=3 bits for hosts. 2^3 is 8. Subtract off the two reserved hosts per subnet and you get 6 available host addresses per subnet.
The purpose of determining the class in part 1 was so you could determine how many bits were used for subnets in part 2.
One of the other posters told you that a /29 is not a class B. If something cares about the network “class” the *only* thing that matters is the first three bits of the first octet. 166.48.13.50 is absolutely and unequivocally a class B address. The fact that it’s /29 tells you that you are doing classless routing. But to any classful router (which would be lucky to still be running
it’s a class B.