Schlagwort-Archive: ping

Ping to multiple IPs permanently with RPM

In your exam you should always check the connectivity to all your devices, after configuration changes. Just to make sure everything working as expected. You can use RPM Services to send continually pings to the routers in your network. If the ping fails you can check it by an operational mode command or see it in your /var/log/messages.

Example configuration:

services {
    rpm {
        probe R1 {
            test ping-R1 {
                probe-type icmp-ping;
                target address;
                test-interval 30;
                thresholds {
                    successive-loss 1;
        probe R2 {
            test ping-R2 {
                probe-type icmp-ping;
                target address;
                test-interval 30;
                thresholds { 
                    successive-loss 1;

Now your router send every 30 seconds (test-interval) a icmp request (probe-type) to your destinations (target address).

To monitor the operation and even see failures you can use the following commands:

  • show services rpm history-results
  • show services rpm probe-results
  • look in /var/log/messages for PING_TEST_FAILED



Sending multicast traffic in JunOS

If you need to send traffic to a multicast group, to see if multicast working, you can easily use the ping tool. You have add the „bypass-routing“ option, to make sure the traffic get out without a lookup.

Here is an example:

ping bypass-routing interface ge-0/0/1 count 10000

You can use the „interval 0.1“ option to increase the packets per second.

If you want a receiver you could add a static igmp join, but this only create the forwarding state. If you also need a reply to the multicast ping traffic you must add a listener, like this:

set protocols sap listen

Test your MTU size with ping (JunOS/IOS and some more)

Here are some examples for testing MTU size with ICMP request/reply (aka Ping) and different operating systems. The list show the options to test your MTU with 1500 byte packets and don’t fragment bit set. If you get a reply, your MTU is fine.

OS Version Size option DF-bit option Example command
IOS (Cisco) 12.4 size 1500 df-bit ping ip size 1500 df-bit
JunOS (Juniper) 11.4 size 1472 do-not-fragment ping size 1472 do-not-fragment
VRP (Huawei) 5.70 -s 1472 -f ping -s 1472 -f
Windows XP -l 1472 -f ping -l 1472 -f -t
Linux Open-SuSE 11.4 -s 1472 -M do ping -s 1472 -M do
Solaris 11 1480 not implemented ping 1480




Change ping interval to sub-second

Most people doesn’t know that you can send more than one ICMP Request per second for testing purposes. Also the command line doesn’t suggest it:

admin@router> ping logical-system R2 count 100 interval ?
Possible completions:
 <interval> Delay between ping requests (seconds)

But in fact, you can also specify a dotted value like .1 for 0.1 seconds = 100ms = 10pps.  This could be useful, if you need some more packets per second on your interface, maybe to test a policer…

admin@router> ping logical-system R2 count 100 interval .1
PING ( 56 data bytes
64 bytes from icmp_seq=0 ttl=64 time=1.226 ms
64 bytes from icmp_seq=1 ttl=64 time=0.977 ms
64 bytes from icmp_seq=2 ttl=64 time=0.974 ms
64 bytes from icmp_seq=3 ttl=64 time=0.991 ms
64 bytes from icmp_seq=4 ttl=64 time=1.011 ms
64 bytes from icmp_seq=5 ttl=64 time=0.968 ms
64 bytes from icmp_seq=6 ttl=64 time=0.974 ms
64 bytes from icmp_seq=7 ttl=64 time=1.068 ms
64 bytes from icmp_seq=8 ttl=64 time=10.583 ms
64 bytes from icmp_seq=9 ttl=64 time=0.944 ms

But don’t trust this, it really depends on your Routing-Engine utilization and it is not guranteed that the packets really left the router exactly every 100ms.