In: Computer Science
Given a network of Class B, how many bits should be borrowed from the HostID in order to build 100 subnets with 200 host in each one of them?
Hint: this question have multiple answers, write all the possible answers and necessary calculation steps and explanation.
IP Address:
An IP address is an identifier or label used to identify a machine on the internet or a particular network. Each of the devices on the internet must have an IP address for identification.
IPv4 is the first version of Internet Protocol that uses a 32-bit address and this protocol is most widely used.
The netmask and subnet mask is used to divide the IP address as given below:
The netmask is a sequence of '1' followed by a sequence of '0' and it is used to divide an IP address into multiple subnets.
The subnet mask is a sequence of '1' followed by a sequence of '0' and it is used to separate a big network into smaller multiple networks.
Class B:
First octet range: 128 to 191
Subnet mask = 255.255.0.0
In class B network, the first 16 bits are used for the network id and the last 16 bits are used for the host id.
In order to build 100 subnets, we need at least 7 bits because by using the 6 bits, we can create 26 = 64 subnet but by using 7 bits, we can create 27 = 128 subnet.
For 200 hosts, we need at least 8 bits because by using the 7 bits, we can create 27 -2 = 126 host addresses but by using 8 bits, we can create 28 -2 = 256 - 2 = 254 host addresses.
The first and the last address in each of the subnet is used for a special purpose. So, both of these addresses can't be assigned to the host.
We need to borrow 7 + 8 = 15 bits for the given requirement.
So, we have to options to borrow the host bits: