Skip to content

troglobit/pim6sd

Repository files navigation

PIM-SM/SSM IPv6 Multicast Routing for UNIX

pim6sd is an IPv6 Protocol Independent Multicast routing daemon, which supports both Any-Source as well as Source-Specific Multicast, also known as PIM-SM and PIM-SSM.

pim6sd stems from pim6dd, which was originally based on pimd, which in turn was based on mrouted.

Note: pim6sd currently requires a configuration file to start.

Troubleshooting

Having successfully built pim6sd (see below), starting it for the first time might be confusing:

  • What happened?
  • Where to look for status?
  • Why isn't it routing?

First of all, pim6sd is a UNIX daemon. By default it starts in the background and only logs warnings and errors to syslog.

Second, you might want to start it in debug mode, with a reduced .conf file. See the pim6sd.conf.sample and pim6sd.conf(5) man page for help.

cp pim6sd.conf.sample pim6sd.conf
sudo pim6sd -f pim6sd.conf -n -d all

This starts pim6sd with the local pim6sd.conf in the foreground, enabling all debug messages. When running in the foreground the debug messages are shown (unthrottled) in the same terminal. Periodically the state of interfaces and routing tables are shown in this debug log.

To see pim6sd status when running in the background, send SIGUSR1 to the PID, it is saved in /var/run/pim6sd.pid when the daemon has started successfully. The status is found in /var/run/pim6sd.dump. You can also use the pim6stat script, which does all this for you.

The single most common problem when dealing with multicast routing is the TTL of the multicast to be routed. If the TTL is 1 the data will be dropped by the kernel -- this is not a problem of pim6sd.

Another problem, which perhaps is not as common, is systems with lots of interfaces. The kernel multicast routing stack is (usually) limited to MAX 32 "virtual" interfaces. These "VIFs" are enumerated by the daemon at startup based on either the contents of the pim6sd.conf or querying the kernel for available interfaces. Should you run into problems with this, use the following construct in your .conf file to ensure multicast routing is only enabled between your foo and bar interfaces:

default_phyint_status disable;
phyint foo enable;
phyint bar enable;

More helpful tips and information is available in the man pages:

  • pim6sd(8)
  • pim6sd.conf(5)

Build & Install

The configure script and Makefile supports de facto standard options such as --prefix=PATH. E.g., to install pim6sd to /usr instead of the default /usr/local, with /etc for .conf file(s) and /var for PID and status dump files:

./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var
make
sudo make install-strip

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][buildsystem]:

  • 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/pim6sd.git
cd pim6sd/
./autogen.sh
./configure && make
sudo make install-strip

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

Multicast vs. Unicast Routes

Or: How/why/when to use an alternative unicast routing table

PIM-SD relies on a pre-established unicast topology for any routing decision. PIM-SD is not capable of finding a best path between two multicast routers on its own.

This makes it important for PIM-SD that each router on any unicast route between designated multicast routers is PIM-SD capable. Otherwise a unicast-only router might become a black hole for PIM-SD multicast. You might then see warnings in the pim6sd logs like "NETLINK: ifindex=<number>, but no vif or next hop router is <router>: NOT A PIM ROUTER. Especially when connecting to a larger, pre-existing unicast topology, like to the internet via BGP, this will become an issue: You will not be able to convince every router there to also run a PIM-SD implementation.

One option to tackle this is to establish a separate unicast topology and unicast routing table dedicated to multicast payload. For instance M-BGP has dedicated "IPv4 multicast" and "IPv6 multicast" channels. BGP routers can then typically export unicast routes (these channels do NOT contain multicast routes, they contain unicast routes FOR a a multicast topology) to a separate unicast routing table.

For pim6sd to use this separate routing table one option is to assign a VRF to this routing table. And then use the source_outgoing_interface parameter in the pim6sd.conf file. Example:

ip -6 route add table 42 unreachable default metric 4278198272
ip link add dn42_mc6_vrf type vrf table 42
ip link set dev dn42_mc6_vrf up
echo "source_outgoing_interface dn42_mc6_vrf;" >> /etc/pim6sd.conf

Then make your BGP config in bird/FRRouting/etc. populate table 42 from the "IPv6 multicast" channel with the same (and at least not more!) interfaces as configured in pim6sd.

Origin & References

This project was forked from mcast-tools to focus on pim6sd only.

About

PIM-SM/SSM daemon for IPv6

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

 

Contributors 7