12

IP Addressing

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
GATE CS 2012    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
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 2 Explanation: 
Question 3
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 3 Explanation: 
Question 4
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 4 Explanation: 
Question 5
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 5 Explanation: 
Question 6
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 6 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 7
Consider the following routing table at an IP router Q51 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    
Discuss it


Question 7 Explanation: 
The next hop is decide according to the longest prefix matching.  Refer following link for details. https://www.youtube.com/watch?v=PSC5omE3pX8&list=PLkHsKoi6eZnzJl1qTzmvBwTxrSJW4D2Jj&index=32
Question 8
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    
Discuss it


Question 8 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 9
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 9 Explanation: 
192.168.1.255 is a Direct Broadcast Address (DBA),  DBA  can't be used as Source Address. 127.0.0.1 Loop back address agsin can't be used as 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.
Question 10
If Direct Broadcast Address of subnet is 201.15.16.31. Which of the following will be subnet mask ?
A
255.255.255.240
B
255.255.255.192
C
255.255.255.198
D
None Of the Above
IP Addressing    
Discuss it


There are 18 questions to complete.
12

GATE CS Corner


See Placement Course for placement preparation, GATE Corner for GATE CS Preparation and Quiz Corner for all Quizzes on GeeksQuiz.