Host X has IP address 192.168.1.97 and is connected through two routers R1 and…

2008

Host X has IP address 192.168.1.97 and is connected through two routers R1 and R2 to an­other host Y with IP address 192.168.1.80. Router R1 has IP addresses 192.168.1.135 and 192.168.1.110. R2 has IP addresses 192.168.1.67 and 192.168.1.155. The netmask used in the network is 255.255.255.224.

Which IP address should X configure its gateway as?

  1. A.

    192.168.1.67

  2. B.

    192.168.1.110

  3. C.

    192.168.1.135

  4. D.

    192.168.1.155

Attempted by 134 students.

Show answer & explanation

Correct answer: B

Answer: 192.168.1.110

Reasoning:

  • The netmask 255.255.255.224 corresponds to /27, so each subnet has 32 addresses (block size = 32).

  • The /27 subnet ranges relevant here are: 192.168.1.64–192.168.1.95, 192.168.1.96–192.168.1.127, 192.168.1.128–192.168.1.159, etc.

  • Host X (192.168.1.97) falls into the 192.168.1.96/27 subnet (usable hosts 192.168.1.97–192.168.1.126).

  • From the router addresses given, only 192.168.1.110 lies within 192.168.1.96–192.168.1.127. The others (192.168.1.67, 192.168.1.135, 192.168.1.155) are in different /27 subnets.

  • Therefore the correct gateway for X is 192.168.1.110 because it is the router IP in the same subnet as X.

A video solution is available for this question — log in and enroll to watch it.

Explore the full course: Gate Guidance By Sanchit Sir