PIM-SM (PIM Sparse Mode)

cisco-pim-sparse-mode-configuration-ipcisco

PIM-SM (PIM Sparse Mode) is another mode of Protocol Independent Multicast Protocol. The others modes of PIM are PIM-DM, Bidirectional PIM and PIM-SSM. In this lesson, we will learn What is PIM-SM and Why we use PIM-SM? After that we will focus on how to configure PIM-SM on Cisco routers.

 


 

What is PIM Sparse Mode?

PIM Sparse Mode (PIM-SM) is the PIM mode which uses Pull Model. According to this model, multicast traffic is sent only to the interested nodes. The multicast traffic is not flooded like PIM Dense Mode, but the clients that are interested in this multicast traffic are added to the Multicast Tree. In other words, no multicast traffic is sent unless it is requested.

 

PIM-SM uses Randevous-Point (RP) to coordinate the multicast traffic forwarding between the multicast source and the destination. Randevous-Point (RP) is a router that works as a meeting point of source and the receivers. Multicast sources register to Randevous-Point (RP) with their first-hop router and they send a copy of the multicast traffic to the receivers through Randevous-Point (RP).  On the other hand, multicast receivers join to the Shared Tree which is routed at Randevous-Point (RP), by their local DR.

 

PIM Sparse Mode uses two different Tree. These are:

  • Shared Tree
  • Source Tree

 

Shared Tree is the path from Randevous-Point to the multicast receiver. To build this Shared Tree, multicast receiver sends an IGMP Join message to the direct neighbor router. This router sends this message to the Randevous-Point (RP). Then a Shared Tree is built from receiver to the Randevous-Point (RP). It is showed as (*, G).

 

Source Tree is the path from multicast source to RP (Randevous-Point). To build this Source Tree, multicast source starts to send multicast traffic to the first neighbor. The neighbor router encapsulates this multicast packets into PIM Register message. Then it sends this message to the Randevous-Point. RP, decapsulates and checks the multicast group information in this message. After that, RP sends a Join message back to the source to build Source Tree.

 

Now, let’s show the operation of PIM Sparse Mode on a topology detailly.

 


 

How Does PIM-SM Works?

As you can see below, firstly, receiver sends a Join (*, G) Message to the Randevous-Point (RP) with the help of first router. This message means that, “I would like to receive traffic from this multicast group!”. Randevous-point receives this message and Shared Tree is created from Randevous-Point to the Receiver. This is the Shared Three join of the receiver.

 

How does the first router know where Randevous-Point is? It knows it through the configuration.  We should configure randevous-point location manually or with an auto protocol for the first router to know Randevous-Points location.

 

During Source Registration, there are a little more messaging. When, source firstly sends a packet, the first router connected to the source encapsulates this packet and sends a registration message (S, G) to the Randevous-point as unicast. This is the request to build a Source Tree between the router and the Randevous-point.

 

When randevous-point receives the PIM Registration Message, it checks that if are there anybody who is interested in this multicast traffic or not. If yes, it accepts the traffic. If not, it rejects this multicast traffic with PIM Register Stop message.

 

By the way, when the closes router to multicast source, receives PIM register stop message, it starts “Suppression Timer”.  The default value of this suppression timers is 60 seconds. When this timer almost expired, router sends another packet named “PIM Register Null”. But this time it is not encapsulated. And again, if are there no multicast receiver again, Randecous Point will send PIM Register Stop message again.

 

When Randevous-point receives this encapsulated message, it decapsulates the packet and forwards it to the Shared Three. Randevous-Point also sends a Join (S, G) message to the source network to create the brach of Shortest-Path Tree (SPT).

After Join (S, G) message and SPT built, multicast traffic flows from source to the randevous-point. Then, randevous-point sends a Register Stop message (S, G) to the first router connected to the source to stop the unicast register message. This process stops registration process.

 

Lastly, multicast traffic from the source flows down to the Randevous-Point over Source Tree and from Randevous-Point to the receiver over Shared Tree.

 

 

Sometimes, the first router that the deceiver connected has better path to the source. Instead of going through Randevous-Point it wants to use its better or shorter way. To do this it sends PIM Join Message through the source. And again, it sends PIM Prune Message towards Randevous Point (RP). This means that, I would like to use my SPT instead of your RPT.

 

This is basically PIM Sparse Mode Operation.

 

We have answered what is PIM-SM and how it works. Now it is time to learn PIM-SM Configuration and how to configure PIM-SM on Cisco Routers.

 


 

PIM-SM Configuration

In the previous lessons, we have learned how to configure PIM-DM. Now, we will learn PIM-SM Configuration on Cisco Routers. For this configuration, we will use the below configuration topology:

 

cisco-pim-sparse-mode-configuration-ipcisco

 


You can also check Cisco Packet Trafcer Configuration Examples Page.


 

IP Interface Configuration

Here, we will fistly configure IP addressing with the given IP address.

 

Router1(config)# interface fastEthernet 0/0

Router1(config-if)# ip address 10.0.0.1 255.255.255.0

Router1(config-if)# no shutdown

Router1(config-if)# interface fastEthernet 0/1

Router1(config-if)# ip address 20.0.0.1 255.255.255.0

Router1(config-if)# no shutdown

Router1(config-if)# exit

 

 

Router2(config)# interface fastEthernet 0/0

Router2(config-if)# ip address 10.0.0.2 255.255.255.0

Router2(config-if)# no shutdown

Router2(config-if)# interface fastEthernet 0/1

Router2(config-if)# ip address 30.0.0.1 255.255.255.0

Router2(config-if)# no shutdown

Router2(config-if)# interface loopback 0

Router2(config-if)# ip address 2.2.2.2 255.255.255.255

Router2(config-if)# exit

 

 

Router3(config)# interface fastEthernet 0/0

Router3(config-if)# ip address 20.0.0.2 255.255.255.0

Router3(config-if)# no shutdown

Router3(config-if)# interface fastEthernet 0/1

Router3(config-if)# ip address 30.0.0.2 255.255.255.0

Router3(config-if)# no shutdown

Router3(config-if)# exit

 


 

Routing Protocol Configuration

Here, we will configure routing protocol to provide layer 3 reachability. We will use Single Area OSPF here.

 

Router1(config)# router ospf 1

Router1(config-if)# network 10.0.0.0 0.0.0.255 area 0

Router1(config-if)# network 20.0.0.0 0.0.0.255 area 0

Router1(config-if)# end

 

Router2(config)# router ospf 1

Router2(config-if)# network 10.0.0.0 0.0.0.255 area 0

Router2(config-if)# network 30.0.0.0 0.0.0.255 area 0

Router2(config-if)# network 2.2.2.2 0.0.0.0 area 0

Router2(config-if)# end

 

Router3(config)# router ospf 1

Router3(config-if)# network 20.0.0.0 0.0.0.255 area 0

Router3(config-if)# network 30.0.0.0 0.0.0.255 area 0

Router3(config-if)# end

 


 

Enabling IP Multicast

In this step, we will configure ip multicast routing with “ip multicast-routing” command on all the routers.

 

Router1(config)# ip multicast-routing

 

Router2(config)# ip multicast-routing

 

Router3(config)# ip multicast-routing

 


 

Enabling PIM-SM on Interfaces

This is the step that we configure PIM Sparse mode exactly. We will use “ip pim sparse-mode” command on all the interfaces on the routers.

 

Router1(config)# interface fastEthernet 0/0

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

Router1(config-if)# interface fastEthernet 0/1

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

 

 

Router2(config)# interface fastEthernet 0/0

Router2(config-if)# ip pim sparse-mode

Router2(config-if)# interface fastEthernet 0/1

Router2(config-if)# ip pim sparse-mode

 

 

Router3(config)# interface fastEthernet 0/0

Router3(config-if)# ip pim sparse-mode

Router3(config-if)# interface fastEthernet 0/1

Router3(config-if)# ip pim sparse-mode

 


 

Enabling PIM-SM on Interfaces

In this multicast network, how does the receivers find the multicast source? They will find multicast source with the help of Randevous-Point (RP). So, we will configure randevous-point in this step. Here, we can sue two ways. One is manual way and the other is using an auto config protocol. In this lesson, we will use manual RP configuration.

 

Our Randevous-point will be Router 2. So, we will configure its loopback interface as Randevous-point address on both Router 2 and on other Routers.

 

Router1(config)# ip pim rp-address 2.2.2.2

 

Router2(config)# ip pim rp-address 2.2.2.2

 

Router3(config)# ip pim rp-address 2.2.2.2

 

cisco-pim-sm-configuration-ipcisco

 


 

PIM Sparse Mode Verification

After configuring PIM-SM on Cisco routers and setting randevous-point, now we can check our configuration. To do this, we will use “show ip mroute”, “show ip pim rp mapping”, “show ip igmp groups” and “mtrace” commands.

 

To see the full content of the IP Multicast Routing Table, we will use “show ip mroute” command.

 

 

To check Randevous-Point assignments by multicast group, mappings and the source of RP learning, we will use “show ip pim rp mapping”.

 

 

To verify that a source or receiver has joined the multicast group, we will use “show ip igmp groups” command.

 

We use mtrace command to check the multicast path from the source to the receiver. It is similar to tracert command on ip interfaces. We will use this command here to check if are there any down on our multicast path.

 

Back to: CCNP Enterprise 350-401 ENCOR v1.1 > Multicast Protocols

Leave a Reply

Your email address will not be published. Required fields are marked *

CCNP Enterprise 350-401 ENCOR v1.1

Collapse
Expand
Latest Blog Posts