JN0-102 · Question #234
Which two commands would you use to view OSPF routes? (Choose two.)
The correct answer is C. show route protocol ospf D. show route. To view OSPF routes in Junos, you can either display all routes and filter the output or specifically request routes belonging to the OSPF protocol.
Question
Which two commands would you use to view OSPF routes? (Choose two.)
Options
- Ashow ip route ospf
- Bshow ospf routes
- Cshow route protocol ospf
- Dshow route
How the community answered
(35 responses)- A9% (3)
- B3% (1)
- C89% (31)
Why each option
To view OSPF routes in Junos, you can either display all routes and filter the output or specifically request routes belonging to the OSPF protocol.
`show ip route ospf` is a command used in Cisco IOS, not in Juniper Junos OS for viewing OSPF routes.
`show ospf routes` is not a valid Junos OS command for displaying OSPF routes; the correct syntax for filtering by protocol is `show route protocol ospf`.
The `show route protocol ospf` command directly queries the routing table and displays only those routes that were learned via the OSPF routing protocol. This provides a focused view of OSPF-specific routing entries.
The `show route` command displays all active routes in the routing table, regardless of protocol. You can then pipe the output to a filter (e.g., `| match OSPF`) to identify OSPF routes.
Concept tested: Junos OS command to view OSPF routes
Source: https://www.juniper.net/documentation/us/en/software/junos/routing-basics/topics/ref/command/show-route.html
Topics
Community Discussion
No community discussion yet for this question.