PIM-DM Protocol Principle
PIM-DM Protocol Principle
Protocol Independent Multicast (PIM) use all unicast routing protocols, to provide routing
information for reverse with forwarding.The multicast routing is irrelevant with the unicast
routing protocols, if only the unicast routing protocol can generate corresponding routing
entries.Protocol Independent Multicast Dense Mode (PIMDM) is a dense mode multicast
routing protocol applicable to small-sized networks, in which multicast receivers locate
densely.
PIM-DM is based on the assumption that every subnet in the network has at least one
receiving node of the multicast source. In this case, multicast packets are flooded to all
nodes in the network, and thus related resources (bandwidth and router CPU) are
consumed.
To reduce the consumption of network resources, the dense mode multicast routing
protocol prunes the branches that do not need to forward multicast packets and only
keeps the branches that contain the receivers.
PIM-DM will sent graft message to restore forwarding of multicast packets on the pruned
branches when pruned branches need to forward multicast packets.
Periodical packet flooding and pruning is the feature of the dense mode multicast routing
protocol. Such protocol is applicable only to small-sized LANs.
The configuration of PIM-DM is very simple. You need to enable PIM-DM on the interfaces
of a router.
Before enabling PIM-DM on an interface, you must enable IP multicast routing in the
system-view of router.
The command used to enable IP multicast routing is multicast routing-enable.
In a PIM-DM network, a router sends Hello messages upon startup to discover neighbors
and maintains neighbor relation. Routers periodically send Hello messages, and thus a SPT
is established and maintained.
Using the pim timer hello interval command, you can set the Hello interval in the interface
view. The default Hello interval is 30 seconds.
Another function of the Hello message is electing the designated router (DR) in the
network segment containing multiple routers. The DR acts as the IGMPv1 querier. In the
IGMP course, we have mentioned that the IGMPv1 querier is elected by the DIM-DM
message.
PIM-DM compares the priority values and IP addresses contains in Hello messages to elect
the DR as the IGMPv1 querier.
When the DR is down, its neighbor cannot receive the Hello message from DR within the
timeout duration. Then its neighbors trigger the election of a new DR.
Using the pim hello-option holdtime interval command, you can set the Hello timeout
duration. The default timeout duration is 105 seconds.
PIM-DM is based on the assumption that all hosts in the network will receive the multicast
packet. When the multicast source (S) sends a multicast packet to a multicast group (G),
each router that receives the packet performs reverse path forwarding (RPF) check
according to the routing table.
•If the packet passes the RPF check, the router creates an (S, G) entry, and then forwards
the packet to all downstream PIM-DM nodes in the network. This process is called flooding.
•If the packet does not pass the RPF check, it indicates that the packet is received on a
wrong interface. The router discards this packet.
After this process, each router in the PIM-DM multicast domain creates an (S, G) entry.S
means IP address of multicast source.G means multicast IP address.
A router floods multicast packets regardless whether there is any exsiting downstream
multicast members so bandwidth is wasted. Prune mechanism of PIM-DM can avoid waste
of bandwidth.
If edge router does not contain any multicast receiver, the router sends the Prune message
to its upstream node. When the upstream node receives the Prune message, it updates its
multicast routing table .The pruning process lasts until the router whose branches need to
forward multicast packets. Thus a shortest path tree (SPT) with the multicast source S as
root is established.
A timeout mechanism is provided for the pruned nodes. After the timeout duration, the
flood-prune process starts again. The default prune timeout duration is 210 seconds.
The flood-prune process of PIM-DM occurs periodically.
The pruned downstream nodes restore to forwarding state when the prune timer expires.
The default prune timer is 210 seconds. That means a node must wait such a long time to
join the group. To shorten the waiting time, the node sends Graft message to notify the
upstream node when it needs to turn to forwarding state.
When a receiver in the network starts to receive multicast packets again, the Graft
message is transmitted to multicast source S hop by hop. When the intermediate nodes
receive the Graft message, they respond with acknowledgement messages.
In this way, the pruned branch resumes packet transmission.
A pruned path turns to a forwarding path, and thus a new SPT is established.
PIM-DM adopts the RPF check mechanism. This mechanism helps to establish a multicast
forwarding tree rooted from the source based on the existing unicast routing table,
multicast static routing table, MBGP routing table.
When receiving a multicast packet, a router checks whether the forwarding path of this
packet is correct. If the interface receiving this packet is the interface responsible for
sending the packet to the multicast source, as specified by the unicast routing table, the
router considers that the packet is transmitted through the correct path. Otherwise, the
router discards the packet.
As a basis for checking the correctness of the path, routing information can be generated
by any unicast routing protocol, for example, RIP and OSPF. The type of the routing
protocol is not limited.
The working process of PIM-DM consists of neighbor discovery, flooding, pruning, graft and Assert
mechanism. Neighbor discovery Multicast routers send Hello messages to discover neighbors and
maintain neighbor relation. Routers compare the priorities and IP addresses in Hello messages to
elect the DR in the network segment. The DR acts as the IGMPv1 querier.
Flooding
Multicast source S sends multicast packets to multicast group G. when a router receives a multicast
packet, it performs RPF check based on the unicast routing table. If the packet passes the RPF check,
the router creates an (S, G) entry, and then forward the packet to all downstream PIM-DM nodes in
the network. This process is flooding. If the packet does not pass the RPF check, the router discards
the packet.
Pruning
If no downstream node contains the multicast member, the router sends the Prune message to the
upstream node to request the upstream node stop for warding packets to this branch. After the
upstream node receives the Prune message, it deletes the corresponding interface from the interface
list mapping the (S, G) entry. The pruning process lasts until only the branches that need to forward
data remain. Thus a SPT with multicast source S as the root is established.
Graft
When a pruned node needs to turn to forwarding state, the node sends the Graft message to
request the upstream node to restore packet forwarding. Assert mechanism
The Assert mechanism is used to specify the forwarder in a shared network.
Using the display pim routing-table command, you can view the PIM multicast routing
table of a router.
After receiving a multicast packet, a router creates a (S, G) entry. The (S, G) entry lists
information about the nodes that this packet passes, namely the upstream node,
downstream node and the RPF neighbor relation. The RPF neighbor relation is used to
check whether the packet is received by the correct interface.
If the routing table of a router is empty, you need to check the configuration.
Using the display pim neighbor command, you can view the information about PIM
neighbors of a router.
In general, RTC has two neighbors: RTA (10.2.2.1) and RTB (172.16.1.1).
Using the display pim interface command, you can view the PIM information on an
interface, including whether the PIM protocol is enabled, the PIM mode and the IP address
of the DR.