Using commit script macros, you can create a custom configuration language based on simplified syntax that is relevant to your network design. This means you can use your own aliases for frequently used configuration statements.
Commit scripts generally impose restrictions on JUNOS software configuration and automatically correct configuration mistakes when they occur (as discussed in Generating a Persistent or Transient Configuration Change). However, macros are useful for an entirely different reason. Commit scripts that contain macros do not generally correct configuration mistakes, nor do they necessarily restrict configuration. Instead, they provide a way to simplify and speed configuration tasks, thereby preventing mistakes from occurring at all.
This chapter contains an example that shows how macros can simplify a complex Multiprotocol Label Switching (MPLS) configuration. For a demonstration of the time-saving power of macros, see Automatically Configuring Logical Interfaces and IP Addresses.
This chapter discusses the following topics: