PCNSE Exam QuestionsBrowse all questions from this exam

PCNSE Exam - Question 206


Given the following configuration, which route is used for destination 10.10.0.4? set network virtual-router 2 routing-table ip static-route "Route 1" nexthop ip-address 192.168.1.2 set network virtual-router 2 routing-table ip static-route "Route 1" metric 30 set network virtual-router 2 routing-table ip static-route "Route 1" destination 10.10.0.0/24 set network virtual-router 2 routing-table ip static-route "Route 1" re route-table unicast set network virtual-router 2 routing-table ip static-route "Route 2" nexthop ip-address 192.168.1.2 set network virtual-router 2 routing-table ip static-route "Route 2" metric 20 set network virtual-router 2 routing-table ip static-route "Route 2" destination 10.10.0.0/24 set network virtual-router 2 routing-table ip static-route "Route 2" route-table unicast set network virtual-router 2 routing-table ip static-route "Route 3" nexthop ip-address 10.10.20.1 set network virtual-router 2 routing-table ip static-route "Route 3" metric 5 set network virtual-router 2 routing-table ip static-route "Route 3" destination 0.0.0.0/0 set network virtual-router 2 routing-table ip static-route "Route 3" route-table unicast set network virtual-router 2 routing-table ip static-route "Route 4" nexthop ip-address 192.168.1.2 set network virtual-router 2 routing-table ip static-route "Route 4" metric 10 set network virtual-router 2 routing-table ip static-route "Route 4" destination 10.10.1.0/25 set network virtual-router 2 routing-table ip static-route "Route 4" route-table unicast

Show Answer
Correct Answer: C

Routes are chosen based on the longest prefix match principle. Multiple routes have the destination prefix 10.10.0.0/24, including Route 1 and Route 2. When there are routes with equal prefix lengths, the route with the lower metric is preferred. Both Route 1 and Route 2 have the same destination prefix, but Route 2 has a lower metric of 20 compared to Route 1's metric of 30. Thus, Route 2 is selected for destination 10.10.0.4.

Discussion

7 comments
Sign in to comment
JheaxOption: C
Apr 30, 2022

This is the line that you want to pay attention to answer this question: set network virtual-router 2 routing-table ip static-route "Route 2" destination 10.10.0.0/24

PakawatOption: C
Jul 3, 2022

Prefer route 2 with lowest metric

secdaddy
Aug 2, 2022

longest match. lowest metric only comes into play if there is more than one route with the same length match.

djedeenOption: B
Nov 29, 2022

Route 3 has the lowest metric, but 1 & 2 are longer match than its 0.0.0.0/0 destination.

mbhuyanOption: D
Feb 14, 2023

Longest match is 10.10.0.4 /25 which has the higher priority than /24. So the answer is D, not C

hcir
Jun 24, 2024

mate, 10.10.1.0/25 matches 10.10.1.(0-127)

mbhuyanOption: C
Feb 14, 2023

Opps my bed..the answer is C... longest has the different destination which is 10.10.1.0/25 I thought its 10.10.0.0/25.

Knowledge33Option: C
May 28, 2023

Longuest mask first, then lowest metric is longuest mask is concurrent.

WhizdhumOption: C
Dec 15, 2023

Answer is C. It would be easier to format the configuration line-by-line, so that the four options are shown clearly. Nevertheless, I was able to sift through the jumbled configuration and find the answer.