Junos Cup 2014
Junos Cup 2014

Tournament 1: Argentina Challenge & Solution - The Reacting Probe Country

[ Edited ]
‎06-12-2014 07:59 AM

Country Flag associated with this Challenge: Argentina


Author: Antonio Sánchez-Monge


Title: The Reacting Probe


Type: Automation


Difficulty: Low (1 point).


Technical Description: Deploy an automatic method that, depending on the health state of a given link, decides to disable or enable it for IP and MPLS forwarding.





Challenge Instructions:

For this challenge you need to start the topology called: “Argentina – The Reacting Probe”.


In this scenario, R1 has two ICMP probes. Each of the probes is performing a health check of one of the links connecting R1 to R2.


You need to find a way for R1 to react to the probe results automatically, by enabling or disabling the healthy links for IP and MPLS forwarding, according to the link state determined by the probe.


For example, the configuration at R1 should contain these lines, if and only if is reachable by the corresponding ICMP probe:


set routing-options static route next-hop

[edit protocols mpls]

+    label-switched-path LSP_1 {

+        to;

+        no-cspf;

+        primary PATH_1;

+    }

+    path PATH_1 {


+    }


And similarly for


You should achieve this goal by changing the configuration at R1, with the following conditions:

- You are not allowed to remove any configuration from any of the routers

- You are not allowed to add, remove, or modify any files under /var/db/scripts


Before submitting the solution, please test it by enabling and disabling links at R2:


set|delete interfaces ge-0/0/1|2 disable

commit and-quit


The configuration should dynamically change accordingly.


To solve this challenge, providing the configuration change required at R1 to achieve the automation logic just described.


TIP: Monitor the syslog messages: monitor start messages


NOTE #1: The MPLS LSPs will not come up operationally. Don’t worry about that as you are testing automation here not MPLS (actually, the MPLS configuration is incomplete).


NOTE #2: You can safely ignore this commit error:

error: mgd: error: could not open  /usr/lib/hooks/



NOTE: If you have issues connecting to the Junosphere topology please check Junosphere Technical documentation, or request assistance in the Junosphere forum 

Send an email with your proposed solution to junos-cup@juniper.net:

  •  The subject should be “<country-name-of-the-challenge> -  <your-full-name>”. For example: “Brazil – Wolfgang Amadeus Mozart”.
  • In the email body, please include your proposed solution, along with your first and last name and complete mailing address including zip/postal code and your shirt size (S, M, L, XL, XXL, XXXL)

Some additional notes:

  • Feel free to participate in as many challenges as you like, they are open to everyone and the more you participate the better chance of winning!
  • Green Planet Rules: please start one topology at a time, do not run several topologies in parallel and don't forget to stop your active topology when not in use
  • The answers will be read by the organization right after the deadline
  • The challenge instructions are final, and no additional information or tips will be provided before the publication of the solution and the winner list. Please don’t expect a reply from junos-cup@juniper.net.
  • If you feel that your initial solution is wrong or incomplete, you can send up to three messages for the same challenge, but please note that only your last message (received before the deadline) will be read.
  • If you think there is an error in the definition of the challenges, please send us an email with subject (“<country-name> ERROR”); if there is no reply, then it’s likely an intentional condition of the challenge, rather than an error.


Configure the following at R1:

event-options {

    policy PROBE_UP {

        events ping_test_completed;

        then {

            event-script probeReactor.slax {

                arguments {

                    myEvent UP;

                    myTest "{$$.test-name}";





    policy PROBE_DOWN {

        events ping_probe_failed;

        then {

            event-script probeReactor.slax {

                arguments {

                    myEvent DOWN;

                    myTest "{$$.test-name}";





    event-script {

        file probeReactor.slax;






Julie Wider
Advocacy Manager
Twitter: @JNetCommunity & @jawider