CLI Usage
Basic System Configuration Guide 29
Entering Numerical Ranges
The SR OS CLI allows the use of a single numerical range as an argument in the command
line. This range can be a set or a sequence of numbers, or a combination of both.
A set is a range of numerical values, from a minimum to a maximum, incremented by 1. For
example:
configure service vpls [1..10] create customer 1
A sequence is a list of discrete integer elements, in any order. For example:
configure service vpls [1,2,3] no shutdown
A sequence can contain sets as well as integer elements. For example:
configure service vpls [4..6,7,8..10] no shutdown
For example, it is possible to shut down ports 1 through 10 in Slot 1 on XMA/MDA 1. A port
can be denoted with “slot/mda/port”, where slot is the slot number, mda is the XMA/MDA
number and port is the port number. To shut down ports 1 through 10 on Slot 1 and XMA/
MDA 1, the command is entered as follows:
configure port 1/1/[1..10] shutdown
<Ctrl-C> can be used to abort the execution of a range command.
CLI commands can contain ranges of hexadecimal values. This allows ranges to be used
when working with data normally expressed in hexadecimal instead of decimal, such as IPv6
or MAC addresses. For example:
#config>service>vpls>sap$ static-mac aa:bb:[0x19..0x21]:dd:ee:ff create
#config>service>vpls>sap$ info
----------------------------------------------
static-mac aa:bb:19:dd:ee:ff create
static-mac aa:bb:1a:dd:ee:ff create
static-mac aa:bb:1b:dd:ee:ff create
static-mac aa:bb:1c:dd:ee:ff create
static-mac aa:bb:1d:dd:ee:ff create
static-mac aa:bb:1e:dd:ee:ff create
static-mac aa:bb:1f:dd:ee:ff create
static-mac aa:bb:20:dd:ee:ff create
static-mac aa:bb:21:dd:ee:ff create
----------------------------------------------
A range can also be a reference to a previous range in the same command. This reference
takes the form "[$x]", where x is an integer between 0 and 5. For example:
configure service vprn [11..20] router-id 10.20.[$0].1