# IP Addressing

• Last Updated : 02 Dec, 2021

 Question 1
In the IPv4 addressing format, the number of networks allowed under Class C addresses is
 A 2^14 B 2^7 C 2^21 D 2^24
IP Addressing    IP Addressing
Discuss it

Question 1 Explanation:
In class C, 8 bits are reserved for Host Id and 24 bits are reserved for Network Id. Out of these 24 Network Id bits, the leading 3 bits are fixed as 110. So remaining 21 bits can be used for different networks. See this for more details.
 Question 2
In the IPv4 addressing format, the number of networks allowed under Class C addresses is
 A 2^14 B 2^7 C 2^21 D 2^24
IP Addressing    IP Addressing
Discuss it

Question 2 Explanation:
In class C, 8 bits are reserved for Host Id and 24 bits are reserved for Network Id. Out of these 24 Network Id bits, the leading 3 bits are fixed as 110. So remaining 21 bits can be used for different networks. See this for more details.
 Question 3
A n Internet Service Provider (ISP) has the following chunk of CIDR-based IP addresses available with it: 245.248.128.0/20. The ISP wants to give half of this chunk of addresses to Organization A, and a quarter to Organization B, while retaining the remaining with itself. Which of the following is a valid allocation of addresses to A and B?
 A 245.248.136.0/21 and 245.248.128.0/22 B 245.248.128.0/21 and 245.248.128.0/22 C 245.248.132.0/22 and 245.248.132.0/21 D 245.248.136.0/24 and 245.248.132.0/21
GATE CS 2012    IP Addressing
Discuss it

Question 3 Explanation:
 Question 4
Suppose computers A and B have IP addresses 10.105.1.113 and 10.105.1.91 respectively and they both use the same netmask N. Which of the values of N given below should not be used if A and B should belong to the same network?
 A 255.255.255.0 B 255.255.255.128 C 255.255.255.192 D 255.255.255.224
GATE CS 2010    IP Addressing
Discuss it

Question 4 Explanation:
 Question 5
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
GATE CS 2008    IP Addressing
Discuss it

Question 5 Explanation:
 Question 6
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.
GATE-CS-2007    IP Addressing
Discuss it

Question 6 Explanation:
 Question 7
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
GATE-CS-2003    IP Addressing
Discuss it

Question 7 Explanation:
Background required - Subnetting and SubNet Mask Answer - D Explanation - Suppose we have a host A with IP Address IPA and Subnet mask of the subnet of which A is a part is Ms. Now when A wants to send packet to a host B with an IP address say IPB, then A will first AND the subnet-Mask Ms with IPA to find out the subnet-id IDN of the subnet in order to identify whether IPB belongs to the same network. Now if B also belongs to the same network, then IPB BITWISE-AND Ms must be equal to IDN which A has calculated. If IPA and IPB belongs to same network, we must have
```	IPA BITWISE-AND Ms == IPBBITWISE-AND Ms
```
Out of the 4 options, only option D matches.
```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
```
You can check rest of the options. This explanation has been provided by Pranjul Ahuja.
 Question 8

Consider the following routing table at an IP router For each IP address in Group-I identify the correct choice of the next hop from Group-II using the entries from the routing table above.

```   List-I               List-II
A. 128.96.171.92     1. Interface 0
B. 128.96.167.151    2. Interface 1
C. 128.96.163.121    3. R2
D. 128.96.165.121    4. R3
5. R4
Codes:
A B C D
(a)  1 3 5 4
(b)  1 4 2 5
(c)  2 3 4 5
(d)  2 3 5 4```
 A a B b C c D d
GATE-CS-2015 (Set 2)    IP Addressing    50 Computer Networks MCQs with Answers
Discuss it

Question 8 Explanation:

Taking the 1st IP Address: 128.96.171.92

Bitwise AND between 128.96.171.92 and 255.255.254.0 we get the subnet ID as follows:25525511111110012896101010119212896101010100

∴ Subnet ID = 128.96.170.0
∴ 128.96.171.92 will forward to interface 0

Taking the 2nd IP Address: 128.96.167.151

Bitwise AND between 128.96.167.151 and 255.255.254.0 we get, 255255111111100128961010011115112896101001100

∴ Subnet ID = 128.96.166.0
∴ 128.96.167.151 will forward to interface R2

Taking the 3rd IP Address: 128.96.163.151

Bitwise AND between 128.96.167.151 and 255.255.254.0 we get, 255255111111100128961010001115112896101000100

∴ Subnet ID = 128.96.162.0 (Doesn’t match with any given interface)

Now, Bitwise AND between 128.96.167.151 and 255.255.252.0 we get, 255255111111000128961010001115112896101000000

∴ Subnet ID = 128.96.160.0 (Doesn’t match with any given interface)
∴ 128.96.163.151 will forward to default interface R4

Taking the last IP Address: 128.96.164.121

Bitwise AND between 128.96.164.121 and 255.255.254.0 we get, 255255111111100128961010010012112896101001000

∴ Subnet ID = 128.96.164.0
∴ 128.96.167.151 will forward to interface R3

∴ Option (A) is the correct answer.

 Question 9
Which of the following IP address can be used in WAN?
 A 10.0.0.1 B 172.16.0.10 C 15.1.5.6 D None
IP Addressing    50 Computer Networks MCQs with Answers
Discuss it

Question 9 Explanation:
10.0.0.1  and 172.16.0.10 are private IP address. Thus cannot be used in WAN.  15.1.5.6 is a public IP address.
 Question 10
Which of the following can be used as both Source and Destination IP?
 A 198.168.1.255 B 10.0.0.1 C 127.0.0.1 D 255.255.255.255
IP Addressing
Discuss it

Question 10 Explanation:
192.168.1.255 is a Direct Broadcast Address (DBA),  DBA  can't be used as Source Address. 127.0.0.1 Loopback address again can't be used as the source address. 255.255.255.255 is Limited Broadcast Address, which cannot be used as DBA. 10.0.0.1 can be both used as both source and destination IP address.
There are 40 questions to complete.
My Personal Notes arrow_drop_up
Related Articles