Multicast

Multicast – PIM Sparse Mode

Consider the topology below.

Once your IGP and infrastrucutre links are all configured use the following to enable multicast sparse mode.

Step 1 – Enable multicast globally on all routers

multicast-routing

Step 2 – Enable multicast on all interfaces

interface Serial1/0.1 point-to-point
ip pim sparse-mode

Step 3 – Configure an RP on a devices

ip pim rp-address 2.2.2.2

When you enable pim sparse mode on an interface you will see the following.

R2#sh ip pim interface

Address          Interface                   Ver/       Nbr       Query    DR       DR
Mode     Count    Intvl     Prior
10.0.0.2         Serial1/0.1                  v2/S     1           30        1          0.0.0.0
10.0.0.5         FastEthernet2/0          v2/S     0           30        1          10.0.0.5
R2#

Notice on FastEthernet2/0 there are 0 neighbors.  This is due to the fact that we havent enabled PIM sparse mode on R3.

Lets enable PIM sparse mode on R3 and see what happens.

R3(config)#interface FastEthernet1/0
R3(config-if)#ip pim sparse-mode
R3(config-if)#
00:34:46: %PIM-5-DRCHG: DR change from neighbor 0.0.0.0 to 10.0.0.6 on interface FastEthernet1/0 (vrf default)
R3(config-if)#end

Now if we go back to R2 and run the sh ip pim interface command we should see be able to see the neighbor.

R2#sh ip pim interface

Address          Interface                Ver/     Nbr      Query  DR     DR
Mode   Count   Intvl    Prior
10.0.0.2         Serial1/0.1              v2/S    1          30       1        0.0.0.0
10.0.0.5         FastEthernet2/0      v2/S    1          30       1        10.0.0.6
R2#

If we then simulate a igmp join on R3 using the commands below and we debug ip igmp we can see R3 send a Report for 224.1.1.1 as below.

interface FastEthernet0/0
ip address 20.20.20.20 255.255.255.0
ip pim sparse-mode
ip igmp join-group 224.1.1.1

00:46:08: IGMP(0): Send v2 Report for 224.1.1.1 on FastEthernet0/0
00:46:08: IGMP(0): Received v2 Report on FastEthernet0/0 from 20.20.20.20 for 224.1.1.1
00:46:08: IGMP(0): Received Group record for group 224.1.1.1, mode 2 from 20.20.20.20 for 0 sources
00:46:08: IGMP(0): Updating EXCLUDE group timer for 224.1.1.1
00:46:08: IGMP(0): MRT Add/Update FastEthernet0/0 for (*,224.1.1.1) by 0
R3(config-if)#end

Now lets check the mroute table on R3

R3#sh ip mroute
IP Multicast Routing Table
(*, 224.1.1.1), 00:02:41/00:02:29, RP 2.2.2.2, flags: SJCL
Incoming interface: FastEthernet1/0, RPF nbr 10.0.0.5
Outgoing interface list:
FastEthernet0/0, Forward/Sparse, 00:02:41/00:02:29

the key things worth noting here are:- The *, G entry is using the RP 2.2.2.2.  R3 is expecting to receive the multicast traffic on interface FastEthernet1/0.  The RPF neighbor is 10.0.0.5.  Finally the outgoing interface ie where the IGMP join was seen is FastEthernet0/0.

Now let us simulate an a source for this multicast group on R1.

R1#ping
Protocol [ip]:
Target IP address: 224.1.1.1
Repeat count [1]: 10000
Datagram size [100]:
Timeout in seconds [2]:
Extended commands [n]: y
Interface [All]: FastEthernet2/1
Time to live [255]:
Source address:
Type of service [0]:
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 10000, 100-byte ICMP Echos to 224.1.1.1, timeout is 2 seconds:

If we turn on debugging on R2 using debug ip pim we see the following

00:57:45: PIM(0): Received v2 Register on Serial1/0.1 from 10.0.0.1
00:57:45:      for 10.10.10.10, group 224.1.1.1
00:57:45: PIM(0): RPF lookup failed to source 10.10.10.10
00:57:45: PIM(0): Send v2 Register-Stop to 10.0.0.1 for 10.10.10.10, group 224.1.1.1

As you can see the RPF failed.  This is because i have forgotten to advertise the 10.10.10.10 into IS-IS.

Lets see what happens once we advertise the 10.10.10.10 into IS-IS.

00:58:50: PIM(0): Received v2 Register on Serial1/0.1 from 10.0.0.1
00:58:50: PIM(0): Send v2 Register-Stop to 10.0.0.1 for 0.0.0.0, group 0.0.0.0

The source has registered successfully with the RP, however there are no subscribers at the moment so a register stop is generated.

If we examine the multicast routing table on R2 we see the following.

R2#sh ip mroute
(*, 224.1.1.1), 00:01:37/stopped, RP 2.2.2.2, flags: SP
Incoming interface: Null, RPF nbr 0.0.0.0
Outgoing interface list: Null

(10.10.10.10, 224.1.1.1), 00:01:37/00:01:23, flags: P
Incoming interface: Serial1/0.1, RPF nbr 10.0.0.1
Outgoing interface list: Null

As you can see there is an S,G entry for the group however the outgoing interface list(OIL) is Null.

Now lets resimulate the igmp join in R3 and see the change in the multicast routing table.

R2#sh ip mroute
(*, 224.1.1.1), 00:05:20/00:02:50, RP 2.2.2.2, flags: S
Incoming interface: Null, RPF nbr 0.0.0.0
Outgoing interface list:
FastEthernet2/0, Forward/Sparse, 00:00:40/00:02:50

(10.10.10.10, 224.1.1.1), 00:02:18/00:00:41, flags:
Incoming interface: Serial1/0.1, RPF nbr 10.0.0.1
Outgoing interface list:
FastEthernet2/0, Forward/Sparse, 00:00:40/00:02:49

As you can see the OIL now contains FastEthernet 2/0 which is the interface connected to R3.

Also if we check the mroute table on R3 we see the following.

R3#sh ip mroute
(*, 224.1.1.1), 00:03:41/00:00:44, RP 2.2.2.2, flags: SJCL
Incoming interface: FastEthernet1/0, RPF nbr 10.0.0.5
Outgoing interface list:
FastEthernet0/0, Forward/Sparse, 00:03:39/00:02:08

(10.10.10.10, 224.1.1.1), 00:02:16/00:00:44, flags: LJ
Incoming interface: Null, RPF nbr 10.0.0.10
Outgoing interface list:
FastEthernet0/0, Forward/Sparse, 00:02:16/00:02:08

As you can see the incoming interface for the multicast traffic is fastethernet 1/0.

Now lets bring a PIM neighborship between R1 and R3.

If we check the mroute table on R3 we can see that the R3 has joined the source tree.

R3#sh ip mroute
(*, 224.1.1.1), 00:09:49/00:00:39, RP 2.2.2.2, flags: SJCL
Incoming interface: FastEthernet1/0, RPF nbr 10.0.0.5
Outgoing interface list:
FastEthernet0/0, Forward/Sparse, 00:09:48/00:02:58

(10.10.10.10, 224.1.1.1), 00:02:21/00:00:39, flags: LJ
Incoming interface: FastEthernet1/1, RPF nbr 10.0.0.10
Outgoing interface list:
FastEthernet0/0, Forward/Sparse, 00:02:21/00:02:58

If we look at R1 we can see the source of the tree.

R1#sh ip mroute
(*, 224.1.1.1), 00:18:01/stopped, RP 2.2.2.2, flags: SPF
Incoming interface: Serial1/0.1, RPF nbr 10.0.0.2
Outgoing interface list: Null

(10.10.10.10, 224.1.1.1), 00:18:01/00:03:25, flags: FT
Incoming interface: FastEthernet2/1, RPF nbr 0.0.0.0
Outgoing interface list:
FastEthernet2/0, Forward/Sparse, 00:04:36/00:02:38
Serial1/0.1, Forward/Sparse, 00:10:18/00:03:26

RPF Check

To prevent loops in a multicast network, an RPF check is carried out on all multicast traffic.

When a multicast packet enters a router, the router carries out an RPF check on the source address of the packet using the the unicast routing table.

Lets examine the toplogy below.

Now lets suppose the source sends a multicast packet to R1 who then forwards it to R2.  R2 checks the source address of the multicast packet against the unicast routing table.  If the exit interface in the unicast routing table for that source does not match the interface on which the multicast packet was received the RPF check fails and the multicast packet is dropped.