Courseiva
User Interfaces →mediumMultiple Choice

JN0-106 User Interfaces Practice Question

A network engineer wants to view the OSPF log entries in real time. They type 'show log messages | match ospf' and get output, but it does not update. What should they do to see real-time updates of OSPF log entries?

⚠ Common exam trap

The trap here is that candidates familiar with Cisco IOS may confuse 'show log' (which in Cisco can be used with 'monitor' for real-time output) with Junos 'show log', which is static, and overlook the Junos-specific 'monitor start' command for live log streaming.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

✓

Use 'monitor start messages | match ospf'

The 'monitor start messages' command in Junos OS enables real-time streaming of syslog messages to the terminal, similar to 'tail -f' on a log file. Piping the output through '| match ospf' filters the live feed to show only OSPF-related entries. In contrast, 'show log messages' is a one-time snapshot that does not update automatically.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • ✓

    Use 'monitor start messages | match ospf'

    Why this is correct

    This is the correct tool for real-time OSPF log viewing. 'monitor start messages' continuously follows /var/log/messages, displaying new syslog entries as they arrive, until you press Ctrl+C or issue 'monitor stop'. Piping the output to 'match ospf' applies a case-sensitive regular-expression filter so only lines containing 'ospf' are shown on screen.

  • ✗

    Use 'show log messages | tail'

    Why it's wrong here

    The 'show log messages' command reads the entire /var/log/messages file and exits immediately; adding '| tail' limits the output to the final ten lines of the file. This is a static snapshot, not a live stream — new OSPF entries are never displayed unless you manually re-run the command. Therefore, it cannot be used to 'view' logs in real time as the engineer requires.

  • ✗

    Use 'monitor traffic interface ge-0/0/0'

    Why it's wrong here

    'monitor traffic interface ge-0/0/0' invokes a packet-capture utility (based on tcpdump) that sniffs raw packets on the specified physical interface. It does not read any syslog files, so OSPF log entries such as adjacency state-changes are not shown. In addition, OSPF packets are multicast to 224.0.0.5/6, and without proper filter options the capture will include all traffic on that link, further obscuring what you need.

  • ✗

    Use 'request system syslog'

    Why it's wrong here

    'request system syslog' is not a valid Junos operational command. The 'request system' hierarchy includes operations like reboot, halt, and configuration save, but nothing that reads or streams logs. For real-time log monitoring you must use the 'monitor start' command, while 'show log' provides historical access; no 'request' variant exists for this purpose.

Visual reference

R1 R2 R3 R4 10 100 10 100 OSPF picks R1→R2→R4 (cost 20) over R1→R3→R4 (cost 200)

Quick reference

Routing Protocol Comparison

ProtocolMetricMax HopsAlgorithmType
RIP v2Hop count15Bellman-FordDistance vector
OSPFCost (bandwidth)UnlimitedDijkstra (SPF)Link state
EIGRPComposite metricUnlimitedDUALHybrid
IS-ISCostUnlimitedDijkstraLink state
BGPPolicy / attributesUnlimitedPath vectorPath vector

RIP's 15-hop limit makes it unsuitable for large networks. OSPF and EIGRP dominate modern enterprise deployments.

About these practice questions

Courseiva writes every JN0-106 question from scratch — 326 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This JN0-106 practice question is part of Courseiva's free Juniper Networks certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the JN0-106 exam.