Managing Junos Commit Time
I’ve been working with an ISP that is going to be using a large amount of configuration in the ‘groups’ section. The statements there will be inherited into the main configuration using the ‘apply-groups’ statement.
This is a clever way of writing commands once and having them apply to multiple parts of the configuration. At a basic level you could match on interfaces beginning with ‘ge-‘ or ‘xe-‘ and set an MTU on them all using one group statement. This MTU setting would not appear in the main configuration unless the configuration was displayed using “show | display inheritance”. There’s a nice explanation of how groups work over at this Packetpushers blog.
The downside is that if large amounts of configuration work is done in groups, applying the config can become slow during the ‘commit’ process.
What happens under the hood when the user issues a commit in Junos? You can see what happens if you issue a ‘commit | display detail’. There is an example in this KB article. As you can see there is a lot of parsing for commit-scripts, interface ranges and apply-groups at the start. The config in these needs to be expanded and incorporated Continue reading