-1

I am studying for the CCNA Routing and Switching. While taking a practice test I was asked the following question...

Question: Your router has just received a packet that is destined to 10.1.1.97. Which entry in the routing table will be used to forward the packet? A. 10.1.1.0/25 B. 10.1.1.64/27 C. 0.0.0.0/0 D. 10.1.1.64/26 E. 10.1.1.32/27 F. 10.1.1.0/24 G. 10.1.1.80/28

I was confused by this question because I calculated that answer A, D and F were all viable answers.

Here is my work...

Answer A: Network ID = 10.1.1.0 | Range = .1 - .126 | Broadcast = 10.1.1.127

Answer D: Network ID = 10.1.1.64 | Range = .65 - .126 | Broadcast = 10.1.1.127

Answer F: Network ID = 10.1.1.0 | Range = .1 - .254 | Broadcast = 10.1.1.255

The Practice test said that the answer is D. 10.1.1.64/26.

Can someone explain why this is the correct answer instead of A or F seeing how (by my calculations) the address 10.1.1.97 also falls within their ranges.

MarkF
  • 3
  • 4
  • Well... 10.1.1.64/26 is the most specific one that works... the address does fit in the ranges of those other two, but those two are broader. – Dmitri Feb 13 '17 at 22:06

1 Answers1

0

Routing works with longest prefix matching. The number behind the slash is the prefix length. Looking at the prefixes that contain the correct address the lengths are:

  • A: 25
  • D: 26
  • F: 24

Of these D is the longest matching prefix, so that one will be used. A and F are aggregates that contain D, but D is the most specific.

Sander Steffann
  • 9,509
  • 35
  • 40