Regular multicast is known as Any Source Multicast (ASM). It is based on a many to many
model where the source can be anyone and only the group is known. For some applications
like stock trading exchange this is a good choice but for IPTV usage it makes more
sense to use SSM as it will scale better when there is no need for a RP.
ASM builds a shared tree (RPT) from the receiver to the RP and a
Shortest Path Tree (SPT) from the sender to the RP. Everything must pass through the RP
until switching over to the SPT building a tree directly from receiver to sender.
The RPT uses a (*,G) entry and the SPT uses a (S,G) entry in the MRIB.
SSM uses no RP, instead it uses IGMP version 3 to signal what channel (source) it wants
to join for a group. IGMPv3 can use INCLUDE messages that specify that only these
sources are allowed or they can use EXCLUDE to allow all sources except for these ones.
SSM has the IP range 184.108.40.206/8 allocated and it is the default range in IOS but we can
also use SSM for other IP ranges. If we do we need to specify that with an ACL.
SSM can be enabled on all routers that should work in SSM mode but it is only
really needed on the routers that have receivers connected since that is the place
where the behavior is really changed. Instead of sending a (*,G) join to the RP
the Last Hop Router (LHR) sends a (S,G) join directly to the source.
This is the topology we are using.
It is really simple. R1 is acting as a multicast source and R2 will both simulate a client
and do filtering. R3 will simulate an end host. R1 will source the traffic from its loopback.
OSPF has been enabled on all relevant interfaces.
We will start by enabling SSM for the range 220.127.116.11/24 on R2.
R2#conf t Enter configuration commands, one per line. End with CNTL/Z. R2(config)#access-list 1 permit 18.104.22.168 0.0.0.255 R2(config)#ip pim ssm range 1
R2 will now use SSM behavior for the 22.214.171.124/24 range. R2 will join the group 126.96.36.199.
We will debug IGMP and PIM to follow everything that happens. When using igmp join-group
on an interface the router simulates IGMP report coming in on that interface. We will see
later why this is important. So first we enable debugging to the buffer.
Also we must enable multicast routing and enable PIM sparse-mode on the relevant interfaces.
R1#conf t Enter configuration commands, one per line. End with CNTL/Z. R1(config)#ip multicast-routing R1(config)#int s0/0 R1(config-if)#ip pim sparse-mode R1(config-if)#do debug ip pim PIM debugging is on R1(config-if)#
R2(config)#ip multicast-routing R2(config)#int s0/0 R2(config-if)#ip pim sparse-mode R2(config-if)#int f0/0 R2(config-if)#ip pim sparse-mode R2(config-if)#ip igmp version 3 R2(config-if)# *Mar 1 00:18:37.595: %PIM-5-DRCHG: DR change from neighbor 0.0.0.0 to 188.8.131.52 on interface FastEthernet0/0 R2(config-if)#do debug ip igmp IGMP debugging is on R2(config-if)#do debug ip pim PIM debugging is on
Then we join the group on the Fa0/0 interface and look at what happens.
R2(config)#int f0/0 R2(config-if)#ip igmp join-group 184.108.40.206 source 220.127.116.11
We take a look at the log.
IGMP(0): Received v3 Report for 1 group on FastEthernet0/0 from 18.104.22.168 IGMP(0): Received Group record for group 22.214.171.124, mode 5 from 126.96.36.199 for 1 sources IGMP(0): Updating expiration time on (188.8.131.52,184.108.40.206) to 180 secs IGMP(0): Setting source flags 4 on (220.127.116.11,18.104.22.168) IGMP(0): MRT Add/Update FastEthernet0/0 for (22.214.171.124,126.96.36.199) by 0 PIM(0): Insert (188.8.131.52,184.108.40.206) join in nbr 220.127.116.11's queue IGMP(0): MRT Add/Update FastEthernet0/0 for (18.104.22.168,22.214.171.124) by 4 PIM(0): Building Join/Prune packet for nbr 126.96.36.199 PIM(0): Adding v2 (188.8.131.52/32, 184.108.40.206), S-bit Join PIM(0): Send v2 join/prune to 220.127.116.11 (Serial0/0) IGMP(0): Building v3 Report on FastEthernet0/0 IGMP(0): Add Group Record for 18.104.22.168, type 5 IGMP(0): Add Source Record 22.214.171.124 IGMP(0): Add Group Record for 126.96.36.199, type 6
R2 is receiving an IGMP report (created by itself) and then it generates a PIM join and
sends it to R1. We look how R1 is receiving it.
PIM(0): Received v2 Join/Prune on Serial0/0 from 188.8.131.52, to us PIM(0): Join-list: (184.108.40.206/32, 220.127.116.11), S-bit set PIM(0): RPF Lookup failed for 18.104.22.168 PIM(0): Add Serial0/0/22.214.171.124 to (126.96.36.199, 188.8.131.52), Forward state, by PIM SG Join
Then we verify by looking at the mroute table and by pinging.
R1#sh ip mroute 184.108.40.206 | be ( (*, 220.127.116.11), 00:09:42/stopped, RP 0.0.0.0, flags: SP Incoming interface: Null, RPF nbr 0.0.0.0 Outgoing interface list: Null (18.104.22.168, 22.214.171.124), 00:01:49/00:01:40, flags: T Incoming interface: Null, RPF nbr 0.0.0.0 Outgoing interface list: Serial0/0, Forward/Sparse, 00:01:49/00:02:39
Now we do a regular ping which should fail since we are not sourcing traffic from the loopback.
R1#ping 126.96.36.199 re 3 Type escape sequence to abort. Sending 3, 100-byte ICMP Echos to 188.8.131.52, timeout is 2 seconds: ...
This is expected and what is good about SSM is that it makes sending to groups from any
source more difficult which is good from a security perspective.
Now we do an extended ping and source from the loopback.
R1#ping Protocol [ip]: Target IP address: 184.108.40.206 Repeat count : 5 Datagram size : Timeout in seconds : Extended commands [n]: y Interface [All]: serial0/0 Time to live : Source address: 220.127.116.11 Type of service : Set DF bit in IP header? [no]: Validate reply data? [no]: Data pattern [0xABCD]: Loose, Strict, Record, Timestamp, Verbose[none]: Sweep range of sizes [n]: Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 18.104.22.168, timeout is 2 seconds: Packet sent with a source address of 22.214.171.124 Reply to request 0 from 126.96.36.199, 52 ms Reply to request 1 from 188.8.131.52, 48 ms Reply to request 2 from 184.108.40.206, 48 ms Reply to request 3 from 220.127.116.11, 36 ms Reply to request 4 from 18.104.22.168, 40 ms
So our SSM is working and we didn’t even have to enable it on R1! What if we have
clients not supporting IGMPv3? Then we could do SSM mapping. I could do that in
another post if there is interest for it. For now lets look at filtering. If we
were using ASM then we use a standard ACL and match which multicast groups are
allowed to send joins for. The joins would be (*,G) which is the same as
host 0.0.0.0 in an ACL.
To filter SSM we use an extended ACL where the source in the extended ACL
is the multicast source and the destination is which group to match. We will
create an ACL permitting 22.214.171.124 as source for the groups 126.96.36.199, 188.8.131.52
and 184.108.40.206. Anything else will be denied which we will see by debugging IGMP.
When we are doing filtering it is important to rembember that the IGMP report
generated by the router itself (igmp join-group) will also be subject to the ACL
so make sure to include that.
R2(config)#ip access-list extended IGMP_FILTER R2(config-ext-nacl)#permit igmp host 220.127.116.11 host 18.104.22.168 R2(config-ext-nacl)#permit igmp host 22.214.171.124 host 126.96.36.199 R2(config-ext-nacl)#permit igmp host 188.8.131.52 host 184.108.40.206 R2(config-ext-nacl)#deny igmp any any R2(config-ext-nacl)#int f0/0 R2(config-if)#ip igmp access-group IGMP_FILTER
Now we make R3 join a group not allowed and look at the debug output on R2.
R3(config)#int f0/0 R3(config-if)#ip igmp version 3 R3(config-if)#ip igmp join-group 220.127.116.11 source 18.104.22.168
This is from the log on R2.
IGMP(0): Received v3 Report for 1 group on FastEthernet0/0 from 22.214.171.124 IGMP(*): Source: 126.96.36.199, Group 188.8.131.52 access denied on FastEthernet0/0 R2#sh ip access-lists IGMP_FILTER Extended IP access list IGMP_FILTER 10 permit igmp host 184.108.40.206 host 220.127.116.11 (6 matches) 20 permit igmp host 18.104.22.168 host 22.214.171.124 30 permit igmp host 126.96.36.199 host 188.8.131.52 40 deny igmp any any (7 matches)
As we can see that group is not allowed so the IGMP join will not make it through.
SSM can be very useful and it is not difficult to setup. In fact it is mostly
easier than ASM to setup.