Configuration Examples Using Regular Expressions
RP/0/RP0/CPU0:router(config-if)# apply-group g-l2trans-if
When this configuration is committed, the Ten Gigabit Ethernet interface 0/0/0/0.1 inherits the 1514 MTU
value. This is the output displayed from the show running-config inheritence command for the Ten Gigabit
Ethernet interface:
interface TenGigE0/0/0/0.1 l2transport
## Inherited from group g-l2trans-if
mtu 1514
!
Configuration Group Precedence: Example
When similar configuration statements are contained in multiple configuration groups, groups applied in inner
configuration modes take precedence over groups applied in outer modes. This example shows two configuration
groups that configure different cost values for OSPF.
RP/0/RP0/CPU0:router(config)# group g-ospf2
RP/0/RP0/CPU0:router(config-GRP)# router ospf '.*'
RP/0/RP0/CPU0:router(config-GRP-ospf)# area '.*'
RP/0/RP0/CPU0:router(config-GRP-ospf-ar)# cost 2
RP/0/RP0/CPU0:router(config-GRP-ospf-ar)# end-group
RP/0/RP0/CPU0:router(config)# group g-ospf100
RP/0/RP0/CPU0:router(config-GRP)# router ospf '.*'
RP/0/RP0/CPU0:router(config-GRP-ospf)# area '.*'
RP/0/RP0/CPU0:router(config-GRP-ospf-ar)# cost 100
RP/0/RP0/CPU0:router(config-GRP-ospf-ar)# end-group
If these configuration groups are applied as follows, the cost 2 specified in g-ospf2 is inherited by OSPF area
0 because the group is applied in a more inner configuration mode. In this case, the configuration in group
g-ospf100 is ignored.
RP/0/RP0/CPU0:router(config)# router ospf 0
RP/0/RP0/CPU0:router(config-ospf)# apply-group g-ospf100
RP/0/RP0/CPU0:router(config-ospf)# area 0
RP/0/RP0/CPU0:router(config-ospf-ar)# apply-group g-ospf2
Changes to Configuration Group are Automatically Inherited: Example
When you make changes to a configuration group that is committed and applied to your router configuration,
the changes are automatically inherited by the router configuration. For example, assume that this configuration
is committed:
group g-interface-mtu
interface 'GigabitEthernet.*'
mtu 1500
!
end-group
interface POS0/4/1/0
apply-group g-interface-mtu
!
Now you change the configuration group as in this example:
RP/0/RP0/CPU0:router(config)# group g-interface-mtu
RP/0/RP0/CPU0:router(config-GRP)# interface 'GigabitEthernet.*'
System Management Configuration Guide for Cisco NCS 5000 Series Routers, IOS XR Release 6.2.x
92
Configuring Flexible Command Line Interface