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 making NETCONF RPC requests and replies are as follows:

  1. Connect to the NETCONF-over-SSH server in a similar manner to the previous recipe:
      unix$ ssh -i JUNOS_auto_id_rsa auto@10.0.201.201 netconf
  1. Query the system ARP table by connecting to the NETCONF-over-SSH session in a similar manner to the previous recipe and issuing the appropriate RPC:
      <rpc><get-arp-table-information/></rpc>      <rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"          xmlns:JUNOS="http://xml.juniper.net/JUNOS/15.1F6/JUNOS">      <arp-table-information          xmlns="http://xml.juniper.net/JUNOS/15.1F6/JUNOS-arp"          JUNOS:style="normal">      <arp-table-entry>      <mac-address>       0a:00:27:00:00:00      </mac-address>      <ip-address>      10.0.201.1      </ip-address> <hostname> ...

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