# PIM-SSM (Source-Specific Multicast)

PIM-SSM (Source-Specific Multicast) requires a host to specify the source they wish to receive traffic from. The LHR joins a (S, G) tree rooted at the source specified in the Membership Report. For example, a host could join (1.1.1.1, 232.1.1.1). The LHR then builds an (S, G) for (1.1.1.1, 232.1.1.1) and sends PIM-Joins towards the source.



The (S, G) tree that is built as a result is no different from the tree that would result in PIM-SM after SPT switchover. The difference with PIM-SSM is that the source already knows which host they want to receive traffic from. Therefore, traffic doesn’t need to initially flow through the RP in order for the LHR to glean the source IP. The LHR will know the source IP before any traffic begins flowing.



How does a host already know which source it wishes to receive traffic from? The software is programmed to know this information. If the host does not know, there are some workarounds you can do using DNS or SSM-mapping, but we won’t get into that in this article.



In PIM-SSM, IGMPv3 must be used. IGMPv3 allows a receiver to specify the source IP and group when sending a Membership Report. IGMPv3 allows for backwards compatibility with IGMPv2 as well.



In PIM-SSM, the only major change compared to PIM-SM is the host signaling. Because the LHR has the source IP from the IGMP Membership Report, an RP is not needed. In fact, if you are only running PIM-SSM in your network, you can forgo configuring an RP altogether. This greatly simplifies PIM operations.



PIM-SSM uses the group range 232.0.0.0/8. This is configurable, but is typically left at the default range. You can run PIM-SM with PIM-SSM at the same time. In this case, only multicast groups in the range 232.0.0.0/8 must have a specified source. All other traffic will use the RP and use normal PIM-SM operations.



Let’s see how PIM-SSM is configured in the lab.



### Lab <a href="#id-00b57546-9aaf-472f-8c30-0eaeaa09b7ec" id="id-00b57546-9aaf-472f-8c30-0eaeaa09b7ec"></a>

We’ll use the same topology we have been using in the previous articles. First remove pim-bidir from all routers and configure R6 as the RP using BSR. R6 should be both the C-BSR and C-RP. Try to configure this on your own, and check the config below if you get stuck.

<figure><img src="https://1203572585-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgAMH3CMtmYTBkob03NUj%2Fuploads%2FsZ8oXEbLLzijVAwSTRbh%2FUntitled.png?alt=media&#x26;token=a1c23bfa-e5d3-4820-9d09-f038620e35c0" alt=""><figcaption></figcaption></figure>



```
#All routers
no ip pim bidir-enable
no ip pim rp-address 192.168.100.1 bidir

#R2
no ip pim bsr-candidate lo0 

#R6
ip pim bsr-candidate lo0
ip pim rp-candidate lo0

! If interfaces are still shutdown from the previous lab
int range gi1-3
 no shut
```



Test that your configuration is working by pinging 239.100.100.100 from Source1. Host4 should still be joined to this group.



We’ll now setup PIM-SSM in conjunction with the PIM-SM configuration we have already. To enable PIM-SSM we must do two things:

* Configure the PIM-SSM range using the command **ip pim ssm default**
  * If you want to use a range besides the default 232/8, you would specify this using **ip pim ssm range \<ACL>**
* Set host-facing interfaces to use IGMPv3 with **ip igmp version 3**
  * Just like PIM-SM, FHRs don’t need to run IGMP on interfaces facing a source



**ip pim sparse-mode** also needs to be configured on all interfaces, but this should be present already in your lab.

```
#All routers
ip pim ssm default

#R3, R4, R5
int Gi2
 ip igmp version 3
```



### IGMPv3

Currently we have IGMPv3 enabled on the querier (LHR) but IGMPv2 still enabled on all hosts. If we take a pcap, we can see that the LHR is now sending IGMPv3 general queries, and the hosts are responding with v2 membership reports.

<figure><img src="https://1203572585-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgAMH3CMtmYTBkob03NUj%2Fuploads%2F4DUivakQw496Xl5CnbbF%2FUntitled%201.png?alt=media&#x26;token=a8566037-dc97-4b15-89d9-1f72da0c4908" alt=""><figcaption></figcaption></figure>



The IGMPv3 type field is the same as in IGMPv2, allowing IGMPv2-only hosts to still work with an IGMPv3 querier.



Let’s configure Host4 to join the group 232.1.1.1 with source 10.10.10.10.

```
#Host4
int gi0/0
 ip igmp join-group 232.1.1.1 source 10.10.10.10
```



The source parameter is ignored and Host4 sends an IGMPv2 Join for \*, 232.1.1.1. This is because the interface is still running IGMPv2 (the default).

<figure><img src="https://1203572585-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgAMH3CMtmYTBkob03NUj%2Fuploads%2FhsUyAnb2Jw79n0iwBlvs%2FUntitled%202.png?alt=media&#x26;token=6db88aa4-fb05-4fc3-95a9-c2f088c8b1b7" alt=""><figcaption></figcaption></figure>



Let’s enable IGMPv3 on Gi0/0:

```
#Host4
int gi0/0
 ip igmp version 3
!
Host4(config-if)#do sho run int gi0/0 | in igmp
 ip igmp join-group 239.100.100.100
 ip igmp join-group 232.1.1.1 source 10.10.10.10
 ip igmp version 3
```



IGMPv3 allows a host to batch multiple Joins into a single Membership Report. In IGMPv2 these would have to be separate Membership Reports.

<figure><img src="https://1203572585-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgAMH3CMtmYTBkob03NUj%2Fuploads%2Fca1nMtPnbTP9kPVtPY5C%2FUntitled%203.png?alt=media&#x26;token=3ba6be47-a65d-4309-9918-2f7644a4f0c7" alt=""><figcaption></figcaption></figure>



IGMPv3 allows ASM (any source multicast) to function by using a record type trick. Here the record type is “Exclude” but there are zero sources. This effectively “excludes nothing” and therefore “allows any source.” It’s a bit confusing at first, but it is an interesting way that IGMPv3 allows IGMPv2 Joins/Leaves to interwork with IGMPv3 SSM Joins/Leaves. Notice that the Join for 10.10.10.10, 232.1.1.1 is “Include” mode with the single source address, which is a bit more intuitive.



### Traffic Flow

R5, the LHR, creates state for both (\*, 239.1.1.1) and (10.10.10.10, 232.1.1.1). These are created in response to the IGMPv3 Membership Report sent by Host4.

```
R5#show ip mroute

(*, 239.100.100.100), 00:37:02/00:02:54, RP 6.6.6.6, flags: SJC
  Incoming interface: GigabitEthernet3, RPF nbr 10.4.5.4
  Outgoing interface list:
    GigabitEthernet2, Forward/Sparse, 00:37:02/00:02:54

(10.10.10.10, 232.1.1.1), 00:04:59/00:02:54, flags: sTI
  Incoming interface: GigabitEthernet1, RPF nbr 10.1.5.1
  Outgoing interface list:
    GigabitEthernet2, Forward/Sparse, 00:04:59/00:02:54
```



Can you guess what the state looks like on the RP? What about on R1?

```
R6#show ip mroute
(*, 239.1.1.1), 00:37:24/00:02:37, RP 6.6.6.6, flags: S
  Incoming interface: Null, RPF nbr 0.0.0.0
  Outgoing interface list:
    GigabitEthernet3, Forward/Sparse, 00:37:24/00:02:34
    GigabitEthernet2, Forward/Sparse, 00:37:24/00:02:37

R1#show ip mroute
(10.10.10.10, 232.1.1.1), 00:06:43/00:02:40, flags: sT
  Incoming interface: GigabitEthernet1, RPF nbr 0.0.0.0
  Outgoing interface list:
    GigabitEthernet3, Forward/Sparse, 00:06:43/00:02:40
```



The RP only has state for the ASM group 239.1.1.1. It is not on the shortest path to the SSM group. R1 only has state for the SSM entry. Notice the lowercase **s** flag indicating SSM. The (S, G) tree is built all the way from the LHR to the FHR even before the first multicast packet is sent.



If Source1 begins sending to 232.1.1.1, Host4 should reply.

```
Source#ping 232.1.1.1 repeat 3
Type escape sequence to abort.
Sending 3, 100-byte ICMP Echos to 232.1.1.1, timeout is 2 seconds:

Reply to request 0 from 10.10.200.10, 3 ms
Reply to request 1 from 10.10.200.10, 9 ms
Reply to request 2 from 10.10.200.10, 3 ms
```



What will happen if Source2 pings 232.1.1.1?

```
Source2#ping 232.1.1.1 repeat 3
Type escape sequence to abort.
Sending 3, 100-byte ICMP Echos to 232.1.1.1, timeout is 2 seconds:
...
```



As you can see, the traffic does not work. In PIM-SSM, each (source, group) entry is a unique flow. In an IP TV deployment, each TV channel could have a separate source IP, but the same multicast group. (S1, G) could be one channel, and (S2, G) could be another channel, where G is a single group address. Because each flow is uniquely identified by the source IP and group together, this allows you to re-use the same multicast IP.



On Host4, we’ll leave both the ASM 239.100.100.100 group and SSM (10.10.10.10, 232.1.1.1) group to examine the IGMPv3 Leave message.

```
#Host4
int Gi0/0
 no ip igmp join-group 239.100.100.100
 no ip igmp join-group 232.1.1.1 source 10.10.10.10
```



The IGMPv3 Leave for an ASM group involves a mode change to “Include” mode. The inclusion is zero sources though, so it is saying “include nothing.” This can be a little tricky the first time you see it.

<figure><img src="https://1203572585-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgAMH3CMtmYTBkob03NUj%2Fuploads%2Fz35T9RDJlz8vsl9wr4oi%2FUntitled%204.png?alt=media&#x26;token=35963eca-d4a3-4c09-863d-f24818e3dedb" alt=""><figcaption></figcaption></figure>



The IGMPv3 Leave for the SSM entry says to “block old sources.” 10.10.10.10 was the only source, so the LHR will remove the entry in response to this message:

<figure><img src="https://1203572585-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgAMH3CMtmYTBkob03NUj%2Fuploads%2FIubUd4VeNA3r6vZqP1Uw%2FUntitled%205.png?alt=media&#x26;token=dc22cdec-02ae-4600-a580-103e5cda51ed" alt=""><figcaption></figcaption></figure>



### Conclusion <a href="#id-00de6c83-93e7-48a3-acbc-3ae20702957c" id="id-00de6c83-93e7-48a3-acbc-3ae20702957c"></a>

You could say that PIM-SSM uses a subset of PIM-SM in addition to IGMPv3 between the receiver and LHR. IGMPv3 adds the ability for a host to specify the source it wishes to receive multicast traffic from. The LHR then can build a (S, G) SPT rooted at the source that the host specified in the IGMPv3 Membership Report.



In PIM-SM, the network must take on the responsibility of source discovery. A FHR must register the source with the RP, and the RP must pull in the traffic by creating a (S, G) SPT rooted at the source. In PIM-SSM, the host takes on the responsibility of providing the source information, relieving the network of this task. In PIM-SSM, the RP is not needed.



This concludes the series of articles on intradomain multicast. The following articles will touch upon interdomain multicast and multicast VPN services.
