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 it works...

As in the ISIS recipe, the initial steps of this recipe should be quite familiar. Connect to the JUNOS device, authenticate and then make a remote procedure call. In this case we call the <get-ospf-database-information> RPC, so let's take a look at a typical response from that RPC so that we can get an understanding of the fields that we have to extract.

    <ospf-database-information        xmlns="http://xml.juniper.net/JUNOS/15.1F6/JUNOS-routing">        <ospf-area-header>            <ospf-area>0.0.0.0</ospf-area>        </ospf-area-header>        <ospf-database            heading=" Type ID Adv Rtr Seq Age Opt Cksum Len">            <lsa-type>Router</lsa-type>            <lsa-id>10.0.4.15</lsa-id>            <advertising-router>10.0.4.15</advertising-router> <sequence-number>0x80000030</sequence-number> ...

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