1 .\" $NetBSD: mrouted.8,v 1.16 2003/09/07 16:22:25 wiz Exp $
2 .\" $OpenBSD: mrouted.8,v 1.11 2003/03/03 15:14:28 deraadt Exp $
3 .\" The mrouted program is covered by the license in the accompanying file
4 .\" named "LICENSE". Use of the mrouted program represents acceptance of
5 .\" the terms and conditions listed in that file.
7 .\" The mrouted program is COPYRIGHT 1989 by The Board of Trustees of
8 .\" Leland Stanford Junior University.
14 .Nd IP multicast routing daemon
17 .Op Fl c Ar config_file
18 .Op Fl d Ar debug_level
22 is an implementation of the Distance-Vector Multicast Routing
23 Protocol (DVMRP), an earlier version of which is specified in RFC 1075.
24 It maintains topological knowledge via a distance-vector routing protocol
25 (like RIP, described in RFC 1058), upon which it implements a multicast
26 datagram forwarding algorithm called Reverse Path Multicasting.
29 forwards a multicast datagram along a shortest (reverse) path tree
30 rooted at the subnet on which the datagram originates.
32 delivery tree may be thought of as a broadcast delivery tree that has
33 been pruned back so that it does not extend beyond those subnetworks
34 that have members of the destination group.
35 Hence, datagrams are not forwarded along those branches which have no
36 listeners of the multicast group.
37 The IP time-to-live of a multicast datagram can be
38 used to limit the range of multicast datagrams.
40 In order to support multicasting among subnets that are separated by (unicast)
41 routers that do not support IP multicasting,
44 "tunnels", which are virtual point-to-point links between pairs of
46 daemons located anywhere in an internet.
47 IP multicast packets are encapsulated
48 for transmission through tunnels, so that they look like normal unicast
49 datagrams to intervening routers and subnets.
50 The encapsulation is added on
51 entry to a tunnel, and stripped off on exit from a tunnel.
52 By default, the packets are encapsulated using the IP-in-IP protocol
53 (IP protocol number 4).
56 tunnel using IP source routing, which puts a heavy load on some
58 This version does not support IP source route tunneling.
60 The tunneling mechanism allows
62 to establish a virtual internet, for
63 the purpose of multicasting only, which is independent of the physical
64 internet, and which may span multiple Autonomous Systems.
66 is intended for experimental support of internet multicasting only, pending
67 widespread support for multicast routing by the regular (unicast) routers.
69 suffers from the well-known scaling problems of any distance-vector
70 routing protocol, and does not (yet) support hierarchical multicast routing.
73 handles multicast routing only; there may or may not be unicast routing
74 software running on the same machine as
76 With the use of tunnels, it is not necessary for
78 to have access to more than one physical subnet
79 in order to perform multicast forwarding.
83 option is given, or if the debug level is specified as 0,
85 detaches from the invoking terminal.
86 Otherwise, it remains attached to the
87 invoking terminal and responsive to signals from that terminal.
90 is given with no argument, the debug level defaults to 2.
91 Regardless of the debug level,
93 always writes warning and error messages to the system
95 Non-zero debug levels have the following effects:
96 .Bl -hang -compact -offset indent
98 all syslog'ed messages are also printed to stderr.
100 all level 1 messages plus notifications of "significant"
101 events are printed to stderr.
103 all level 2 messages plus notifications of all packet
104 arrivals and departures are printed to stderr.
107 Upon startup, mrouted writes its pid to the file
108 .Pa /var/run/mrouted.pid .
111 automatically configures itself to forward on all multicast-capable
112 interfaces, i.e., interfaces that have the IFF_MULTICAST flag set (excluding
113 the loopback "interface"), and it finds other
115 directly reachable via those interfaces.
116 To override the default configuration, or to add tunnel links to other
118 configuration commands may be placed in
119 .Pa /etc/mrouted.conf
120 (or an alternative file, specified by the
123 There are four types of configuration commands:
124 .Bl -item -offset indent
126 .Tn phyint \*[Lt]local-addr\*[Gt] [disable] [metric \*[Lt]m\*[Gt]]
127 .Bl -tag -width flag -compact -offset indent
128 .It [threshold \*[Lt]t\*[Gt]] [rate_limit \*[Lt]b\*[Gt]]
129 .It [boundary (\*[Lt]boundary-name\*[Gt]|\*[Lt]scoped-addr\*[Gt]/\*[Lt]mask-len\*[Gt])]
130 .It [altnet \*[Lt]network\*[Gt]/\*[Lt]mask-len\*[Gt]]
133 .Bl -tag -width flag -compact -offset indent
134 .It Tn tunnel \*[Lt]local-addr\*[Gt] \*[Lt]remote-addr\*[Gt] [metric \*[Lt]m\*[Gt]]
135 .It [threshold \*[Lt]t\*[Gt]] [rate_limit \*[Lt]b\*[Gt]]
136 .It [boundary (\*[Lt]boundary-name\*[Gt]|\*[Lt]scoped-addr\*[Gt]/\*[Lt]mask-len\*[Gt])]
139 .Tn cache_lifetime \*[Lt]ct\*[Gt]
141 .Tn pruning \*[Lt]off/on\*[Gt]
143 .Tn name \*[Lt]boundary-name\*[Gt] \*[Lt]scoped-addr\*[Gt]/\*[Lt]mask-len\*[Gt]
146 The file format is free-form; whitespace (including newlines) is not
152 options may be specified as many times as necessary.
154 The phyint command can be used to disable multicast routing on the physical
155 interface identified by local IP address
156 .Ar \*[Lt]local-addr\*[Gt] ,
157 or to associate a non-default metric or threshold with the specified
160 .Ar \*[Lt]local-addr\*[Gt]
161 may be replaced by the interface name (e.g., le0).
162 If a phyint is attached to multiple IP subnets, describe each additional subnet
163 with the altnet keyword.
164 Phyint commands must precede tunnel commands.
166 The tunnel command can be used to establish a tunnel link between local
168 .Ar \*[Lt]local-addr\*[Gt]
169 and remote IP address
170 .Ar \*[Lt]remote-addr\*[Gt] ,
171 and to associate a non-default metric or threshold with that tunnel.
173 .Ar \*[Lt]local-addr\*[Gt]
174 may be replaced by the interface name (e.g., le0).
175 The remote IP address
176 .Ar \*[Lt]remote-addr\*[Gt]
177 may be replaced by a host name, if and only if the host name has a single
178 IP address associated with it.
179 The tunnel must be set up in the mrouted.conf files of both routers before
181 .\"For backwards compatibility with older
183 .\"the srcrt keyword specifies
184 .\"encapsulation using IP source routing.
186 The cache_lifetime is a value that determines the amount of time that a
187 cached multicast route stays in kernel before timing out.
188 The value of this entry should lie between 300 (5 min) and 86400 (1 day).
193 option is provided for
195 to act as a non-pruning router.
196 It is also possible to start
198 in a non-pruning mode using the
200 option on the command line.
201 It is expected that a router would be configured
202 in this manner for test purposes only.
203 The default mode is pruning enabled.
205 You may assign names to boundaries to make configuration easier with
207 The boundary option on phyint or tunnel commands
208 can accept either a name or a boundary.
210 The metric is the "cost" associated with sending a datagram on the given
211 interface or tunnel; it may be used to influence the choice of routes.
212 The metric defaults to 1.
213 Metrics should be kept as small as possible, because
215 cannot route along paths with a sum of metrics greater than 31.
217 The threshold is the minimum IP time-to-live required for a multicast datagram
218 to be forwarded to the given interface or tunnel.
219 It is used to control the scope of multicast datagrams.
220 (The TTL of forwarded packets is only compared
221 to the threshold, it is not decremented by the threshold.
222 Every multicast router decrements the TTL by 1.)
223 The default threshold is 1.
227 connected to a particular subnet or tunnel should
228 use the same metric and threshold for that subnet or tunnel.
230 The rate_limit option allows the network administrator to specify a
231 certain bandwidth in Kbits/second which would be allocated to multicast
233 It defaults to 500Kbps on tunnels, and 0 (unlimited) on physical
236 The boundary option allows an interface
237 to be configured as an administrative boundary for the specified
239 Packets belonging to this address will not
240 be forwarded on a scoped interface.
241 The boundary option accepts either
242 a name or a boundary spec.
245 will not initiate execution if it has fewer than two enabled vifs,
246 where a vif (virtual interface) is either a physical multicast-capable
247 interface or a tunnel.
248 It will log a warning if all of its vifs are tunnels; such an
250 configuration would be better replaced by more
251 direct tunnels (i.e., eliminate the middle man).
252 .Sh EXAMPLE CONFIGURATION
253 This is an example configuration for a mythical multicast router at a big
255 .Bd -unfilled -compact -offset left
257 # mrouted.conf example
259 # Name our boundaries to make it easier.
260 name LOCAL 239.255.0.0/16
261 name EE 239.254.0.0/16
263 # le1 is our gateway to compsci, don't forward our
264 # local groups to them.
265 phyint le1 boundary EE
267 # le2 is our interface on the classroom net, it has four
268 # different length subnets on it.
269 # Note that you can use either an ip address or an
271 phyint 172.16.12.38 boundary EE altnet 172.16.15.0/26
272 altnet 172.16.15.128/26 altnet 172.16.48.0/24
274 # atm0 is our ATM interface, which doesn't properly
275 # support multicasting.
278 # This is an internal tunnel to another EE subnet.
279 # Remove the default tunnel rate limit, since this
280 # tunnel is over ethernets.
281 tunnel 192.168.5.4 192.168.55.101 metric 1 threshold 1
284 # This is our tunnel to the outside world.
285 # Careful with those boundaries, Eugene.
286 tunnel 192.168.5.4 10.11.12.13 metric 1 threshold 32
287 boundary LOCAL boundary EE
291 responds to the following signals:
292 .Bl -tag -width TERM -compact
296 The configuration file is reread every time this signal is evoked.
298 terminates execution gracefully (i.e., by sending
299 good-bye messages to all neighboring routers).
303 dumps the internal routing tables to
304 .Pa /var/tmp/mrouted.dump .
306 dumps the internal cache tables to
307 .Pa /var/tmp/mrouted.cache .
309 dumps the internal routing tables to stderr (only if
311 was invoked with a non-zero debug level).
314 For convenience in sending signals,
317 .Pa /var/run/mrouted.pid
320 .Bl -tag -width /var/tmp/mrouted.cache -compact
321 .It Pa /etc/mrouted.conf
322 .It Pa /var/run/mrouted.pid
323 .It Pa /var/tmp/mrouted.dump
324 .It Pa /var/tmp/mrouted.cache
327 The routing tables look like this:
329 .Bd -literal -compact -offset left
330 Virtual Interface Table
331 Vif Local-Address Metric Thresh Flags
332 0 36.2.0.8 subnet: 36.2 1 1 querier
338 1 36.11.0.1 subnet: 36.11 1 1 querier
345 2 36.2.0.8 tunnel: 36.8.0.77 3 1
346 peers: 36.8.0.77 (2.2)
352 3 36.2.0.8 tunnel: 36.6.8.23 3 16
354 Multicast Routing Table (1136 entries)
355 Origin-Subnet From-Gateway Metric Tmr In-Vif Out-Vifs
357 36.8 36.8.0.77 4 15 2 0* 1* 3*
364 In this example, there are four vifs connecting to two subnets and two
366 The vif 3 tunnel is not in use (no peer address).
368 vif 1 subnets have some groups present; tunnels never have any groups.
371 is the one responsible for sending periodic group
372 membership queries on the vif 0 and vif 1 subnets, as indicated by the
374 The list of boundaries indicate the scoped addresses on that interface.
375 A count of the number of incoming and outgoing packets is also
376 shown at each interface.
378 Associated with each subnet from which a multicast datagram can originate
379 is the address of the previous hop router (unless the subnet is directly-
380 connected), the metric of the path back to the origin, the amount of time
381 since we last received an update for this subnet, the incoming vif for
382 multicasts from that origin, and a list of outgoing vifs.
384 the outgoing vif is connected to a leaf of the broadcast tree rooted at the
385 origin, and a multicast datagram from that origin will be forwarded on that
386 outgoing vif only if there are members of the destination group on that leaf.
389 also maintains a copy of the kernel forwarding cache table.
390 Entries are created and deleted by
393 The cache tables look like this:
395 .Bd -unfilled -compact -offset left
396 Multicast Routing Cache Table (147 entries)
397 Origin Mcast-group CTmr Age Ptmr IVif Forwvifs
398 13.2.116/22 224.2.127.255 3m 2m - 0 1
401 138.96.48/21 224.2.127.255 5m 2m - 0 1
403 128.9.160/20 224.2.127.255 3m 2m - 0 1
405 198.106.194/24 224.2.135.190 9m 28s 9m 0P
409 Each entry is characterized by the origin subnet number and mask and the
410 destination multicast group.
411 The 'CTmr' field indicates the lifetime of the entry.
412 The entry is deleted from the cache table
413 when the timer decrements to zero.
414 The 'Age' field is the time since
415 this cache entry was originally created.
416 Since cache entries get refreshed
417 if traffic is flowing, routing entries can grow very old.
418 The 'Ptmr' field is simply a dash if no prune was sent upstream, or the
419 amount of time until the upstream prune will time out.
420 The 'Ivif' field indicates the
421 incoming vif for multicast packets from that origin.
423 maintains a record of the number of prunes received from neighboring
424 routers for a particular source and group.
425 If there are no members of
426 a multicast group on any downward link of the multicast tree for a
427 subnet, a prune message is sent to the upstream router.
428 They are indicated by a "P" after the vif number.
429 The Forwvifs field shows the
430 interfaces along which datagrams belonging to the source-group are
432 A "p" indicates that no datagrams are being forwarded along
434 An unlisted interface is a leaf subnet with are no
435 members of the particular group on that subnet.
436 A "b" on an interface
437 indicates that it is a boundary interface, i.e., traffic will not be
438 forwarded on the scoped address on that interface.
439 An additional line with a "\*[Gt]" as the first character is printed for
440 each source on the subnet.
441 Note that there can be many sources in one subnet.
447 DVMRP is described, along with other multicast routing algorithms, in the
448 paper "Multicast Routing in Internetworks and Extended LANs" by S. Deering,
449 in the Proceedings of the ACM SIGCOMM '88 Conference.
451 Steve Deering, Ajit Thyagarajan, Bill Fenner