GATE CS 2024 Set 2 — Question 38
MCQ+2 / -0.67EasySubnetting & CIDRNetwork Layer: AddressingComputer Networks
Computer Networks → Network Layer: Addressing → Subnetting & CIDR
Last updated
Question
Which one of the following CIDR prefixes exactly represents the range of IP addresses 10.12.2.0 to 10.12.3.255?
A.
10.12.2.0/23
B.
10.12.2.0/24
C.
10.12.0.0/22
D.
10.12.2.0/22
Correct answer
(A) 10.12.2.0/23
Solution
The range of IP addresses is from 10.12.2.0 to 10.12.3.255.Let's look at the binary representation of the third octet, as the first two octets (10.12) are constant.
- 2 in binary:
00000010 - 3 in binary:
00000011
10.12.2.0/24 and 10.12.3.0/24.Comparing the binary of the third octet:0000001000000011The first 7 bits are identical (0000001).Total prefix length = 8 (1st octet) + 8 (2nd octet) + 7 (3rd octet) = 23 bits.The network address is the lowest address in the block: 10.12.2.0.Thus, the CIDR prefix is 10.12.2.0/23.More questions on Network Layer: Addressing
2024 Set 1 Q16A user starts browsing a webpage hosted at a remote server. The browser opens a single TCP…2024 Set 2 Q23Node X has a TCP connection open to node Y. The packets from X to Y go through an intermediate IP…2024 Set 2 Q28Which of the following statements about IPv4 fragmentation is/are TRUE?2024 Set 1 Q29TCP client successfully establishes a connection to TCP server . Let denote the…2024 Set 1 Q31Which of the following fields is/are modified in the IP header of a packet going out of a network…
Practice GATE CS PYQs with adaptive difficulty
Timed practice, skill tracking, and AI explanations — free to start.
Start practicing free