JNCIA-Junos study materials
JNCIA-Junos study resources

JNCIA-Junos: Configuration Basics

JNCIA-Junos · Work through your exam, one topic at a time.

All guide sections

Configuration Basics

Hierarchy and editing

Junos configuration is a tree. set, delete and replace: statements edit it. Navigate with edit system services, up, top, and show at any level. delete with no argument at a level removes the entire hierarchy beneath it - a common trap. copy, rename and insert duplicate or reorder statements; order matters for policy terms and firewall filter terms.

Loading and saving

save /var/tmp/base.conf writes the candidate to a file. load merge is the default and merges with the candidate; load replace honours replace: tags in the file; load override replaces the whole candidate; load set reads a file of set commands. load factory-default restores defaults. show | compare displays the candidate against the active configuration so you can review the diff before committing.

Committing

commit check validates syntax without activating. commit applies. commit comment adds a note to the archive. commit confirmed 5 activates the change but rolls back automatically in 5 minutes (10 if no value is given) unless you commit again - the standard safety net for remote changes. commit at "" schedules a commit.

Rollback

Every commit is archived. show system commit lists them. rollback 0 shows the active configuration, rollback 1 the previous commit, and up to rollback 49 are available. rollback with no number equals rollback 1 - a favourite trap.

Groups and annotations

Configuration groups apply shared settings through apply-groups, inherited top-down with child statements overriding the group. Annotations are comments and are never processed by Junos.

Traps

rollback 0 versus rollback 1; assuming commit confirmed is permanent without a follow-up commit; assuming load replace equals load override.

Rule of thumb

After any edit: show | compare, then commit check, then commit - or commit confirmed when you are remote.