Example: Configuring and Applying Junos Configuration Groups
In this example, the SNMP configuration is divided between the group basic and the normal configuration hierarchy.
There are a number of advantages to placing the system-specific configuration (SNMP contact) into a configuration group and thus separating it from the normal configuration hierarchy—the user can replace (using the load replace command) either section without discarding data from the other.
In addition, setting a contact for a specific box is now possible because the group data would be hidden by the router-specific data.
[edit]groups { basic {# User-defined group name snmp {# This group contains some SNMP data contact "My Engineering Group"; community BasicAccess { authorization read-only;}}apply-groups basic;# Enable inheritance from group "basic"snmp {# Some normal (non-group) configurationlocation "West of Nowhere";
This configuration is equivalent to the following:
[edit]snmp {location "West of Nowhere";contact "My Engineering Group";community BasicAccess {authorization read-only;}}
For information about how to disable inheritance of a configuration group, see Disabling Inheritance of a Junos Configuration Group.
Related Topics
- Example: Creating and Applying Configuration Groups on a TX Matrix Router
- Example: Configuring and Applying Junos Configuration Groups
- Example: Configuring Interfaces Using Junos Configuration Groups
- Example: Configuring Peer Entities
- Example: Referencing the Preset Statement From the Junos defaults Group
- Example: Viewing Default Statements That Have Been Applied to the Configuration
- Example : Configuring Sets of Statements with Configuration Groups
- Example: Configuring a Consistent IP Address for the Management Interface
- Creating a Junos Configuration Group
