OSPF Routes: Commands to View | JN0-102 Exam Preparation

Commands to View OSPF Routes

Prev Question Next Question

Question

Which two commands would you use to view OSPF routes? (Choose two.)

Answers

Explanations

Click on the arrows to vote for the correct answer

A. B. C. D.

CD

The correct answers to view OSPF routes are C. show route protocol ospf and D. show route.

C. show route protocol ospf: This command is used to view the routes learned via OSPF protocol. When this command is executed, it displays the routes that are learned via OSPF and their attributes such as destination prefix, next-hop, protocol preference, and metric.

Example:

sql
user@router> show route protocol ospf inet.0: 13 destinations, 13 routes (13 active, 0 holddown, 0 hidden) + = Active Route, - = Last Active, * = Both 10.0.0.0/8 *[OSPF/10] 01:58:49, metric 1 to 10.1.1.2 via ge-0/0/1.0

D. show route: This command is used to display the routing table. It shows all the routes installed in the routing table, including OSPF routes, as well as routes learned via other routing protocols or static routes.

Example:

sql
user@router> show route inet.0: 13 destinations, 13 routes (13 active, 0 holddown, 0 hidden) + = Active Route, - = Last Active, * = Both 10.0.0.0/8 *[OSPF/10] 01:58:49, metric 1 to 10.1.1.2 via ge-0/0/1.0 192.168.1.0/24 *[Direct/0] 02:15:05 > via ge-0/0/0.0 224.0.0.0/4 *[Multicast/10] 02:15:15 MultiRecv

Option A, "show ip route ospf", is not a valid Junos command. The Junos command to display the routes learned via OSPF is "show route protocol ospf".

Option B, "show ospf routes", is not a valid Junos command. The Junos command to display the OSPF routes is "show route protocol ospf".