# PIM-SSM Static Mapping

Load **multicast.init.cfg**

```
#IOS-XE
config replace flash:multicast.init.cfg
 
#IOS-XR
configure
load bootflash:multicast.init.cfg
commit replace
y
```



Configure R2 and R4 to join (\*, 239.1.1.1). These hosts are only IGMPv2-capable.



Use SSM mapping on the LHRs to translate these to (7.1.7.1, 239.1.1.1) Joins.



The multicast network is already fully setup using PIM-SSM. You must change the SSM range to use 239.1.1.1/32 for this task.















































## Answer <a href="#id-1e10ad4c-8789-4294-9948-f2ecab14d8e1" id="id-1e10ad4c-8789-4294-9948-f2ecab14d8e1"></a>

```
#R5-R10
ip pim ssm range SSM
ip access-list standard SSM
 10 permit 239.1.1.1
!
ipv6 access-list SSM_V6
 permit ipv6 host ff08::1 any

#XRv1-XRv4
ipv4 access-list SSM
 10 permit ipv4 host 239.1.1.1 any
!
ipv6 access-list SSM_V6
 10 permit ipv6 host ff08::1 any
!
router pim
 address-family ipv4
  ssm range SSM
 address-family ipv6
  ssm range SSM_V6

#R5
ip igmp ssm-map enable 
!
ip access-l standard CH1
 permit 239.1.1.1
!
ip igmp ssm-map static CH1 7.1.7.1

#XRv3
ipv4 access-list CH1
 permit host 239.1.1.1
!
router igmp
 ssm map static 7.1.7.1 CH1 

#R2
! If you want the router to respond to ICMP for testing, we must enable PIM
ip multicast-routing distributed
ipv6 multicast-routing
!
! Additionally, an RP address must be configured so that the "host" has a valid RPF
! interface for the received multicast traffic.
ip pim rp-address 9.2.5.5  
!
int gi2.525
 ip pim sparse-mode
 ip igmp join-group 239.1.1.1

#R4
! If you want the router to respond to ICMP for testing, we must enable PIM
ip multicast-routing distributed
ipv6 multicast-routing
!
! Additionally, an RP address must be configured so that the "host" has a valid RPF
! interface for the received multicast traffic.
ip pim rp-address 11.4.13.13
!
int GigabitEthernet2.543
 ip pim sparse-mode
 ip igmp join-group 239.1.1.1
```



## Explanation <a href="#aeef43ad-22e1-4658-b20a-20df0740834f" id="aeef43ad-22e1-4658-b20a-20df0740834f"></a>

This lab consists of two tasks: changing the SSM range, and using static SSM mapping.



First, to change the SSM range, we must reference an ACL that consists of the group ranges we want to treat as SSM. This must be statically configured on all routers in the network. Note that if you want to include 232/8 as part of this, you must also specify it as an entry in the ACL. In our case, we only care about treating 239.1.1.1/32 as SSM.

```
#IOS-XE
ip pim ssm range SSM
!
ip access-list standard SSM
 10 permit 239.1.1.1

#IOS-XR
ipv4 access-list SSM
 10 permit ipv4 host 239.1.1.1 any
!
router pim
 address-family ipv4
  ssm range SSM
```



We can confirm the SSM range on IOS-XR using the following command:

<div align="left"><figure><img src="https://3072390383-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkUz2C3GqnZcWhoVL6jfk%2Fuploads%2F16Ho69h5TB3uDTUB8a0Z%2Fimage.png?alt=media&#x26;token=fcbf9e68-2ba8-4a0e-920c-0cdf2da1d208" alt=""><figcaption></figcaption></figure></div>



Next, we configure SSM mapping. This is a feature that allows us to match a IGMPv2/MLDv1 (\*, G) Join from a host and translate it into a (S, G) IGMPv3/MLDv2 Join. To do so, we enable IGMPv3/MLDv2 on the LHR interface as usual, but we also configure separate static mapping entries, mapping the (\*, G) to the (S, G).

```
#R5
ip igmp ssm-map enable 
!
ip access-l standard CH1
 permit 239.1.1.1
!
ip igmp ssm-map static CH1 7.1.7.1

#XRv3
ipv4 access-list CH1
 permit host 239.1.1.1
!
router igmp
 ssm map static 7.1.7.1 CH1 
```



We can confirm the SSM mapping configuration using the following command:

<div align="left"><figure><img src="https://3072390383-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkUz2C3GqnZcWhoVL6jfk%2Fuploads%2F5Ta8NDelKlwnHZFS3DC7%2Fimage.png?alt=media&#x26;token=5aa77170-a4c6-4f3e-a655-8c0fd0485307" alt=""><figcaption></figcaption></figure></div>

<div align="left"><figure><img src="https://3072390383-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkUz2C3GqnZcWhoVL6jfk%2Fuploads%2FirKvkhBdM7KPcUbVgntH%2Fimage.png?alt=media&#x26;token=5178552a-b76d-439a-9192-4cc044474916" alt=""><figcaption></figcaption></figure></div>



We can confirm that the LHRs have successfully translated these into IGMPv3 (S, G) Joins:

<div align="left"><figure><img src="https://3072390383-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkUz2C3GqnZcWhoVL6jfk%2Fuploads%2FHNJTjXUpiVx4ROEm39Av%2Fimage.png?alt=media&#x26;token=3e415583-2b95-47f4-939c-7ca25a873340" alt=""><figcaption></figcaption></figure></div>

<div align="left"><figure><img src="https://3072390383-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkUz2C3GqnZcWhoVL6jfk%2Fuploads%2FLXZCurAsJcwIRWN5bp2a%2Fimage.png?alt=media&#x26;token=af362724-9be8-416e-a7a2-56de87d75ab8" alt=""><figcaption></figcaption></figure></div>



To “trick” R2 and R4 into replying to the ICMP Echo Request, we must make their (\*, G) entry have a valid RPF interface. This can be done by manually specifying the RP address.

```
#R2
ip pim rp-address 9.2.5.5  

#R4
ip pim rp-address 11.4.13.13
```



The (S, G) tree is built as we saw in the last lab. Both R2 and R4 respond to the multicast ping.

<div align="left"><figure><img src="https://3072390383-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkUz2C3GqnZcWhoVL6jfk%2Fuploads%2FoPUlZhA8ZKPrYh62h0Ys%2Fimage.png?alt=media&#x26;token=ec5256c3-5a3d-4c4f-9a59-20d5cbc5d6f3" alt=""><figcaption></figcaption></figure></div>



### Mapping to multiple sources <a href="#id-55286179-d4bd-4b09-9a55-c12b8df83c7f" id="id-55286179-d4bd-4b09-9a55-c12b8df83c7f"></a>

You can map a (\*, G) to multiple (S, G) entries by specifying multiple sources for a given ACL:

```
#R5
ip igmp ssm-map static CH1 7.1.7.1
ip igmp ssm-map static CH1 8.3.8.3
```

<div align="left"><figure><img src="https://3072390383-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkUz2C3GqnZcWhoVL6jfk%2Fuploads%2FIxVb0aQHBJQTZ85GfKVq%2Fimage.png?alt=media&#x26;token=1210a1b2-d24e-4a2f-b905-92f6b5a6d3c1" alt=""><figcaption></figcaption></figure></div>



### A note on IPv6 SSM Mapping <a href="#id-76b4ea3c-352b-49e9-b7aa-b69045e2682a" id="id-76b4ea3c-352b-49e9-b7aa-b69045e2682a"></a>

Both IOS-XE and IOS-XR support SSM mapping using the same commands, except prefaced with **ipv6 mld** on IOS-XE and under **router mld** on IOS-XR:

```
#IOS-XE
ipv6 mld ssm-map enable
ipv6 mld ssm-map static <IPv6-ACL> <source addr>

#IOS-XR
router mld
 ssm map static <source addr> <IPv6-ACL>
```



However, to successfully test this, we would need the hosts to send a (\*, G) MLD Report for a SSM-mapped prefix. IOS-XE does not let us change the IPv6 SSM mapping range, so there is no way to accomplish this.

```
R2(config)#int gi2.525
R2(config-subif)# ipv6 mld join-group FF38::1
%Exclude mode join on GigabitEthernet2.525 ignored for SSM group FF38::1
```



IOS-XR does allow us to change the SSM range:

```
#IOS-XR
router pim
 add ipv6
  ssm range <IPv6-ACL> 
```



This allows us to use XRv3 as a client for testing.

```
#XRv3
ipv6 access-list SSM_V6
 10 permit ipv6 host ff08::1 any
!
router pim
 address-family ipv6
  ssm range SSM_V6
```



We can confirm the SSM range has been changed on XRv3:

<div align="left"><figure><img src="https://3072390383-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkUz2C3GqnZcWhoVL6jfk%2Fuploads%2F8UQKoOjczUe4BuMYXkTb%2Fimage.png?alt=media&#x26;token=6a786aae-a120-42ca-a2c2-23a4d3c199fd" alt=""><figcaption></figcaption></figure></div>



We’ll now send a (\*, G) Join from XRv3 for a SSM-default range group:

```
#XRv3
router mld
 interface GigabitEthernet0/0/0/0.593
  join-group ff38::1
```



R9 ignores this because it is an ASM Join for a group in the SSM range.

<div align="left"><figure><img src="https://3072390383-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkUz2C3GqnZcWhoVL6jfk%2Fuploads%2FfsZlcY3JUkXb6Ehz2Ejv%2Fimage.png?alt=media&#x26;token=c26687ef-82dc-48f1-899e-7fb560864659" alt=""><figcaption></figcaption></figure></div>



We’ll now do SSM static mapping on R9:

```
#R9
ipv6 mld ssm-map enable
ipv6 mld ssm-map static SSM_V6_MAP 2007:7:1:7::1
ipv6 access-list SSM_V6_MAP
 sequence 10 permit ipv6 any host FF38::1
!
! We also disable DNS query for SSM mapping
!
no ipv6 mld ssm-map query dns
```



R9 now has a static MLDv2 mapping:

<div align="left"><figure><img src="https://3072390383-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkUz2C3GqnZcWhoVL6jfk%2Fuploads%2FCdG1p0MzzjC8BKpcp5uB%2Fimage.png?alt=media&#x26;token=5edeba51-5c2d-4e77-9203-9b1b3b043fbf" alt=""><figcaption></figcaption></figure></div>



R9 converts the (\*, G) MLD report to a (S, G):

<div align="left"><figure><img src="https://3072390383-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkUz2C3GqnZcWhoVL6jfk%2Fuploads%2FnyOWDYxE1JPZdldbZUQg%2Fimage.png?alt=media&#x26;token=1449aa4a-6429-4f03-bbe4-75c0288e7ba5" alt=""><figcaption></figcaption></figure></div>

<div align="left"><figure><img src="https://3072390383-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkUz2C3GqnZcWhoVL6jfk%2Fuploads%2F3Mj8x5wZVAD8O2uk4fxB%2Fimage.png?alt=media&#x26;token=cba9057f-f890-432d-a741-8351dbf0446a" alt=""><figcaption></figcaption></figure></div>



### DNS Resolution for Mapping <a href="#id-9b8daa5d-b567-42e3-9d88-e8524758b356" id="id-9b8daa5d-b567-42e3-9d88-e8524758b356"></a>

Using static mapping is not a very scalable solution. Instead, it is preferred to use DNS for mapping. The router uses its locally defined DNS resolvers to resolve _mcast-group.in-addr.arp&#x61;**.**_ The DNS server returns the source IP address as the DNS response. Optionally, you can configure a different domain using the following command. Note that DNS lookups for SSM mapping is on by default.

```
#IOS-XE
ip domain multicast ssm-map.mydomain.com
```
