Page MenuHomeVyOS Platform

Ping arguments not working outside of configure mode
Closed, InvalidPublic

Description

Not sure if this is the expected behaviour so apologies if it is but ping needs elevating with sudo to run with arguments unless in configure mode. I have tested this in VyOS 1.2.4-vmware VyOS 1.3-rolling-202003090217 & yOS 1.3-rolling-202003070217 so it has nothing to do with the recent code changes to ping.

Version: VyOS 1.3-rolling-202003090217

stevep@home-r1:~$ ping -h
ping: Unknown host: -h

stevep@home-r1:~$ ping -v 192.168.3.100
ping: Unknown host: -v

stevep@home-r1:~$ sudo ping -h
Usage: ping [-aAbBdDfhLnOqrRUvV64] [-c count] [-i interval] [-I interface]
            [-m mark] [-M pmtudisc_option] [-l preload] [-p pattern] [-Q tos]
            [-s packetsize] [-S sndbuf] [-t ttl] [-T timestamp_option]
            [-w deadline] [-W timeout] [hop1 ...] destination
Usage: ping -6 [-aAbBdDfhLnOqrRUvV] [-c count] [-i interval] [-I interface]
             [-l preload] [-m mark] [-M pmtudisc_option]
             [-N nodeinfo_option] [-p pattern] [-Q tclass] [-s packetsize]
             [-S sndbuf] [-t ttl] [-T timestamp_option] [-w deadline]
             [-W timeout] destination

stevep@home-r1:~$ sudo ping 192.168.3.100 -v
PING 192.168.3.100 (192.168.3.100) 56(84) bytes of data.
64 bytes from 192.168.3.100: icmp_seq=1 ttl=128 time=2.43 ms
64 bytes from 192.168.3.100: icmp_seq=2 ttl=128 time=2.08 ms

conf

stevep@home-r1# ping -h
Usage: ping [-aAbBdDfhLnOqrRUvV64] [-c count] [-i interval] [-I interface]
            [-m mark] [-M pmtudisc_option] [-l preload] [-p pattern] [-Q tos]
            [-s packetsize] [-S sndbuf] [-t ttl] [-T timestamp_option]
            [-w deadline] [-W timeout] [hop1 ...] destination
Usage: ping -6 [-aAbBdDfhLnOqrRUvV] [-c count] [-i interval] [-I interface]
             [-l preload] [-m mark] [-M pmtudisc_option]
             [-N nodeinfo_option] [-p pattern] [-Q tclass] [-s packetsize]
             [-S sndbuf] [-t ttl] [-T timestamp_option] [-w deadline]
             [-W timeout] destination

stevep@home-r1# run ping -h
ping: Unknown host: -h

Version: VyOS 1.2.4-vmware

vyos@vyos:~$ ping -h
ping: Unknown host: -h

vyos@vyos:~$ ping -v 192.168.3.100
ping: Unknown host: -v

sudo ping -h
Usage: ping [-aAbBdDfhLnOqrRUvV] [-c count] [-i interval] [-I interface]
            [-m mark] [-M pmtudisc_option] [-l preload] [-p pattern] [-Q tos]
            [-s packetsize] [-S sndbuf] [-t ttl] [-T timestamp_option]
            [-w deadline] [-W timeout] [hop1 ...] destination

vyos@vyos:~$ sudo ping -v 192.168.3.100
PING 192.168.3.100 (192.168.3.100) 56(84) bytes of data.
64 bytes from 192.168.3.100: icmp_seq=1 ttl=128 time=0.214 ms
64 bytes from 192.168.3.100: icmp_seq=2 ttl=128 time=0.931 ms

conf

vyos@vyos# ping -h
Usage: ping [-aAbBdDfhLnOqrRUvV] [-c count] [-i interval] [-I interface]
            [-m mark] [-M pmtudisc_option] [-l preload] [-p pattern] [-Q tos]
            [-s packetsize] [-S sndbuf] [-t ttl] [-T timestamp_option]
            [-w deadline] [-W timeout] [hop1 ...] destination

vyos@vyos# ping -v 192.168.3.100
PING 192.168.3.100 (192.168.3.100) 56(84) bytes of data.
64 bytes from 192.168.3.100: icmp_seq=1 ttl=128 time=0.189 ms
64 bytes from 192.168.3.100: icmp_seq=2 ttl=128 time=0.805 ms


vyos@vyos# run ping -h
ping: Unknown host: -h

vyos@vyos# run ping -v 192.168.3.100
ping: Unknown host: -v

SteveP

Details

Difficulty level
Unknown (require assessment)
Version
VyOS 1.2.4-vmware through VyOS 1.3-rolling-202003090217
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Unspecified (possibly destroys the router)

Event Timeline

SteveP created this object in space S1 VyOS Public.
Unknown Object (User) closed this task as Invalid.Mar 9 2020, 9:27 AM
Unknown Object (User) added a subscriber: Unknown Object (User).

Hi @SteveP , VyOS has own CLI for ping command, use ping and <TAB>

vyos@R1:~$ ping 1.1.1.1 
Possible completions:
  <Enter>       Execute the current command
  adaptive      Ping options
  allow-broadcast
  audible
  bypass-route
  count
  deadline
  flood
  interface
  interval
  mark
  no-loopback
  numeric
  pattern
  quiet
  record-route
  size
  timestamp
  tos
  ttl
  verbose

And example bellow with verbose param.

vyos@R1:~$ ping 1.1.1.1 verbose count 4
PING 1.1.1.1 (1.1.1.1) 56(84) bytes of data.
64 bytes from 1.1.1.1: icmp_seq=1 ttl=57 time=22.4 ms
64 bytes from 1.1.1.1: icmp_seq=2 ttl=57 time=22.0 ms
64 bytes from 1.1.1.1: icmp_seq=3 ttl=57 time=22.2 ms
64 bytes from 1.1.1.1: icmp_seq=4 ttl=57 time=22.2 ms

--- 1.1.1.1 ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 7ms
rtt min/avg/max/mdev = 22.046/22.202/22.356/0.152 ms