O'Reilly logo

JUNOS Automation Cookbook by Adam Chappell

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

How to do it...

The steps for the recipe are as follows:

  1. Log in to the JUNOS OS device using your normal user credentials and choose the operational mode CLI command that you'd like to work with:
      adamc@router> show arp       MAC Address Address Name Interface Flags      0a:00:27:00:00:00 10.0.201.1 adamc-mac em0.0 none
  1. Execute the command, but use the pipe modifier in order to query the XML that maps to the corresponding RPC call:
      adamc@router> show arp | display xml rpc       <rpc-reply                      xmlns:JUNOS="http://xml.juniper.net/JUNOS/15.1F6/JUNOS">      <rpc>      <get-arp-table-information>      </get-arp-table-information>      </rpc>      <cli>      <banner></banner>      </cli>      </rpc-reply>
  1. Repeat the command, but this time use the pipe modifier in order to explore the XML which maps ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required