Help Tools in Junos Command-Line Interface (CLI) - dummies

Help Tools in Junos Command-Line Interface (CLI)

By Walter J. Goralski, Cathy Gadecki, Michael Bushong

You’ll find lots of powerful help tools intuitively integrated into the Junos command-line interface (CLI) beyond the basic: help, show | compare, command completion, commit check, and rollback. Other powerful tools that you’ll find particularly helpful when setting up your configuration include:

  • Syntax checking: Checks for small errors as you’re typing at the command-line. The CLI immediately lets you know if an entered line doesn’t conform to valid syntax and offers tips for correcting it.

  • Annotations: Use annotate followed by your notes when you want to leave comments for other team members. If something goes wrong, your operations teams will have critical information immediately at hand on the device, instead of trying to hunt down design guides that may have been lost long ago.

  • Rename and replace: Change the contents of a configuration variable with the rename or replace command. Use rename to change a specific statement and replace to change a character string anywhere that the string occurs in the configuration.

  • Rescue configuration: Enter the rollback rescue command to quickly return to the saved configuration designated as the rescue configuration.

  • Predefined changes and installs: You can set up configurations for new cards ahead of insertion. If the card is not yet installed, Junos just ignores that part of the configuration. Use deactivate when you want to input configuration changes and leave them inactive until needed or schedule the specific time with the commit at command.

    These power tools are handy if one team installs the hardware and another configures the software, or you want to have everything ready in advance for a scheduled maintenance window.

  • Restrict access permissions: Set authorization privileges for different users. You can use predefined user classes, as well as customize who can access what command hierarchy, or even specific individual commands. For example, you can set up your user groups so that only a small number of your operational staff, with expert experience in your deployment procedures and change management, have the needed permissions to commit new changes.

  • Junos automation: Enables you to automate, in your own way, the commands of the CLI, in both configuration and operational modes, and also lets you set up custom event policies. Using Junos automation not only saves time, but also can reduce downtime by preventing configuration errors and speeding problem resolution and restoration.

The keyword run is another power tool of configuration mode; this keyword lets you run any operational mode command while you are in configuration mode. The pipe (|) command has a few powerful benefits. Two of those benefits for the pipe (|) are that you can use it for filtering and for direct output.