[an error occurred while processing this directive][an error occurred while processing this directive]

Disabling Inheritance of a JUNOS Configuration Group

To disable inheritance of a configuration group at any level except the top level of the hierarchy, include the apply-groups-except statement:

apply-groups-except [ group-names ];

This statement is useful when you use the apply-group statement at a specific hierarchy level but also want to override the values inherited from the configuration group for a specific parameter.

Example: Disabling Inheritance on Interface so-1/1/0

In the following example, the apply-groups statement is applied globally at the interfaces level. The apply-groups-except statement is also applied at interface so-1/1/0 so that it uses the default values hold-time and link-mode.

[edit]groups { # "groups" is a top-level statement global { # User-defined group name interfaces { <*> { hold-time down 640; link-mode full-duplex;}}apply-groups global;interfaces {so-1/1/0 { apply-groups-except global;  # Disables inheritance from group "global"# so-1/1/0 uses default value for “hold-time”}# and "link-mode" }

For information about applying a configuration group, see Applying a JUNOS Configuration Group.

Configuration groups can add some confusion regarding the actual values used by the router, because configuration data can be inherited from configuration groups. To view the actual values used by the router, use the display inheritance command after the pipe ( | ) in a show command. This command displays the inherited statements at the level at which they are inherited and the group from which they have been inherited.

[edit]user@host# show | display inheritance snmp {location "West of Nowhere";#### 'My Engineering Group' was inherited from group 'basic'##contact "My Engineering Group";#### 'BasicAccess' was inherited from group 'basic'##community BasicAccess {#### 'read-only' was inherited from group 'basic'##authorization read-only;}}

To display the expanded configuration (the configuration, including the inherited statements) without the ## lines, use the except command after the pipe in a show command:

[edit]user@host# show | display inheritance | except ## snmp {location "West of Nowhere";contact "My Engineering Group";community BasicAccess {authorization read-only;}}

Published: 2010-04-27

[an error occurred while processing this directive]