JunOS RPM probes
Ever wondered how to configure Cisco’s IP SLA equivalent on Juniper equipments? Juniper call them RPM probes or Real-time Performance Monitoring probes. The only usage of RPM I’ve found so far is to inject a static route into the routing table or to disable/enable an interface when the probes fail. If you know another usage of RPM, please leave a comment.
RPM probes can be icmp, tcp, udp or HTTP based. The lasts three require the target to be configured to respond to the probes. The probes can measure packet loss, jitter, egress or ingress jitter, RTT, egress or ingress delay, deviation of the RTT or deviate of egress or ingress delay. Based on those measures, the RPM test can be marked successful or failed.
RPM configuration
Here is an exemple of RPM test using icmp-ping. The test consists in 3 icmp-ping sent to 12.12.12.12 with 1 second interval between each ping and then it start again after an interval of 5 seconds. The test is failed if the three pings are not answered.
[edit services]
rpm {
probe my-rpm {
test my-test {
probe-type icmp-ping;
target address 12.12.12.12;
probe-count 3;
probe-interval 1;
test-interval 5;
thresholds {
successive-loss 3;
}
}
}
}You can check the probe results as follow:
root@srx11> show services rpm probe-results
Owner: my-rpm, Test: my-test
Target address: 12.12.12.12, Probe type: icmp-ping, Test size: 3 probes
Probe results:
Response received, Mon Dec 30 22:27:20 2013, No hardware timestamps
Rtt: 1708 usec
Results over current test:
Probes sent: 2, Probes received: 2, Loss percentage: 0
Measurement: Round trip time
Samples: 2, Minimum: 1707 usec, Maximum: 1708 usec, Average: 1708 usec,
Peak to peak: 1 usec, Stddev: 0 usec, Sum: 3415 usec
Results over last test:
Probes sent: 3, Probes received: 3, Loss percentage: 0
Test completed on Mon Dec 30 22:27:12 2013
Measurement: Round trip time
Samples: 3, Minimum: 1720 usec, Maximum: 1855 usec, Average: 1776 usec,
Peak to peak: 135 usec, Stddev: 57 usec, Sum: 5329 usec
Results over all tests:
Probes sent: 3305, Probes received: 3278, Loss percentage: 0
Measurement: Round trip time
Samples: 3278, Minimum: 1482 usec, Maximum: 22378 usec,
Average: 1928 usec, Peak to peak: 20896 usec, Stddev: 495 usec,
Sum: 6318709 usecYou can see the current ongoing test results followed by the last test completed results followed by the consolidated results of all the past tests.
You may also see the history of the last 50 tests.
root@srx11> show services rpm history-results
Owner, Test Probe received Round trip time
my-rpm, my-test Mon Dec 30 22:28:27 2013 1957 usec
my-rpm, my-test Mon Dec 30 22:28:30 2013 1799 usec
my-rpm, my-test Mon Dec 30 22:28:35 2013 1881 usec
my-rpm, my-test Mon Dec 30 22:28:38 2013 1887 usec
my-rpm, my-test Mon Dec 30 22:28:41 2013 1988 usec
my-rpm, my-test Mon Dec 30 22:28:46 2013 1844 used
(...)
RPM usage
RPM results can be used to influence the routing by injecting a static route into the routing table if the RPM probe fails. This is done with an ip-monitoring policy as follow.
[edit services]
ip-monitoring {
policy default-route {
match {
rpm-probe my-rpm;
}
then {
preferred-route {
route 0.0.0.0/0 {
next-hop 10.11.21.21;
}
}
}
}
}
As long as the probe is successful, the default route is the static route configured under routing-option (next-hop 10.11.12.12).
root@srx11> show services ip-monitoring status
Policy - default-route (Status: PASS)
RPM Probes:
Probe name Test Name Address Status
---------------------- --------------- ---------------- ---------
my-rpm my-test 12.12.12.12 PASS
Route-Action:
route-instance route next-hop state
----------------- ----------------- ---------------- -------------
inet.0 0.0.0.0/0 10.11.21.21 NOT-APPLIED
root@srx11> show route 0/0 exact
inet.0: 23 destinations, 23 routes (19 active, 0 holddown, 4 hidden)
+ = Active Route, - = Last Active, * = Both
0.0.0.0/0 *[Static/5] 04:29:32
> to 10.11.12.12 via fe-0/0/7.1112
As soon as the probes fail, a new default route is injected into the routing table (next-hop 10.11.21.21)
root@srx11> show services ip-monitoring status
Policy - default-route (Status: FAIL)
RPM Probes:
Probe name Test Name Address Status
---------------------- --------------- ---------------- ---------
my-rpm my-test 12.12.12.12 FAIL
Route-Action:
route-instance route next-hop state
----------------- ----------------- ---------------- -------------
inet.0 0.0.0.0/0 10.11.21.21 APPLIED
root@srx11> show route 0/0 exact
inet.0: 23 destinations, 24 routes (19 active, 0 holddown, 4 hidden)
+ = Active Route, - = Last Active, * = Both
0.0.0.0/0 *[Static/1] 00:00:47, metric2 0
> to 10.11.21.21 via fe-0/0/3.1121
[Static/5] 04:32:36
> to 10.11.12.12 via fe-0/0/7.1112
That’s all folks!