JNCIA Network Configuration 2 — Questions and Answers
Question 1: Which Junos CLI command displays the current routing table?
- show route (Correct answer)
- show interfaces
- show bgp summary
- show ospf neighbor
Correct answer: show route
The 'show route' command displays the routing table in Junos OS, showing all routes learned via static, connected, and dynamic protocols.
In Junos OS, 'show route' displays the routing table (inet.0 for IPv4 by default). It shows the route prefix, next-hop, protocol, and preference. You can filter by table (e.g., 'show route table inet.0') or by prefix. The routing table is distinct from the forwarding table (show route forwarding-table).
Question 2: What is the purpose of the 'commit confirmed' command in Junos?
- Commits configuration and automatically rolls back if not confirmed within a timeout (Correct answer)
- Commits configuration permanently without rollback
- Previews configuration changes before committing
- Saves configuration to a backup file
Correct answer: Commits configuration and automatically rolls back if not confirmed within a timeout
'commit confirmed' activates configuration changes but schedules an automatic rollback after a timeout (default 10 minutes) unless a subsequent 'commit' is issued, providing a safety net.
The 'commit confirmed [minutes]' command is a safety feature in Junos. It activates the new configuration temporarily. If connectivity is lost (e.g., wrong firewall rule), the router automatically reverts to the previous configuration after the timeout. The operator must issue another 'commit' within the window to make the change permanent. Default timeout is 10 minutes.
Question 3: Which statement is true about Junos configuration groups?
- Groups allow reusable configuration snippets that can be applied with 'apply-groups' (Correct answer)
- Groups are used only for firewall filters
- Groups replace the need for templates
- Groups are stored in a separate database
Correct answer: Groups allow reusable configuration snippets that can be applied with 'apply-groups'
Junos configuration groups define reusable configuration blocks that are applied to the active configuration using the 'apply-groups' directive, reducing repetition.
In Junos OS, groups are defined under the 'groups' hierarchy. Any configuration stanza can be placed in a group. The 'apply-groups' statement applies the group's settings to matching hierarchies. Groups support wildcard matching (e.g., <ge-*>) to apply settings to multiple interfaces. They are commonly used for standardizing interface settings, SNMP, or login configurations.
Question 4: What does the 'deactivate' command do in Junos configuration mode?
- Marks a configuration stanza as inactive without deleting it (Correct answer)
- Permanently removes a configuration stanza
- Disables a physical interface
- Rolls back the current configuration
Correct answer: Marks a configuration stanza as inactive without deleting it
The 'deactivate' command marks a configuration stanza as inactive (prefixed with '##INACTIVE:'), leaving it in the configuration but not applying it to the active system.
Using 'deactivate [stanza]' in Junos configuration mode marks the specified stanza with an '##INACTIVE:' comment, preventing it from being applied. This is useful for temporarily disabling a feature without losing the configuration. The 'activate' command reverses this. Deactivated stanzas are visible in 'show configuration' output with the inactive marker.
Question 5: In Junos, which command shows the configuration difference between the active and candidate configuration?
- show | compare (Correct answer)
- show configuration | diff
- diff configuration
- compare active candidate
Correct answer: show | compare
The 'show | compare' command in Junos configuration mode displays a diff between the current candidate configuration and the last committed (active) configuration.
In Junos OS configuration mode, 'show | compare' (or 'show | compare rollback 0') displays a unified diff format showing additions (+) and deletions (-) between the candidate and active configurations. It can also compare with older rollback files using 'show | compare rollback N'. This is a critical pre-commit verification step.
Question 6: Which Junos feature allows multiple configuration changes to be grouped and committed together?
- Candidate configuration (Correct answer)
- Commit scripts
- Event policies
- Rescue configuration
Correct answer: Candidate configuration
The candidate configuration allows operators to stage multiple changes simultaneously. All edits are held in a candidate configuration until a 'commit' is issued, applying them atomically.
Junos OS uses a candidate configuration model. All edits made in configuration mode modify the candidate configuration, not the running configuration. Only when 'commit' is executed are all changes applied simultaneously to the active configuration. This ensures consistency — partial configurations are never applied. The 'rollback' command can revert to previous committed configurations (up to 50 rollback files).
Which Junos CLI command displays the current routing table?