PIM-SM Protocol Principle

Download as pdf or txt
Download as pdf or txt
You are on page 1of 29

PIM-SM Protocol Principle P-0

Confidential Information of Huawei. No Spreading Without Permission


PIM-SM Protocol Principle P-1

Confidential Information of Huawei. No Spreading Without Permission


PIM-SM Protocol Principle P-2

Confidential Information of Huawei. No Spreading Without Permission


PIM-SM Protocol Principle P-3

Confidential Information of Huawei. No Spreading Without Permission


PIM-SM Protocol Principle P-4

 PIM-SM is based on the assumption that the multicast members locate sparsely.
 That is, near no network segment has multicast group members. Multicast route is
established only when a host in a network segment joins the multicast group. At this time,
the upstream node begins to forward multicast packets to this network segment.
 The goal of the PIM-SM model is to establish and maintain a unidirectional shared tree.
 A router in the PIM network is selected as the public root node of the shared tree.
 The public root node is called the rendezvous point (RP). The RP forwards multicast packets
to receivers along the shared tree.
 At the receiver's side, the router connected to the receiver sends the Join message to the
RP of the multicast group. The Join message is forwarded hop by hop and reaches the root
(RP). The path that the Join message passes by becomes a branch of the shared tree,
namely, the rendezvous point tree (RPT).
 When the sender needs to send multicast data to a multicast group, the first-hop router
sends Register message to the RP. The Register message reaches the RP and triggers
establishment of the RPT. The multicast source then sends the multicast packet to the RP.
The multicast packet is duplicated on the RP and forwarded to the receivers along the RPT.

Confidential Information of Huawei. No Spreading Without Permission


PIM-SM Protocol Principle P-5

 PIM-SM uses two types of trees: the shared tree and source path tree.
 The path from the RP to the multicast receiver is the shared tree.
 The path from the multicast source to the RP is the source path tree.
 RPF check is performed according to the type of the tree.
 On the shared tree, the RP address is used as the source address for RPF check.
 On the source path tree, the address of the multicast source is used as thesource address
for RPF check.
 The RPF check process will be described in Chapter 2 PIM-SM Protocol Mechanism.

Confidential Information of Huawei. No Spreading Without Permission


PIM-SM Protocol Principle P-6

 The basic configuration of PIM-SM is similar to the configuration of PIM-DM. for


 PIM-SM, you also need to enable the multicast routing protocol, and then enable
 PIM-SM on the interfaces of the router.
 After the brief introduction of the PIM-SM principle, you have known that RP is an
important role in the PIM-SM network. As the root of RPT, the RP forwards multicast
packets and controls join of multicast groups.
 The RP can be discovered in various ways. Discovery and election of the RP will be
described in Chapter 2. Here we manually specify RTB (172.16.1.1) as the RP to show the
configuration of PIM-SM.
 PIM-SM configuration involves the following steps:
 1. Globally enable the multicast routing protocol.
 2. Enable PIM-SM on the interfaces.
 3. Specify the address of RP.
 Note: If the RP is manually specified, the RP address must be configured on each router.
The procedure is as follows:
 Enter the PIM view.
 [RTC] pim
 Specify 172.16.1.1 as the RP address.
 [RTC-pim] static-rp 172.16.1.1

Confidential Information of Huawei. No Spreading Without Permission


PIM-SM Protocol Principle P-7

 Using the display pim neighbor command, you can view the information about PIM-SM
neighbors of the router. After the configuration, RTC has two PIMneighbors: RTA and RTB.

Confidential Information of Huawei. No Spreading Without Permission


PIM-SM Protocol Principle P-8

 View the information about the RP in the PIM-SM network.


 In this example, the RP is manually specified. The "Static" field before "RP" in the display
information indicates that the RP is manually specified.

Confidential Information of Huawei. No Spreading Without Permission


PIM-SM Protocol Principle P-9

 Using the display pim interface command, you can view the information about a PIM
interface. The display information includes whether PIM is enabled, PIM version, PIM mode,
PIM query interval and IP address of the DR.

Confidential Information of Huawei. No Spreading Without Permission


PIM-SM Protocol Principle P-10

 Using the display pim routing-table command on RTB, you can see two entries:
 an (S, G) entry and a (*, G) entry. It indicates that RTB has received the multicast packet
and can forward the packet.
 As you know, the (S, G) entry is recorded in the routing table. S indicates the multicast
source and G indicates the multicast group. The routers on the source path tree (SPT) from
the multicast source to RP create such entries.
 (*, G) is the entry for only PIM-SM. This entry is the entry of (any multicast source, multicast
group). The routers on the RPT create such entry.

Confidential Information of Huawei. No Spreading Without Permission


PIM-SM Protocol Principle P-11

Confidential Information of Huawei. No Spreading Without Permission


PIM-SM Protocol Principle P-12

 In a PIM-SM network, a router needs to send Hello messages to discover its neighbors
upon startup. Routers periodically send Hello messages to maintain the neighbor relation.
Another function of the Hello message is electing the DR in a network segment containing
multiple routers. The DR acts as the IGMPv1 querier.

Confidential Information of Huawei. No Spreading Without Permission


PIM-SM Protocol Principle P-13

 PIM-SM also elects the DR in a shared network (such as Ethernet). The DR is the only
multicast packet forwarder in the network segment.
 In PIM-SM, all shared networks must have a DR, no matter whether the network is
connected to the multicast source or the receiver.
 The DR at the receiver end sends the Join message to the RP.
 The DR at the multicast source side sends the Register message to the RP.
 Routers on the shared network send Hello messages (containing the DR priority option) to
each other. The router with the highest DR priority is elected as the DR in the network
segment.
 If some routers have the same priority or at least one router in the network cannot adds
the priority option in the Hello message, the router with the largest IP address is elected as
the DR.
 When the DR is Down, it cannot respond to the Hello message sent by other router within
the timeout duration. The neighbor routers then trigger the election of a new DR.
 Using the pim timer hello interval command, you can set the interval of Hello messages in
the interface view. By default, the Hello interval is 30 seconds.
 Using the pim hello-option holdtime interval command, you can change the value of the
Hello timeout duration. By default, the Hello timeout duration is 105 seconds.

Confidential Information of Huawei. No Spreading Without Permission


PIM-SM Protocol Principle P-14

 In a PIM-SM network, the node acts as the root of the shared tree is called the rendezvous
point (RP).
 The RP has the following functions:
 1. Forwards all multicast flows through the shared tree to receivers.
 2. Forwards multicast packets of some or all multicast groups. A network can have one or
more RPs.
 The RP can be discovered in any of the following ways:
 1. Manually specify the IP address of the RP on the DR, all leaf routers, and all routers that
forward multicast flows.
 Use the static-rp rp-address command to specify the IP address of the RP.
 2. Enable the BootStrap protocol to elect the RP through the bootstrap mechanism.
 The RP is the core router in the PIM-SM domain. Is a simple small-sized network, one RP is
enough for packet forwarding, because the amount of multicast data is small. In this case,
you can manually specify the RP on all routers in the SM domain. But in most cases, the
PIM-SM network is very large and large amount of multicast packets forwarded by the RP.
In such a network, each multicast group needs an RP, thus the load on each RP is reduced
and the topology of the shared tree is optimized. In such network, RPs are elected through
the bootstrap mechanism. In this case, you need to configure the bootstrap router (BSR).

Confidential Information of Huawei. No Spreading Without Permission


PIM-SM Protocol Principle P-15

 The RP can be specified manually or elected through the bootstrap mechanism.


 In the latter case, you need to enable the BootStrap protocol.
 In a PIM-SM domain, all candidate RPs (C-RPs) take part in the RP election.

Confidential Information of Huawei. No Spreading Without Permission


PIM-SM Protocol Principle P-16

 The BSR is the management core in the PIM-SM network. The BSR collects the
Advertisement messages sent by C-RPs, and then selects the C-RP information for each
multicast group to form an RP set (a database of mapping between multicast groups and
RPs). The BSR advertises the RP set to the entire network so that all routers (including the
DR) obtain the location of RPs.
 A PIM-SM domain can also have multiple C-RPs. The RP for each multicast group is elected
through the BSR mechanism. In a network (or management domain ), only one router is
elected as the BSR, but multiple candidate BSRs (C-BSRs) can be configured. Once the BSR
is Down, a new BSR is elected through the bootstrap mechanism. Thus, the service is not
interrupted by fault of the BSR.

Confidential Information of Huawei. No Spreading Without Permission


PIM-SM Protocol Principle P-17

 The working mechanism of a BSR is as follows:


 1. Qualified routers are configured as C-BSRs. Each C-BSR has a priority. When a router is
elected as the C-BSR, it starts a timer (300 seconds by default) to snoop the BootStrap
messages in the network. A BootStrap message contains the priority and the IP address of
the C-BSR.
 2. When a C-BSR receives a BootStrap message, it compares its own priority with the
priority in the message. If the priority in the message is higher, the CBSR resets the timer
and continue to snoop BootStrap messages. If the priority of the C-BSR is higher, the C-
BSR sends a BootStrap message to announce that it is the BSR. If the priorities are equal,
the C-BSR compares its IP address with the IP address contained in the message. The
router with the larger address becomes the BSR.
 The destination address of the BootStrap message is 224.0.0.13 and all PIM routers can
receive this packet. The TTL of this packet is set to 1, but each PIM router floods this
packet from all its PIM-enabled interfaces. Thus, all PIM routers can receive the BootStrap
message.

Confidential Information of Huawei. No Spreading Without Permission


PIM-SM Protocol Principle P-18

 1. The candidate RP(C-RP) sends the Advertisement message to the BSR.


 When receiving the BootStrap message (BSR message), the C-RP can locate the BSR in the
network. The C-RP then sends the Candidate-RP-Advertisement message to notify the BSR
of the multicast groups it serves in unicast mode. Thus, the BSR collects the information
about all C-RPs in the network and establishes an RP set. Then the BSR sends BSR
messages to all routers in the network. The C-RP periodically sends Advertisement
messages (every 60 seconds) in unicast mode.
 2. The BSR periodically sends BSR messages (every 60 seconds) to all PIM routers
(224.0.0.13).
 The BSR message contains the RP-set and BSR address. The message is flooded to the
entire network hop by hop.
 3. All routers elect the RP according to the received RP set through the same RP election
algorithm. Therefore, the routers elect the same RP. If the RP is specified manually, instead
of being elected from C-RPs, each router should be configured with the C-RP address,
priority, and the multicast group it serves.

Confidential Information of Huawei. No Spreading Without Permission


PIM-SM Protocol Principle P-19

 When a receiver host joins multicast group G, the host sends an IGMP packet to notify the
leaf router connected to it. The leaf router obtains the information about this receiver, and
then sends a Join message to the upstream node toward the RP.
 Each router on the path from the leaf router to the RP generates a (*, G) entry in the
forwarding table. These routers form a branch of the rendezvous point tree (RPT). (*, G)
indicates that packets from any multicast source are sent to G. RP is the root of the RPT
and the receivers are leaves of the RPT.
 After the packet sent from multicast source S to multicast group G reaches RP, the packet
will reach the leaf router and then the receiver host. If the receiver host does not want to
receive the information from this source, the nearest multicast router sends the Prune
message to the RP in the converse direction . When the first upstream router receives the
Prune message, the router deletes the interface, which connects to the downstream router,
from the interface list of multicast router.
 The router check that other existing interface need to forward packets or not. If no need
such receivers exist, the router sends the Prune message to its upstream router.This
process is the same as the pruning process of PIM-DM.

Confidential Information of Huawei. No Spreading Without Permission


PIM-SM Protocol Principle P-20

 When multicast source S sends a multicast packet to multicast group G, the router directly
connected to multicast source S encapsulates the multicast packet into the Register packet.
Then the router sends the packet to the corresponding RP in unicast mode to notify the RP
of the multicast source.
 When receiving the Register message from multicast source S, the RP decapsulates the
message, and then forwards the message to the receiver along the RPT. In addition, the RP
sends the Join message in the converse direction to multicast source S. The Join message
contains the (S, G) entry, and thus all routers on the path between the RP and the
multicast source generates an (S, G) entry. These routers that the Join message passes form
a branch of the SPT. The multicast source is the root of the SPT, and the RP is the
destination of the SPT.

Confidential Information of Huawei. No Spreading Without Permission


PIM-SM Protocol Principle P-21

 A multicast packet sent by multicast source S reaches the RP along the established SPT.
The RP then forwards the packet along the RPT to receivers. After the RP receives the
multicast flow forwarded along the SPT, the RP sends the Register-stop message to the
router directly connected to the multicast source. The multicast source registration process
is complete.

Confidential Information of Huawei. No Spreading Without Permission


PIM-SM Protocol Principle P-22

 After the multicast source registers to the RP successfully, multicast packets is sent to the
RP along the SPT and then forwarded by the RP to the receivers along the RPT.

Confidential Information of Huawei. No Spreading Without Permission


PIM-SM Protocol Principle P-23

 For a specified source, PIM-SM sets the bandwidth threshold for the SPT. Thus the last-hop
router (the DR closest to the receiver) can switch from the RPT to the SPT. When the last-
hop router detects that multicast packets sent from the RP to multicast group G exceeds
the threshold, the router sends a Join message with the (S, G) entry to the next-hop router
toward multicast group G according to the unicast routing table. The Join message reaches
the first-hop router (the DR closest to the multicast source) after passing the routers on the
path. All these routers create an (S, G) entry, and thus an SPT branch is established.
 When the throughput of packets exceeds the preset value, PIM-SM switches the router
from the RPT to the SPT. On the VRP, by default, the router directly connected to the
receiver joins the SPT immediately after it detects the multicast source; that is, the router
receives the first data packet from the source.

Confidential Information of Huawei. No Spreading Without Permission


PIM-SM Protocol Principle P-24

 The RPT switches to the SPT, multicast packets are sent from the multicast source directly
to the receiver. Through switchover between the RPT and the SPT, PIM-SM can establish
the SPT in a more economical way than PIM-DM does.

Confidential Information of Huawei. No Spreading Without Permission


PIM-SM Protocol Principle P-25

 The last-hop router sends the Prune message to the RP. The Prune message contains the
RP information and reaches the RP hop by hop. After receiving the Prune message, the RP
forwards the Prune message in the converse direction. Thus, the multicast flow is switched
from the RPT to the SPT.

Confidential Information of Huawei. No Spreading Without Permission


PIM-SM Protocol Principle P-26

 After switchover, an SPT is established between the multicast source and the receiver.

Confidential Information of Huawei. No Spreading Without Permission


PIM-SM Protocol Principle P-27

 Neighbor discovery
 In a PIM-SM network, multicast routers send Hello messages to discover neighbors, maintain the neighbor
relation, and negotiate protocol parameters.
 Routers in the same network segment compare the priorities and IP addresses in Hello messages to elect the
DR. The DR acts as the IGMPv1 querier.
 Assert
 Routers in a shared network (such as an Ethernet) elects the designated forwarder.
 DR election
 Routers elects the designated router (DR) for the shared network between the multicast source and receivers.
 RP discovery
 The RP is specified manually or elected through the BSR messages.
 Join
 When a receiver host joins a multicast group G. The host send an IGMP packet to notify the leaf router directly
connected to it. The leaf router then sends the Join message to the upstream node toward the RP.
 Prune
 The pruning process is initiated by the leaf router. When all downstream members leave the multicast group,
the leaf router sends a Prune message to the upstream node to request the upstream node stop forwarding
packets to this branch.
 Register
 The Register messages notify the RP of the existence of the multicast source.
 RTP-SPT switchover
 PIM-SM sets a bandwidth threshold for the SPT. When the traffic exceeds this threshold, the last-hop router
(the DR at the receiver side) switches from the RPT to the SPT.

Confidential Information of Huawei. No Spreading Without Permission


PIM-SM Protocol Principle P-28

Confidential Information of Huawei. No Spreading Without Permission

You might also like