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
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
|
'\"COPYRIGHT 1989 by The Board of Trustees of Leland Stanford Junior University.
.Dd March 25, 1995
.Dt MROUTED 8
.Os FreeBSD 2.0
.Sh NAME
.Nm mrouted
.Nd IP multicast routing process
.Sh SYNOPSIS
.Nm mrouted
.Op Fl p
.Op Fl c Ar config
.Op Fl d Ar debuglevel
.Sh DESCRIPTION
The
.Nm
program
is an implementation of the Distance-Vector Multicast Routing
Protocol (DVMRP), an earlier version of which is specified in RFC-1075.
It maintains topological knowledge via a distance-vector routing protocol
(like RIP, described in RFC-1058), upon which it implements a multicast
datagram forwarding algorithm called Reverse Path Multicasting.
.Pp
.Nm
forwards a multicast datagram along a shortest (reverse) path tree
rooted at the subnet on which the datagram originates. The multicast
delivery tree may be thought of as a broadcast delivery tree that has
been pruned back so that it does not extend beyond those subnetworks
that have members of the destination group. Hence, datagrams
are not forwarded along those branches which have no listeners of the
multicast group. The IP time-to-live of a multicast datagram can be
used to limit the range of multicast datagrams.
.Pp
In order to support multicasting among subnets that are separated by (unicast)
routers that do not support IP multicasting,
.Nm
includes support for
.Dq tunnels ,
which are virtual point-to-point links between pairs of
.Nm
programs located anywhere in an internet. IP multicast packets are
encapsulated for transmission through tunnels, so that they look like
normal unicast datagrams to intervening routers and subnets. The
encapsulation is added on entry to a tunnel, and stripped off on exit
from a tunnel. By default, the packets are encapsulated using the
IP-in-IP protocol (IP protocol number 4). Older versions of
.Nm
tunneled using IP source routing, which puts a heavy load on some
types of routers.
This version supports IP source route tunnelling only for backwards
compatibility.
.Pp
The tunnelling mechanism allows
.Nm
to establish a virtual internet, for
the purpose of multicasting only, which is independent of the physical
internet, and which may span multiple Autonomous Systems. This capability
is intended for experimental support of internet multicasting only, pending
widespread support for multicast routing by the regular (unicast) routers.
.Nm
suffers from the well-known scaling problems of any distance-vector
routing protocol, and does not (yet) support hierarchical multicast routing.
.Pp
.Nm
handles multicast routing only; there may or may not be unicast routing
software running on the same machine as
.Nm mrouted .
With the use of tunnels, it
is not necessary for
.Nm
to have access to more than one physical subnet
in order to perform multicast forwarding.
.Pp
If no
.Fl d
option is given, or if the debug level is specified as 0,
.Nm
detaches from its controlling terminal. Otherwise, it remains attached to the
terminal and responsive to signals.
.Pp
The
.Nm
program accepts the following command-line options:
.Bl -tag -width XXXdebuglevel
.It Fl c Ar config
This option specifies an alternate configuration file location as
.Ar config .
The default location is
.Pa /etc/mrouted.conf .
.It Fl d Ar debuglevel
This option sets the debuging level to
.Ar debuglevel .
Regardless of the debug level,
.Nm
always writes warning and error messages to the system
log demon. Non-zero debug levels have the following effects:
.Bl -tag -width "level 3"
.It level 1
all syslog'ed messages are also printed to stderr.
.It level 2
all level 1 messages plus notifications of
.Dq significant
events are printed to stderr.
.It level 3
all level 2 messages plus notifications of all packet
arrivals and departures are printed to stderr.
.El
.It Fl p
This option disables pruning of uninterested links in the multicast
distribution tree.
.El
.Sh CONFIGURATION
.Nm
automatically configures itself to forward on all multicast-capable
interfaces; i.e., interfaces that have the
.Dv IFF_MULTICAST
flag set (excluding the loopback), and it finds other
.Nm
programs directly reachable via those interfaces. To override the
default configuration, or to add tunnel links to other
.Nm
programs, configuration commands may be placed in
.Pa /etc/mrouted.conf
(or an alternate location can be specified using the
.Fl c
option).
There are four types of configuration commands:
.Bd -literal
phyint <local-addr> [disable] [metric <m>]
[threshold <t>] [rate_limit <b>]
[boundary <scoped-addr>/<mask-len>]
tunnel <local-addr> <remote-addr> [metric <m>]
[threshold <t>] [srcrt] [rate_limit <b>]
[boundary <scoped-addr>/<mask-len>]
cache_lifetime <ct>
pruning <off/on>
.Ed
.Pp
One note about the configuration commands--all the phyint and tunnel
command options must be on a single line except for the boundary option
which may begin on a separate line. A single phyint or tunnel command may
have multiple boundary options.
.Pp
The phyint command can be used to disable multicast routing on the physical
interface identified by local IP address <local-addr>, or to associate a
non-default metric or threshold with the specified physical interface.
The local IP address <local-addr> may be alternatively replaced by the
interface name (e.g., le0) for the phyint command only.
Phyint commands must precede tunnel commands.
.Pp
The tunnel command can be used to establish a tunnel link between local
IP address <local-addr> and remote IP address <remote-addr>, and to associate
a non-default metric or threshold with that tunnel. The tunnel must be set
up in the mrouted.conf files of both routers before it can be used.
For backwards compatibility with older
.Nm
programs, the srcrt keyword specifies
encapsulation using IP source routing.
.Pp
The cache_lifetime is a value that determines the amount of time that a
cached multicast route stays in kernel before timing out. The value of this
entry should lie between 300 (5 min) and 86400 (1 day). It defaults to 300.
.Pp
The pruning <off/on> option is provided for
.Nm
to act as a non-pruning router. It is also possible to start
.Nm
in a non-pruning mode using the
.Fl p
flag on the command line. It is expected that a router would be
configured in this manner for test purposes only. The default mode is
pruning enabled.
.Pp
The metric is the
.Dq cost
associated with sending a datagram on the given
interface or tunnel; it may be used to influence the choice of routes.
The metric defaults to 1. Metrics should be kept as small as possible,
because
.Nm
cannot route along paths with a sum of metrics greater
than 31.
.Pp
The threshold is the minimum IP time-to-live required for a multicast datagram
to be forwarded to the given interface or tunnel. It is used to control the
scope of multicast datagrams. (The TTL of forwarded packets is only compared
to the threshold, it is not decremented by the threshold. Every multicast
router decrements the TTL by 1.) The default threshold is 1.
.Pp
In general, all
.Nm mrouted
programs connected to a particular subnet or tunnel should
use the same metric and threshold for that subnet or tunnel.
.Pp
The rate_limit option allows the network administrator to specify a
certain bandwidth in Kbits/second which would be allocated to multicast
traffic.
.Pp
The boundary option allows an interface
to be configured as an administrative boundary for the specified
scoped address. Packets belonging to this address will not
be forwarded on a scoped interface.
.Pp
The
.Nm
program
will not initiate execution if it has fewer than two enabled vifs,
where a vif (virtual interface) is either a physical multicast-capable
interface or a tunnel. It will log a warning if all of its vifs are
tunnels; such an
.Nm
configuration would be better replaced by more
direct tunnels (i.e., eliminate the middle man).
.Sh SIGNALS
The
.Nm
program responds to the following signals:
.Bl -tag -width SIGTERMx
.It Dv SIGHUP
restarts
.Nm mrouted .
The configuration file is reread every time this signal is evoked.
.It Dv SIGINT
terminates execution gracefully (i.e., by sending
good-bye messages to all neighboring routers).
.It Dv SIGTERM
same as
.Dv SIGINT
.It Dv SIGUSR1
dumps the internal routing tables to
.Pa /var/tmp/mrouted.dump .
.It Dv SIGUSR2
dumps the internal cache tables to
.Pa /var/tmp/mrouted.cache .
.It Dv SIGQUIT
dumps the internal routing tables to stderr (only if
.Nm
was invoked with a non-zero debug level).
.El
.Sh EXAMPLE
The routing tables look like this:
.Bd -literal
Virtual Interface Table
Vif Local-Address Metric Thresh Flags
0 36.2.0.8 subnet: 36.2 1 1 querier
groups: 224.0.2.1
224.0.0.4
pkts in: 3456
pkts out: 2322323
1 36.11.0.1 subnet: 36.11 1 1 querier
groups: 224.0.2.1
224.0.1.0
224.0.0.4
pkts in: 345
pkts out: 3456
2 36.2.0.8 tunnel: 36.8.0.77 3 1
peers: 36.8.0.77 (2.2)
boundaries: 239.0.1
: 239.1.2
pkts in: 34545433
pkts out: 234342
3 36.2.0.8 tunnel: 36.6.8.23 3 16
Multicast Routing Table (1136 entries)
Origin-Subnet From-Gateway Metric In-Vif Out-Vifs
36.2 1 0 1* 2 3*
36.8 36.8.0.77 4 2 0* 1* 3*
36.11 1 1 0* 2 3*
.
.
.
.Ed
.Pp
In this example, there are four vifs connecting to two subnets and two
tunnels. The vif 3 tunnel is not in use (no peer address). The vif 0 and
vif 1 subnets have some groups present; tunnels never have any groups. This
instance of
.Nm
is the one responsible for sending periodic group
membership queries on the vif 0 and vif 1 subnets, as indicated by the
.Dq querier
flags. The list of boundaries indicate the scoped addresses on that
interface. A count of the number of incoming and outgoing packets is
also shown at each interface.
.Pp
Associated with each subnet from which a multicast datagram can
originate is the address of the previous hop router (unless the subnet
is directly connected), the metric of the path back to the origin,
the incoming vif for multicasts from that origin, and a list of
outgoing vifs.
.Dq Li \&*
means that the outgoing vif is connected to a leaf of the broadcast
tree rooted at the origin, and a multicast datagram from that origin
will be forwarded on that outgoing vif only if there are members of
the destination group on that leaf.
.Pp
.Nm
also maintains a copy of the kernel forwarding cache table. Entries
are created and deleted by
.Nm mrouted .
.Pp
The cache tables look like this:
.Bd -literal
Multicast Routing Cache Table (325 entries)
Origin-Subnet Mcast-group CTmr IVif Prcv# Psnt Forwvifs
134.207.7 224.2.140.239 300 1 0 0 2
138.15.103 224.2.203.214 295 1 2 P 0p 2p
128.237.0 224.2.253.119 290 1 1 0 2p
129.215.200 224.2.207.48 40 1 1 0p 2
36.77.14 239.0.1.234 345 2b
.Ed
.Pp
Each entry is characterized by the origin subnet number and the
destination multicast group. The
.Dq CTmr
field indicates the lifetime
(in seconds) of the entry. The entry is deleted from the cache table
when the timer decrements to zero. The
.Dq Ivif
field indicates the
incoming vif for multicast packets from that origin. Each router also
maintains a record of the number of prunes received from neighbouring
routers for a particular source and group. If there are no members of
a multicast group on any downward link of the multicast tree for a
subnet, a prune message is sent to the upstream router. They are
indicated by a
.Dq Li \&P
in the
.Dq Psnt
field. The
.Dq Forwvifs
field shows the
interfaces along which datagrams belonging to the source-group are
forwarded. A
.Dq Li \&p
indicates that no datagrams are being forwarded along
that interface. An unlisted interface is a leaf subnet with are no
members of the particular group on that subnet. A
.Dq Li \&b
on an interface
indicates that it is a boundary interface; i.e., traffic will not be
forwarded on the scoped address on that interface.
.Sh FILES
.Bl -tag -compact -width /var/tmp/mrouted.cache
.It Pa /etc/mrouted.conf
default configuration file
.It Pa /var/tmp/mrouted.cache
kernel forwarding cache dump file
.It Pa /var/tmp/mrouted.dump
routing table dump file
.El
.Sh SEE ALSO
.Xr map-mbone 8 ,
.Xr mrinfo 8 ,
.Xr mtrace 8
.Rs
.%A "S. Deering"
.%B "Proceedings of the ACM SIGCOMM '88 Conference"
.%T "Multicast Routing in Internetworks and Extended LANs"
.Re
.Sh AUTHORS
Steve Deering & Ajit Thyagarajan
.Sh HISTORY
The
.Nm
program first appeared in
.Tn FreeBSD
2.0.
|