-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathmping.1
More file actions
155 lines (155 loc) · 5.04 KB
/
mping.1
File metadata and controls
155 lines (155 loc) · 5.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
.\" Hey Emacs, this is an -*- nroff -*- document
.\"
.\" Copyright (c) 2021-2026 Joachim Wiberg <troglobit@gmail.com>
.\"
.\" Permission is hereby granted, free of charge, to any person obtaining a copy
.\" of this software and associated documentation files (the "Software"), to deal
.\" in the Software without restriction, including without limitation the rights
.\" to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
.\" copies of the Software, and to permit persons to whom the Software is
.\" furnished to do so, subject to the following conditions:
.\"
.\" The above copyright notice and this permission notice shall be included in
.\" all copies or substantial portions of the Software.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
.\" IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
.\" FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
.\" AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
.\" LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
.\" OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
.\" THE SOFTWARE.
.\"
.Dd Jan 4, 2026
.Dt MPING 1
.Os
.Sh NAME
.Nm mping
.Nd a simple multicast ping program
.Sh SYNOPSIS
.Nm
.Op Fl 6dhqrsv
.Op Fl b Ar BYTES
.Op Fl c Ar COUNT
.Op Fl i Ar IFNAME
.Op Fl p Ar PORT
.Op Fl t Ar TTL
.Op Fl w Ar SEC
.Op Fl W Ar SEC
.Op Ar GROUP
.Sh DESCRIPTION
.Nm
aspires to be an easy to use and script friendly program with support
for both IPv4 and IPv6. Similar to the standard
.Xr ping 1
program, but unlike it, the response to multicast ping is sent by
another
.Nm .
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
.Nm ( SMCRoute )
or dynamic
.Nm ( mrouted ,
.Nm pimd ,
.Nm pimd-dense ,
or
.Nm pim6sd )
multicast routing setups.
.Pp
By default,
.Nm
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
.Fl s
command line option. Remember to adjust the TTL value if you are in a
routed setup, and to set the multicast interface with
.Fl i Ar IFNAME ,
otherwise the unicast routing table is used by the kernel to select the
outbound interface, which often is not what you want.
.Ss Limitations
.Nm
currently only supports any-source multicast, ASM (*,G).
.Pp
.Nm
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.
.Ss 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
.Pa /proc/sys/net/ipv4/conf/eth0/force_igmp_version .
E.g., to change
.Cm eth0
to IGMPv2:
.Bd -literal -offset indent
echo 2 | sudo tee /proc/sys/net/ipv4/conf/eth0/force_igmp_version
.Ed
.Sh OPTIONS
.Bl -tag -width Ds
.It Fl 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
.It Fl b Ar BYTES
Extra payload bytes (empty data) to pad each packet with, default: 0.
.It Fl c Ar COUNT
Stop sending/receiving after COUNT number of packets. The sender
.Nm
has two modes of operation available. The default is to exit after
.Ar COUNT
number of packets have been sent. The other mode is to wait for
.Ar COUNT
packets to be received. See
.Fl w
option, below, for more information.
.It Fl d
Enable debug messages.
.It Fl h
Print a summary of the options and exit
.It Fl i Ar IFNAME
Interface to use for sending/receiving multicast. The default is to
automatically look up the default interface from the unicast routing
table.
.It Fl p Ar PORT
UDP port number to send/listen to, default: 4321
.It Fl q
Quiet output, only startup message and summary lines are printed
.It Fl r
Act as receiver/reflector, looping back packets to the sender, default:
yes
.It Fl s
Act as sender, sends packets to select groups, default: no
.It Fl t Ar TTL
TTL to use when sending multicast packets, default: 1
.It Fl v
Show version information
.It Fl w Ar DEADLINE
Timeout, in seconds, before exiting, waiting for
.Fl c Ar COUNT
replies. If
.Ar COUNT
replies are received before the deadline,
.Nm
exits.
.It Fl W Ar TIMEOUT
Timeout, in seconds, after the last received packet.
.El
.Sh SEE ALSO
.Xr ping 1 ,
.Xr mcjoin 1 ,
.Xr mreceive 8
.Xr msend 8
.Xr nemesis 1
.Sh BUGS
Use the project's GitHub page to file bug reports, feature requests or
patches (preferably as GitHub pull requests), or questions at
.Aq https://github.com/troglobit/mping
.Sh 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.