-1

The address of a class B host is to be split into subnets with a 6-bit subnet number. What is the maximum number of subnets and the maximum number of hosts in each subnet?

  1. 62 subnets and 262142 hosts.
  2. 64 subnets and 262142 hosts
  3. 62 subnets and 1022 hosts.
  4. 64 subnets and 1022 hosts.

My attempt :

In class B network ID is 16 bits. Given 6 bits for subnet ID, so remaining bits for host ID is = 32- (16+6) = 10 bits.

Maximum number of hosts in each subnet = 2^(number of bits for hosts) - 2(all 0's and all 1's not allowed in hosts IDs, because first is subnet ID while last is broadcast ID) = 2^10 - 2 = 1022.

I've read somewhere :

Subtracting 2 from host IDs is necessary while subtracting 2 from 
subnet IDs is not necessary.

So, maximum number of subnet IDs is = 2^(number of bits for subnet ID) - 2(not compulsory) = 2^6 = 64 is maximum.

Can you explain please, Is subtracting 2 from subnet ID necessary?

  • I think the minimum IP in a range will be required for the Network id and maximum will be used for broadcast purpose, that's why you'll have to reduce the available IPs from hosts. See here the calculation http://jodies.de/ipcalc?host=192.168.0.1&mask1=24&mask2= – 11thdimension Nov 29 '15 at 15:53

1 Answers1

1

Many years ago, you had to subtract 2 from the number of subnets, and older network documentation and training still states this. This was clarified in an RFC to not be the case. With the IPv4 address shortage, you need to be able to use every subnet available.

FYI, there is one exception to the rule about not using the subnet and broadcast addresses for hosts: you can use a /31 subnet for point-to-point links. The RFC which clarifies this is 15 years old, but many people still use /30 thinking it is the smallest subnet available. Using /31 will double the number of point-to-point links which you can have.

Ron Maupin
  • 6,180
  • 4
  • 29
  • 36
  • Thanks for explanation. –  Nov 30 '15 at 07:15
  • I really don't know. It may have something to do with asking a question that has nothing to do with programming on a programmer's site. I suppose this really belongs on the Network Engineering site. – Ron Maupin Jan 16 '16 at 16:18