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.