IP Addresses

Question 1
If a class B network on the Internet has a subnet mask of 255.255.248.0, what is the maximum number of hosts per subnet?
A
1022
B
1023
C
2046
D
2047
       Computer Networks        IP Addresses       Gate-2008
Question 1 Explanation: 
255.255.248.0 can be written as 11111111.11111111.11111000.00000000
Number of bits assigned for host id is the number of zeros in subnet mask. Here 11 bits are used.
for host id so maximum possible hosts are= 211 -2=2046
Question 2
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?
A
62 subnets and 262142 hosts.
B
64 subnets and 262142 hosts.
C
62 subnets and 1022 hosts.
D
64 subnets and 1024 hosts.
       Computer Networks        IP Addresses       Gate-2007
Question 2 Explanation: 
It is a class B address, so there 16-bits for NID and 16-bits for HID.
From HID, we took 6-bits for subnetting.
Then total subnets possible = ( 26 ) - 2 = 64
Total hosts possible for each subnet = (210) - 2 = 1022
Question 3
The subnet mask for a particular network is 255.255.31.0. Which of the following pairs of IP addresses could belong to this network?  
A
172.57.88.62 and 172.56.87.233
B
10.35.28.2 and 10.35.29.4
C
191.203.31.87 and 191.234.31.88
D
128.8.129.43 and 128.8.161.55
       Computer Networks        IP Addresses       Gate-2003
Question 3 Explanation: 
To find whether hosts belong to same network or not , we have to find their net id, if net id is same then hosts belong to same network and net id can be find by ANDing subnet mask and IP address.
128.8.129.43 (Bitwise AND) 255.255.31.0 = 128.8.1.0
128.8.161.55 (Bitwise AND) 255.255.31.0 = 128.8.1.0
There are 3 questions to complete.