Skip to content

ericb-summit/mrouted

 
 

Repository files navigation

Simple Multicast Routing for UNIX

License Badge GitHub Status Coverity Status

Simple overview of what DVMRP is

Table of Contents

Introduction

mrouted is the original implementation of the DVMRP multicast routing protocol, RFC 1075. It only works with IPv4 networks. For more advanced setups, the pimd project or pimd-dense project, for IPv6 the pim6sd project may be of interest.

mrouted is simple to use. DVMRP is derived from RIP, which means it works stand-alone without any extra network setup required. You can get up and running in a matter of minutes. Use the built-in IP-in-IP tunneling support, or GRE, to traverse Internet or intranets.

mrouted is developed on Linux and works as-is out of the box. Other UNIX variants should also work, but are not as thoroughly tested.

Manual pages available online:

Running

mrouted does not require a .conf file. When it starts up it probes all available interfaces and starts peering with any DVMRP capable neighbor. Multicast is forwarded to end-devices that join a group using IGMPv1, IGMPv2, or IGMPv3. For LANs where there may be hosts that do not speak IGMP, or where certain groups should always be forwarded, a static-group setting is available in mrouted.conf.

Use mgen(1), mcjoin(1), or iperf to send IGMP join packets and multicast data on the LAN to test your multicast routing setup. Use the mroutectl tool to query a running mrouted for status.

NOTE: Beware of the TTL value in the IP header of your multicast data. It defaults to 1 on most operating systems, which means nothing will be routed by default!

For the native mrouted tunnel to work in Linux based systems, you need to have the "ipip" kernel module loaded or as built-in:

modprobe ipip

Alternatively, you may of course also set up GRE tunnels between your multicast capable routers.

If you have many interfaces on your system you may want to look into the no phyint setting in [mroute.conf(5)][]. Linux users may also need to adjust /proc/sys/net/ipv4/igmp_max_memberships to a value larger than the default 20. mrouted needs 3x the number of interfaces (vifs) for the relevant control protocol groups. The kernel (Linux & BSD) maximum number of interfaces to use for multicast routing is 32.

Note: mrouted must run with sufficient capabilities, or as root.

Configuration

mrouted reads its configuration file from /etc/mrouted.conf, if it exists. You can override the default by specifying an alternate file when invoking mrouted:

mrouted -f /path/file.conf

mrouted can be reconfigured at runtime like any regular UNIX daemon with SIGHUP, or mroutectl restart, to activate changes made to its configuration file. The PID is saved in the file /run/mrouted.pid for your scripting needs.

By default, mrouted configures itself to act as a multicast router on all multicast capable interfaces. Hence, you do not need to explicitly configure it, unless you need to setup tunnel links, change the default operating parameters, disable multicast routing over a specific physical interfaces, or have dynamic interfaces.

Note: you need to have IP Multicast Routing enabled in the kernel as well. How this is achieved is outside the scope of this README.

For more help, see the mrouted(8) and mrouted.conf(5) man pages.

Build & Install

Debian/Ubuntu

curl -sS https://deb.troglobit.com/pubkey.gpg | sudo apt-key add -
echo "deb [arch=amd64] https://deb.troglobit.com/debian stable main" | sudo tee /etc/apt/sources.list.d/troglobit.list
sudo apt-get update && sudo apt-get install mrouted

Building from Source

Download the latest official versioned mrouted release. Official releases contain all the necessary files, unlike building from GIT. mrouted has no external dependencies except for a standard C library.

The configure script and Makefile supports de facto standard settings and environment variables such as --prefix=PATH and DESTDIR= for the install process. For example, to install mrouted to /usr, instead of the default /usr/local, and redirect install to a package directory in /tmp:

./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var
make
make DESTDIR=/tmp/mrouted-4.0-1 install-strip

This version of mrouted has RSRR support for running RSVP, disabled by default. Enable with configure --enable-rsrr.

Note: On some systems --runstatedir may not be available in the configure script, try --localstatedir=/var instead.

Building from GIT

If you want to contribute, or simply just try out the latest but unreleased features, then you need to know a few things about the GNU build system:

  • configure.ac and a per-directory Makefile.am are key files
  • configure and Makefile.in are generated from autogen.sh
  • Makefile is generated by configure script

To build from GIT you first need to clone the repository and run the autogen.sh script. This requires automake and autoconf to be installed on your system.

git clone https://github.com/troglobit/mrouted.git
cd mrouted/
./autogen.sh
./configure && make

GIT sources are a moving target and are not recommended for production systems, unless you know what you are doing!

Contributing

The basic functionality has been tested thoroughly over the years, but that does not mean mrouted is bug free. Please report bugs, feature requests, patches and pull requests at GitHub.

Origin & References

The mrouted routing daemon was developed by David Waitzman, Craig Partridge, Steve Deering, Ajit Thyagarajan, Bill Fenner, David Thaler and Daniel Zappala. With contributions by many others.

The last release by Mr. Fenner was 3.9-beta3 on April 26 1999 and mrouted has been in "beta" status since then. Several prominent UNIX operating systems, such as AIX, Solaris, HP-UX, BSD/OS, NetBSD, FreeBSD, OpenBSD as well as most GNU/Linux based distributions have used that beta as a de facto stable release, with (mostly) minor patches for system adaptations. Over time however many dropped support, but Debian and OpenBSD kept it under their wings.

In March 2003 OpenBSD, led by the fearless Theo de Raadt, managed to convince Stanford to release mrouted under a fully free license, the 3-clause BSD license. Unfortunately, and despite the license issue being corrected by OpenBSD, in February 2005 Debian dropped mrouted as an "obsolete protocol".

For a long time the OpenBSD team remained the sole guardian of this project. In 2010 Joachim Wiberg revived mrouted on GitHub based on the last release by Bill Fenner, the mrouted-3.9beta3+IOS12.tar.gz tarball. This project has integrated all (?) known patches and continuously track the OpenBSD project, which is based on the 3.8 release, for any relevant fixes.

About

The original DVMRP implementation for UNIX

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C 87.1%
  • Shell 8.0%
  • Yacc 3.4%
  • Other 1.5%