Juniper SYSTEM BASICS - CONFIGURATION GUIDE V 11.1.X Configuration Manual page 527

System basics configuration guide software for e series broadband services routers
Table of Contents

Advertisement

You can specify only a macro filename. The command searches in the specified
file for a macro named start. The command fails if the start macro does not
exist. For example, the following command looks for the file confatm.mac and
runs the macro named start contained within the file:
host1(config)#macro confatm.mac
You can specify only the macro name, using the name keyword, if the macro
file is stored locally in NVS and has the same name as the included macro you
want to invoke. For example, the following command looks for the file
confatm.mac and runs the macro named confatm contained within the file:
host1(config)#macro name confatm
You must specify a macro filename for remotely stored macro files, as in the
following example:
host1(config)#macro pc:/macros.mac atm0verDs3
You can pass arguments to the macro; if the argument contains a space or other
special character, you must enclose the argument within double quotation marks.
Use the test keyword to specify that the macro generate, but not execute, the
commands. You can look at the output to verify that it is what you want. The
test mode is verbose and displays comments.
Use the verbose keyword to echo commands to the display and display comments
as the macro executes. By default the command executes in nonverbose mode.
There is no no version.
See macro.
A typical macro application is to iteratively generate a series of commands, as shown
Example
in the following macro, atm0verDs3:
<# atmOverDs3 #>
<# i:=0; while i++ < 3 #>
controller t3 9/<#i;'\n'#>
no shut
clock source internal module
framing cbitadm
ds3-scramble
!
interface atm 9/<#i;'\n'#>
atm vc-per-vp 256
!
<# endwhile #>
!
interface atm 9/1.1
encap pppoe
!
<# i:=1; while i < 100 #>
interface atm 9/1.1.<#i;'\n'#>
encap ppp
no ppp shut
no ppp keep
atm pvc <# i #> 1 <# i #> aal5mux ip
Chapter 8: Writing CLI Macros
497
Running Macros

Advertisement

Table of Contents
loading

This manual is also suitable for:

Junose 11.1

Table of Contents