Routing

last person joined: 3 days ago 

Ask questions and share experiences about ACX Series, CTP Series, MX Series, PTX Series, SSR Series, JRR Series, and all things routing, including portfolios and protocols.
  • 1.  multiple ping

     
    Posted 06-03-2020 07:07

    Hi

    How can be  ping multiple Ip addresses with count 5 without using repeating "ping"

    One command of "ping" is hitting multiple specified IP addresses? Is there a posibility of this or?



  • 2.  RE: multiple ping
    Best Answer

     
    Posted 06-03-2020 07:33

    Hi Arix,

     

    You can try the below command from the shell

     

    start shell user root

    echo IP1 IP2 IP3 | xargs -n1 -P0 ping -c 4

     

    Works for me

     

    # echo 8.8.8.8 4.4.4.4 5.5.5.5 | xargs -n1 -P0 ping -c 4
    PING 4.4.4.4 (4.4.4.4): 56 data bytes
    PING 8.8.8.8 (8.8.8.8): 56 data bytes
    PING 5.5.5.5 (5.5.5.5): 56 data bytes
    64 bytes from 8.8.8.8: icmp_seq=0 ttl=45 time=11.046 ms
    64 bytes from 8.8.8.8: icmp_seq=1 ttl=45 time=11.153 ms
    64 bytes from 8.8.8.8: icmp_seq=2 ttl=45 time=11.189 ms
    64 bytes from 8.8.8.8: icmp_seq=3 ttl=45 time=10.950 ms

    --- 8.8.8.8 ping statistics ---
    4 packets transmitted, 4 packets received, 0% packet loss
    round-trip min/avg/max/stddev = 10.950/11.084/11.189/0.094 ms

    --- 5.5.5.5 ping statistics ---
    4 packets transmitted, 0 packets received, 100% packet loss

    --- 4.4.4.4 ping statistics ---
    4 packets transmitted, 0 packets received, 100% packet loss

     

     

    BR,

    Vishal

     

     

    PS: Please accept my response as solution if it answers you query, kudos are appreciated too!



  • 3.  RE: multiple ping

     
    Posted 06-03-2020 07:52

     

    Thanks mate.

    It worked for me too...