PIM (Protocol Independent Multicast) - IOS

Function: 
Multicast Routing
  • PIM is a multicast routing protocol that impleements two routing schemes: dense mode (PIM-DM) and sparse mode (PIM-SM). 
  • All multicast routing protocols build a distribution tree of routers that connect the multicast senders to the multicast receivers. 
  • PIM-DM builds one distribution tree for each multicast source. The distribution tree is a shortest-path tree that is created using the flooding method.
  • PIM-SM builds either a single, shared distribution tree using the Rendezvous Point as the root, or source-based trees (similar to PIM-DM), using explicit joins (vs. flood-and-prune used in PIM-DM).
Enabling PIM-DM
  • ip pim dense-mode

    ip pim sparse-mode

    ip pim sparse-dense-mode

    Enables the multicast routing protocols PIM-DM or PIM-SM for an interface. The option sparse-mode uses PIM-SM if a rendezvous point is known and PIM-DM when a rendezvous point is not known. 

  • Before using the PIM routing protocol it is necessary to enable unicast and multicast forwarding on your router. In the following example the unicast routing protocol is started using RIP. The following are sample commands used to setting up the router:

    Router1# configure terminal

    Router1(config)# no ip routing

    Router1(config)# ip routing

    Router1(config)# ip multicast-routing

    Router1(config)# router rip

    Router1(config-router)# version 2

    Router1(config-router)# network 10.0.0.0

    Router1(config-router)# exit

    After executing the above commands, you must configure the IP addresses of the interfaces of the routers and enable the multicast routing protocol PIM-DM on each interface. The following are sample commands useful for configurations:

    Router1(config)# interface Fa0/0

    Router1(config-if)# no shutdown

    Router1(config-if)# ip address 10.0.2.1 255.255.255.0

    Router1(config-if)# ip pim dense-mode

    Router1(config-if)# interfacef Fa0/1

    Router1(config-if)# no shutdown

    Router1(config-if)# ip address 10.0.1.1 255.255.255.0

    Router1(config-if)# ip pim dense-mode

    Router1(config-if)# interface Serial1/0

    Router1(config-if)# no shutdown

    Router1(config-if)# ip address 10.0.5.1 255.255.255.0

    Router1(config-if)# ip pim dense-mode

    Router1(config-if)# end

    Router1# clear ip route *

    Router1# clear  ip mroute *
Enabling PIM-SM
  • When using PIM-SM it is necessary to set a rendezvous point IP address. Also, you can configure PIM-SM so that it doesn't switch from an RPT (Rendezvous Point Tree) to an SPT (Shortest Path Tree). The following are sample comands for doing this:

    Router1# configure terminal

    Router1(config)# ip pim rp-address 10.0.3.2

    Router1(config)# ip pim spt-threshold infinity