Blame omping.8

Packit Service 34e2f8
.\" Copyright (c) 2010-2011, Red Hat, Inc.
Packit Service 34e2f8
.\"
Packit Service 34e2f8
.\" Permission to use, copy, modify, and/or distribute this software for any
Packit Service 34e2f8
.\" purpose with or without fee is hereby granted, provided that the above
Packit Service 34e2f8
.\" copyright notice and this permission notice appear in all copies.
Packit Service 34e2f8
.\"
Packit Service 34e2f8
.\" THE SOFTWARE IS PROVIDED "AS IS" AND RED HAT, INC. DISCLAIMS ALL WARRANTIES
Packit Service 34e2f8
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
Packit Service 34e2f8
.\" OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL RED HAT, INC. BE LIABLE
Packit Service 34e2f8
.\" FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
Packit Service 34e2f8
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
Packit Service 34e2f8
.\" OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
Packit Service 34e2f8
.\" CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
Packit Service 34e2f8
.\"
Packit Service 34e2f8
.\" Author: Jan Friesse <jfriesse@redhat.com>
Packit Service 34e2f8
.\"
Packit Service 34e2f8
.Dd Jun 22, 2011
Packit Service 34e2f8
.Dt OMPING 8
Packit Service 34e2f8
.Os
Packit Service 34e2f8
.
Packit Service 34e2f8
.Sh NAME
Packit Service 34e2f8
.Nm omping
Packit Service 34e2f8
.Nd test IP multicast
Packit Service 34e2f8
.Sh SYNOPSIS
Packit Service 34e2f8
.Nm
Packit Service 34e2f8
.Op Fl 46CDEFqVv
Packit Service 34e2f8
.Op Fl c Ar count
Packit Service 34e2f8
.Op Fl i Ar interval
Packit Service 34e2f8
.Op Fl M Ar transport_method
Packit Service 34e2f8
.Op Fl m Ar mcast_addr
Packit Service 34e2f8
.Op Fl O Ar op_mode
Packit Service 34e2f8
.Op Fl p Ar port
Packit Service 34e2f8
.Op Fl R Ar rcvbuf
Packit Service 34e2f8
.Op Fl r Ar rate_limit
Packit Service 34e2f8
.Op Fl S Ar sndbuf
Packit Service 34e2f8
.Op Fl T Ar timeout
Packit Service 34e2f8
.Op Fl t Ar ttl
Packit Service 34e2f8
.Op Fl w Ar wait_time
Packit Service 34e2f8
.Ar remote_addr...
Packit Service 34e2f8
.Sh DESCRIPTION
Packit Service 34e2f8
The
Packit Service 34e2f8
.Nm
Packit Service 34e2f8
is program which uses User Datagram Protocol to determine if computer is able to send
Packit Service 34e2f8
and/or receive IP unicast and multicast or Broadcast packets from the network. It's designed to be
Packit Service 34e2f8
used in very similar way as
Packit Service 34e2f8
.Xr ping 8
Packit Service 34e2f8
and also has some features of the
Packit Service 34e2f8
.Xr fping 8
Packit Service 34e2f8
command.
Packit Service 34e2f8
Where
Packit Service 34e2f8
.Xr ping 8
Packit Service 34e2f8
and
Packit Service 34e2f8
.Nm
Packit Service 34e2f8
differ is in who replies. In
Packit Service 34e2f8
.Xr ping 8
Packit Service 34e2f8
replies are sent by the operating system and with
Packit Service 34e2f8
.Nm
Packit Service 34e2f8
another instance of
Packit Service 34e2f8
.Nm
Packit Service 34e2f8
sends the reply. This mean that
Packit Service 34e2f8
.Nm
Packit Service 34e2f8
must be running on all computers to test sending/receiving IP multicast/broadcast.
Packit Service 34e2f8
Its arguments are as follows:
Packit Service 34e2f8
.Bl -tag -width Ds
Packit Service 34e2f8
.It Fl 4
Packit Service 34e2f8
Force usage of IPv4.
Packit Service 34e2f8
.It Fl 6
Packit Service 34e2f8
Force usage of IPv6.
Packit Service 34e2f8
.It Fl C
Packit Service 34e2f8
Display continuous statistics for every reply message.
Packit Service 34e2f8
.It Fl D
Packit Service 34e2f8
Disable packet duplicate detection. Option is default for interval 0.
Packit Service 34e2f8
.It Fl E
Packit Service 34e2f8
Default behaviour when every client is in stop state is to exit. This may happen if all server sends
Packit Service 34e2f8
stop message or if
Packit Service 34e2f8
.Ar count
Packit Service 34e2f8
query messages was sent. This option changes default behaviour and
Packit Service 34e2f8
.Nm
Packit Service 34e2f8
doesn't quit automatically.
Packit Service 34e2f8
.It Fl F
Packit Service 34e2f8
Allow entering of arguments which are not allowed or not recommended by the specification. This is
Packit Service 34e2f8
typically the interval parameter. This option may be used multiple times.
Packit Service 34e2f8
.It Fl q
Packit Service 34e2f8
Quiet output. Nothing is displayed except state changes and summary. Option can be used twice and
Packit Service 34e2f8
then only summary is displayed.
Packit Service 34e2f8
.It Fl V
Packit Service 34e2f8
Display version and quit. Option can be used twice and then remote version is displayed.
Packit Service 34e2f8
.It Fl v
Packit Service 34e2f8
Set level of verbosity. Parameter can be used multiple times to achieve higher verbosity.
Packit Service 34e2f8
.It Fl c Ar count
Packit Service 34e2f8
Number of request packets to send to each target. After sending
Packit Service 34e2f8
.Ar count
Packit Service 34e2f8
query messages, given client is put to stop state and it is no longer sending query
Packit Service 34e2f8
messages.
Packit Service 34e2f8
.It Fl i Ar interval
Packit Service 34e2f8
Wait
Packit Service 34e2f8
.Ar interval
Packit Service 34e2f8
seconds between sending each request packet. Float values are supported in millisecond precision.
Packit Service 34e2f8
It's possible to set there 0 with meaning that packets are sent ether after previous unicast reply
Packit Service 34e2f8
is received or after 1 millisecond, depending on which of these intervals is smaller. The default
Packit Service 34e2f8
is to wait for one second between each packet.
Packit Service 34e2f8
.It Fl M Ar transport_method
Packit Service 34e2f8
Set transport method to use. This can be
Packit Service 34e2f8
.Cm asm
Packit Service 34e2f8
for Any-source Multicast,
Packit Service 34e2f8
.Cm ssm
Packit Service 34e2f8
for Source-specific Multicast and
Packit Service 34e2f8
.Cm ipbc
Packit Service 34e2f8
for IP Broadcast.
Packit Service 34e2f8
.It Fl m Ar mcast_addr
Packit Service 34e2f8
Multicast or broadcast address to listen on for multicast/broadcast answer messages.
Packit Service 34e2f8
Default is 232.43.211.234 for IPv4 and ff3e::4321:1234 for IPv6 multicast, or broadcast address of
Packit Service 34e2f8
local interface for Broadcast.
Packit Service 34e2f8
.It Fl O Ar op_mode
Packit Service 34e2f8
.Nm
Packit Service 34e2f8
can be running in three different modes. Default and recommended mode for quick testing is
Packit Service 34e2f8
.Cm normal
Packit Service 34e2f8
mode, when
Packit Service 34e2f8
.Nm
Packit Service 34e2f8
behaves like client and server together. It sends queries and is able to respond them.
Packit Service 34e2f8
.\"
Packit Service 34e2f8
.\" Temporarily disabled
Packit Service 34e2f8
.\"
Packit Service 34e2f8
.\" In
Packit Service 34e2f8
.\" .Cm server
Packit Service 34e2f8
.\" mode
Packit Service 34e2f8
.\" .Nm
Packit Service 34e2f8
.\" never sends it's own queries but responds to other nodes one.
Packit Service 34e2f8
Finally the
Packit Service 34e2f8
.Cm client
Packit Service 34e2f8
mode sends queries, but never respond to other nodes.
Packit Service 34e2f8
.It Fl p Ar port
Packit Service 34e2f8
Port to bind and listen on for both unicast and multicast/broadcast messages. Default is 4321.
Packit Service 34e2f8
.It Fl R Ar rcvbuf
Packit Service 34e2f8
Set socket rcvbuf. Minimum value for this option is 2048. If not specified, rcvbuf is not changed
Packit Service 34e2f8
and default OS provided value is used.
Packit Service 34e2f8
.It Fl r Ar rate_limit
Packit Service 34e2f8
Rate limit interval between two query messages to
Packit Service 34e2f8
.Ar rate_limit
Packit Service 34e2f8
seconds. Default value is same as
Packit Service 34e2f8
.Ar interval
Packit Service 34e2f8
given by
Packit Service 34e2f8
.Fl i
Packit Service 34e2f8
option. Rate limiting can be disabled by specifying 0 as value. Rate limiting is by default disabled
Packit Service 34e2f8
for
Packit Service 34e2f8
.Fl i
Packit Service 34e2f8
with 0 seconds.
Packit Service 34e2f8
.It Fl S Ar sndbuf
Packit Service 34e2f8
Set socket sndbuf. Minimum value for this option is 2048. If not specified, sndbuf is not changed
Packit Service 34e2f8
and default OS provided value is used.
Packit Service 34e2f8
.It Fl T Ar timeout
Packit Service 34e2f8
Specify a timeout, in seconds, before
Packit Service 34e2f8
.Nm
Packit Service 34e2f8
exits regardless of how many packets have
Packit Service 34e2f8
been received.
Packit Service 34e2f8
.It Fl t Ar ttl
Packit Service 34e2f8
Time-To-Live of sent packets.
Packit Service 34e2f8
.It Fl w Ar wait_time
Packit Service 34e2f8
after
Packit Service 34e2f8
.Nm
Packit Service 34e2f8
is stopped (by sending SIGINT or timeout expire) it is moved to special state when no queries are
Packit Service 34e2f8
made and server answer all queries by server response (stop message). This makes possible to give
Packit Service 34e2f8
correct (unbiased) result of lost packets on other nodes. Default is 3 times interval or 1 second,
Packit Service 34e2f8
depending which one is larger. Also special value 0 can be used to not wait at all or -1 which
Packit Service 34e2f8
means wait forever (this can be still terminated by sending SIGINT).
Packit Service 34e2f8
.It Ar remote_addr
Packit Service 34e2f8
List of addresses to test. One of them must be address of local internet interface. This
Packit Service 34e2f8
local address is used for bind and listening on for unicast packets. It's also used to determine
Packit Service 34e2f8
which interface should be used for sending multicast/broadcast replies.
Packit Service 34e2f8
.El
Packit Service 34e2f8
.Pp
Packit Service 34e2f8
Program is normally terminated by SIGINT. After signal receive summary is displayed. You can also
Packit Service 34e2f8
display summary during running by sending SIGINFO or SIGUSR1 signal.
Packit Service 34e2f8
.Pp
Packit Service 34e2f8
When using
Packit Service 34e2f8
.Nm
Packit Service 34e2f8
for fault isolation, it should first be run against local internet
Packit Service 34e2f8
interface only, to verify that the local network interface is up and running, and firewall
Packit Service 34e2f8
is correctly configured. This mode is available by entering only local IP address.
Packit Service 34e2f8
.Sh EXIT STATUS
Packit Service 34e2f8
.Ex -std
Packit Service 34e2f8
.Sh EXAMPLES
Packit Service 34e2f8
The following commands and output is a typical way how to find-out and solve network problems
Packit Service 34e2f8
using omping. In this situation, we have 3 computers named node-01, node-02 and node-03 with IP
Packit Service 34e2f8
addresses 192.168.1.101 - 192.168.1.103. Let's run the following command on all of them.
Packit Service 34e2f8
.Pp
Packit Service 34e2f8
.Dl $ omping node-01 node-02 node-03
Packit Service 34e2f8
.Pp
Packit Service 34e2f8
on all of nodes we should be able to seen similar output
Packit Service 34e2f8
.Pp
Packit Service 34e2f8
.Dl node-01 : waiting for response msg
Packit Service 34e2f8
.Dl node-03 : waiting for response msg
Packit Service 34e2f8
.Dl node-01 : joined (S,G) = (*, 232.43.211.234), pinging
Packit Service 34e2f8
.Dl node-03 : joined (S,G) = (*, 232.43.211.234), pinging
Packit Service 34e2f8
.Dl node-01 :   unicast, seq=1, size=69 bytes, dist=0, time=0.192ms
Packit Service 34e2f8
.Dl node-01 : multicast, seq=1, size=69 bytes, dist=0, time=0.284ms
Packit Service 34e2f8
.Dl node-03 :   unicast, seq=1, size=69 bytes, dist=0, time=0.279ms
Packit Service 34e2f8
.Dl node-03 : multicast, seq=1, size=69 bytes, dist=0, time=0.360ms
Packit Service 34e2f8
.Pp
Packit Service 34e2f8
The first two lines tell us, that node-02 (actual node) is waiting for a response
Packit Service 34e2f8
message from node-01 and node-03. The second two lines contain information, that
Packit Service 34e2f8
we were successfully able to send an init message and also received a response
Packit Service 34e2f8
message from remote nodes. Both of these messages are unicast, so we are able to
Packit Service 34e2f8
send and receive unicast messages on a given port. If all of nodes are up and
Packit Service 34e2f8
.Nm
Packit Service 34e2f8
is running on all of them, but we are not able to receive a response
Packit Service 34e2f8
message, it's time to check connectivity between nodes. First make sure that
Packit Service 34e2f8
you are able to
Packit Service 34e2f8
.Xr ping 8
Packit Service 34e2f8
them. If so, make sure that your firewall allows port 4321 to receive udp packets.
Packit Service 34e2f8
.Pp
Packit Service 34e2f8
The next line tells us that we were able to receive a 69 byte unicast response message from
Packit Service 34e2f8
node-01, with a sequence number of 1. The distance between the computers is 0 so they are on
Packit Service 34e2f8
the same link net. Time between send and receive packet was 0.192 ms, that is also the
Packit Service 34e2f8
current average time and lastly there were no lost packets.
Packit Service 34e2f8
.Pp
Packit Service 34e2f8
The 6th line tells us the same information as the previous one, but the received message
Packit Service 34e2f8
is a multicast message. It means, that multicast is probably well configured.
Packit Service 34e2f8
.Pp
Packit Service 34e2f8
The 7th and 8th lines are same as previous two one but for node-03.
Packit Service 34e2f8
.Pp
Packit Service 34e2f8
If the node is able to receive unicast packets, but never multicast, it means that multicast
Packit Service 34e2f8
configuration is incorrect. It's recommended to turn off your firewall. If multicast packets start
Packit Service 34e2f8
to arrive, great. If not, the problem is hidden in the switches/routers between the nodes. Contact
Packit Service 34e2f8
your system administrator to allow multicast traffic on the switch or router.
Packit Service 34e2f8
.Pp
Packit Service 34e2f8
.Nm
Packit Service 34e2f8
is terminated by SIGINT signal (CTRL-c). Summary statistics are shown
Packit Service 34e2f8
.Pp
Packit Service 34e2f8
.Dl node-01 :   unicast, xmt/rcv/%loss = 18/18/0%, min/avg/max/std-dev = 0.177/0.301/0.463/0.073
Packit Service 34e2f8
.Dl node-01 : multicast, xmt/rcv/%loss = 18/18/0%, min/avg/max/std-dev = 0.193/0.335/0.547/0.090
Packit Service 34e2f8
.Dl node-03 :   unicast, xmt/rcv/%loss = 21/21/0%, min/avg/max/std-dev = 0.272/0.299/0.327/0.017
Packit Service 34e2f8
.Dl node-03 : multicast, xmt/rcv/%loss = 21/20/4% (seq>=2 0%), min/avg/max/std-dev = 0.347/0.388/0.575/0.055
Packit Service 34e2f8
.Pp
Packit Service 34e2f8
Last line has additional information (seq>=2 %0) which means, that after receiving first multicast
Packit Service 34e2f8
packet with seq number 2, no other multicast packet was lost. Because creating multicast tree is
Packit Service 34e2f8
time consuming, it's pretty normal to lost first few multicast packets. rcv field can also be
Packit Service 34e2f8
formatted like
Packit Service 34e2f8
.Pp
Packit Service 34e2f8
.Dl node-01 :   unicast, xmt/rcv/%loss = 3/3+1/0%, min/avg/max/std-dev = 0.294/0.299/0.305/0.006
Packit Service 34e2f8
.Pp
Packit Service 34e2f8
This means, that 1 duplicate packet was received. It's possible to find out duplicate packet by
Packit Service 34e2f8
looking to output and find line which has following format
Packit Service 34e2f8
.Pp
Packit Service 34e2f8
.Dl node-01 :   unicast, seq=2 (dup), size=69 bytes, dist=0, time=0.469ms
Packit Service 34e2f8
.Sh SEE ALSO
Packit Service 34e2f8
.Xr fping 8 ,
Packit Service 34e2f8
.Xr ping 8
Packit Service 34e2f8
.Sh STANDARDS
Packit Service 34e2f8
.Nm
Packit Service 34e2f8
uses Internet-Draft draft-ietf-mboned-ssmping-08 as underlaying protocol and tries
Packit Service 34e2f8
to be as compliant as possible.
Packit Service 34e2f8
.Sh AUTHORS
Packit Service 34e2f8
The
Packit Service 34e2f8
.Nm
Packit Service 34e2f8
utility was written by
Packit Service 34e2f8
.An Jan Friesse Aq jfriesse@redhat.com .
Packit Service 34e2f8
.Sh BUGS
Packit Service 34e2f8
.Bl -dash
Packit Service 34e2f8
.It
Packit Service 34e2f8
Some OSes may not have support for receiving TTL from packet.
Packit Service 34e2f8
.Nm
Packit Service 34e2f8
then cannot provide distance information.
Packit Service 34e2f8
.It
Packit Service 34e2f8
Some OSes may not provide information about packet receive. Less precise actual time is then used.
Packit Service 34e2f8
.It
Packit Service 34e2f8
.Nm
Packit Service 34e2f8
highly depends on precise
Packit Service 34e2f8
.Xr poll 2
Packit Service 34e2f8
and
Packit Service 34e2f8
.Xr gettimeofday 3
Packit Service 34e2f8
functions. If OS doesn't provide at least milliseconds precision, results may be incorrect.
Packit Service 34e2f8
.El