Blame omping.8

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