Data Comm: IPv4 - Network Class, Subnets & Hosts

  • Thread starter Thread starter naspek
  • Start date Start date
  • Tags Tags
    Data
Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
1 reply · 2K views
naspek
Messages
176
Reaction score
0
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 don't 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 don't know which bits to take to answer question 2 & 3..

Please guide me..
 
Physics news on Phys.org
Given a network IPv4 address of 166.48.13.50 and a subnet mask of 255.255.255.248.0

Can you confirm that the subnet mask is 255.255.248.0.

1)What is the network class?
i know it's class B after converting ip address to binary..

I believe you can also look at them in decimal and do the same.

Class A = Decimal 001 - 126 or Binary 0xxx xxxx
Class B = Decimal 128 - 191 or Binary 10xx xxxx
Class C = Decimal 192 - 223 or Binary 110x xxxx

2)How many subnets are created?
i don't know what is the formula..

You can notice from doing bitwise AND calculations that when one of the numbers is 255 (1111 1111) after the calculation you will always get the other number as your answer. For this reason, you really only need to look at the first non-255 number in the subnet mask.

In your example of 255.255.248.0 the first non-255 number is 248 or 1110 0000. In fact you will notice subnet mask's first non-255 number in general is always one of 128 (1000 0000), 192 (1100 0000), 224 (1110 0000), 240 (1111 0000), 248 (1111 1000), 252 (1111 1100) or 254 (1111 1110) [sometimes it is actually 255 (1111 1111)], and you should see a pattern in these numbers that helps you understand the purpose of subnet masks. i.e to split up a single large network into several smaller networks.

Each of these binary numbers shows you how many bits are used in the subnet, so for 128 you will see that 1 bit is used, and for 192 2 bit's are used (since there's 2 1's in the equivalent binary number) and for 224 there's 3 bit's used etc. When we get to 248 we see that there is 5 bits used, so how many binary combination's can you have with 5 bit's?

This will tell you the maximum number of allowable subnets.

3)How many host are there per subnet?

Since we have used 8 + 8 + 5 bits in the subnet mask (255.255.248.0 = 1111 1111.1111 1111.1111 1000.0000 0000) there is 3 + 8 = 11 bits left that we can use to describe the IP addresses for each host on each subnet. So how many binary combination's can you have with 11 bits?

This will tell you the maximum number of allowable hosts per subnet.