Junos Configuration Groups: Definition and Application
Which TWO statements about configuration groups in Junos are correct? (Choose two.)
Quick Answer
The correct answer is that the 'apply-groups' statement is used to include a group's configuration at a specific hierarchy level, and configuration groups are defined under the [edit groups] hierarchy. This works because Junos configuration groups act as reusable templates: you define a block of configuration under [edit groups], then reference it with apply-groups at any hierarchy level, from global to interface-specific, to inherit those settings without rewriting them. On the JNCIA-Junos exam, this concept tests your understanding of configuration inheritance and hierarchy—a common trap is confusing apply-groups with apply-groups-except, which excludes a group from a specific level. A strong memory tip is to think of groups as "configuration macros" and apply-groups as the "include directive" that pulls them into place, reducing duplication and simplifying large-scale device management.
⚠ Common exam trap
A common mix-up: candidates confuse configuration groups with Junos's 'apply-path' or 'apply-macro' features, or mistakenly think groups are external files, when in fact they are defined inline under [edit groups] and applied via 'apply-groups'.
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
✓
Configuration groups are defined under the [edit groups] hierarchy.
Option A is correct because configuration groups in Junos are created and stored under the [edit groups] hierarchy, where each group is defined by a name and contains configuration statements that can be inherited elsewhere. Option C is correct because the apply-groups statement is the mechanism used to insert a group's configuration at a specific point in the configuration hierarchy, causing the group's statements to be inherited at that level. Option B is incorrect because configuration groups are not stored in separate files imported with the file statement; the file statement is used for loading configuration snippets from files, not for defining groups. Option D is incorrect because the replace tag is used to override inherited configuration values, not to reference a configuration group. Option E is incorrect because configuration groups can be applied at many hierarchy levels, not only at [edit interfaces].
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
Configuration groups are defined under the [edit groups] hierarchy.
Why this is correct
Junos stores reusable configuration groups beneath the [edit groups] hierarchy, where each group is named and contains a partial configuration. Groups remain inactive until referenced elsewhere, so defining them there alone changes no device behaviour.
- ✗
Configuration groups are stored in separate files that are imported using the 'file' statement.
Why it's wrong here
Configuration groups are defined within the main configuration hierarchy, not imported from separate files via the file statement. The file statement loads whole configuration files, which is tempting for modular management, but groups are referenced by apply-groups instead.
- ✓
The 'apply-groups' statement is used to include a group's configuration at a specific hierarchy level.
Why this is correct
The apply-groups statement inserts a configuration group's statements at the exact hierarchy level where it is referenced, enabling inheritance of common settings into specific contexts. This satisfies the scenario's requirement for targeted group inclusion, unlike apply-groups-except, which inherits everything but the named group.
- ✗
The 'replace' tag is used to reference a configuration group.
Why it's wrong here
The replace tag is used within apply-groups or apply-group statements to override inherited values, not to reference a group. It is tempting because it appears alongside group syntax, but referencing a group uses apply-groups, while replace controls how inherited configuration is merged.
- ✗
Configuration groups are applied only at the [edit interfaces] hierarchy level.
Why it's wrong here
Configuration groups can be applied at any hierarchy level, including protocols, system, and routing-options, not just interfaces. The option is tempting because interfaces are a common place to apply groups for per-port customisation, but Junos imposes no such hierarchy restriction.
Go deeper
Related to this question
About these practice questions
One of 326 original JN0-106 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →
Same concept, more angles
1 more way this is tested on JN0-106
These questions test the same concept from different angles. Work through them to make sure you can recognise it however the exam phrases it.
Variation 1. Which TWO statements about configuration groups are correct? (Choose two.)
medium- A.The 'apply-groups' statement is only valid at the top level of the configuration.
- B.Configuration groups can only contain interface-related configuration.
- C.The 'apply-groups' statement can be used to apply only specific statements from a group.
- ✓ D.Multiple groups can be applied, and the order of application determines priority.
- ✓ E.Configuration groups are defined under the 'groups' hierarchy.
Why D: Option D is correct because Junos allows multiple configuration groups to be applied to the same hierarchy level, and when the same statement appears in more than one applied group, the group applied last (or listed last in the apply-groups order) takes precedence, so the order of application determines priority. Option E is correct because configuration groups are created under the top-level 'groups' hierarchy (for example, 'groups { GROUP-NAME { ... } }'), and they are referenced elsewhere in the configuration with the 'apply-groups' statement. Option A is incorrect because 'apply-groups' can appear at multiple hierarchy levels, not only at the top level, allowing groups to be applied to specific configuration subtrees. Option B is incorrect because configuration groups can contain almost any configuration statements, not just interface-related ones. Option C is incorrect because 'apply-groups' applies the entire group at the point where it is referenced; it does not selectively apply only specific statements from within a group.
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.