| MPING(1) | General Commands Manual | MPING(1) |
NAME
mping —
a simple multicast ping program
SYNOPSIS
mping |
[-6dhqrsv-b
BYTES-c
COUNT-i
IFNAME-p
PORT-t
TTL-w
SEC-W
SECGROUP ] |
DESCRIPTION
mping aspires to be an easy to use and script
friendly program with support for both IPv4 and IPv6. Similar to the standard
ping(1) program, but
unlike it, the response to multicast ping is sent by another
mping. It can be used to verify intended
IGMP/MLD snooping functionality in any layer-2 bridges (switches), as well as
verify forwarding of multicast in static
(SMCRoute) or dynamic
(mrouted,
pimd,
pimd-dense, or
pim6sd) multicast routing setups.
By default, mping starts in
receiver/reflector mode, joining group 225.1.2.3, and for each received UDP
packet from the sender, it is looped back. For unicast ping, this is handled
by the TCP/IP stack. To run in sender mode, use the
-s command line option. Remember to adjust
the TTL value if you are in a routed setup, and to set the multicast interface
with -i
IFNAME, otherwise the unicast routing table
is used by the kernel to select the outbound interface, which often is not
what you want.
Limitations
mping currently only supports any-source
multicast, ASM (*,G).
mping does not create or send IGMP/MLD frames
directly. Instead, it asks the kernel for groups from a specific interface,
which is then converted to the IGMPv2/MLDv1 join messages, or IGMPv3/MLDv2
membership reports by the kernel.
Changing IGMP Version on Linux
On Linux systems you can change the IGMP version of an interface, and thus what type of packets the kernel generates, by writing to the file /proc/sys/net/ipv4/conf/eth0/force_igmp_version. E.g., to changeeth0 to IGMPv2:
echo 2 | sudo tee /proc/sys/net/ipv4/conf/eth0/force_igmp_version
OPTIONS
-6- Use IPv6 instead of IPv4. Defaults to group ff2e::42, unless an IPv6 multicast grop is the first non-option argument. The optional group argument overrides the address family, so if an IPv4 group is detected this option is ignored
-bBYTES- Extra payload bytes (empty data) to pad each packet with, default: 0.
-cCOUNT- Stop sending/receiving after COUNT number of packets. The sender
mpinghas two modes of operation available. The default is to exit after COUNT number of packets have been sent. The other mode is to wait for COUNT packets to be received. See-woption, below, for more information. -d- Enable debug messages.
-h- Print a summary of the options and exit
-iIFNAME- Interface to use for sending/receiving multicast. The default is to automatically look up the default interface from the unicast routing table.
-pPORT- UDP port number to send/listen to, default: 4321
-q- Quiet output, only startup message and summary lines are printed
-r- Act as receiver/reflector, looping back packets to the sender, default: yes
-s- Act as sender, sends packets to select groups, default: no
-tTTL- TTL to use when sending multicast packets, default: 1
-v- Show version information
-wDEADLINE- Timeout, in seconds, before exiting, waiting for
-cCOUNT replies. If COUNT replies are received before the deadline,mpingexits. -WTIMEOUT- Timeout, in seconds, after the last received packet.
SEE ALSO
ping(1), mcjoin(1), mreceive(8) msend(8) nemesis(1)BUGS
Use the project's GitHub page to file bug reports, feature requests or patches (preferably as GitHub pull requests), or questions at ⟨https://github.com/troglobit/mping⟩AUTHORS
Originally based on an example from the book Multicast Sockets, by David Makofske and Kevin Almeroth. Since then completely rewritten and expanded on by Joachim Wiberg at GitHub.| January 4, 2026 | Debian |
Maintained in troglobit/mping as mping.1. Send corrections there, or read it on the mirror.