PIM-SM is a multicast
routing protocol that can use the underlying unicast routing
information base or a separate multicast-capable routing
information base. It builds unidirectional shared trees rooted at a
Rendezvous Point (RP) per group, and optionally creates
shortest-path trees per source.

PIM-DM is a multicast
routing protocol that uses the underlying unicast routing
information base to flood multicast datagrams to all multicast
routers. Prune messages are used to prevent future datagrams from
propagating to routers with no group membership information.

Both PIM-SM and PIM-DM
are fairly complex protocols, though PIM-SM is much more complex.
To enable PIM-SM or PIM-DM multicast routing in a router, the user
must enable multicast routing and PIM processing in the kernel (see
SYNOPSIS about the kernel configuration options), and must
run a PIM-SM or PIM-DM capable user-level process. From
developer’s point of view, the programming guide described in
the Programming Guide section should be used to control the
PIM processing in the kernel.

Programming
Guide
After a multicast routing socket is open and multicast forwarding
is enabled in the kernel (see multicast(4)), one of the following
socket options should be used to enable or disable PIM processing
in the kernel. Note that those options require certain privilege
(i.e., root privilege):

After PIM processing is
enabled, the multicast-capable interfaces should be added (see
multicast(4)). In case of PIM-SM, the PIM-Register virtual
interface must be added as well. This can be accomplished by using
the following options:

The PIM-SM protocol is specified in RFC
2362 (to be replaced by draft-ietf-pim-sm-v2-new-*). The
PIM-DM protocol is specified in
draft-ietf-pim-dm-new-v2-*).

AUTHORS

The original IPv4 PIM kernel support for
IRIX and SunOS-4.x was implemented by Ahmed Helmy (USC and SGI).
Later the code was ported to various BSD flavors and modified by
George Edmond Eddy (Rusty) (ISI), Hitoshi Asaeda (WIDE Project),
and Pavlin Radoslavov (USC/ISI and ICSI). The IPv6 PIM kernel
support was implemented by the KAME project
(http://www.kame.net), and was based on the IPv4 PIM kernel
support.