Junos Automation (Scripting)
Highlighted
Junos Automation (Scripting)

How-To: Coordinating XML RPC data between Routing Engines

‎12-28-2012 09:45 AM

Sometimes you need to get/set info between REs using a script. 

One example of this could be updating utility MIB info on *both* routing engines, since there's no Utility MIB data synchronization provided by Junos.  

You *could* open a connection using the IP address of the other RE's fxp0.0 interface, but if that link is ever physically down (e.g. it's plugged into a switch that's powered off), then if just wont work.

 

Since Junos 11.4R3 and 12.1R2, there's a better way:

 

Open a connection to the other RE by

  1. specifying the private routing-instance "__juniper_private1__" and
  2. specifying the IP address of the other REs em0.0 interface.   (RE0's IP address  is 10.0.0.4, and  RE1's is 10.0.0.5).

 

Attached is an example script that demonstrates writing the same Utility MIB data to both RE0 and RE1 using this technique.   (You'll need to modify to use your own  values for $userid and $passwd.)

 

Maybe someone will find this useful.

/doug

 

--
"There he goes. One of God's own prototypes. A high-powered mutant of some kind never even considered for mass production. Too weird to live, and too rare to die." --HST

Attachments

Feedback