Infrastructure · Topic 12 of 13

Multicast Basics, the RPF Check and PIM Sparse Mode

Understand multicast addressing, the RPF check and PIM sparse mode with rendezvous points, shared and source trees, and verify it on IOS XE.

  • 6 min
  • Includes a diagram
In a nutshell
  • IPv4 multicast uses 224.0.0.0 to 239.255.255.255.
  • The RPF check compares the incoming interface with the route back to the source.
  • Packets that fail the RPF check are dropped.

What it is

Multicast sends one stream of packets that many chosen receivers can share.

A unicast sender would need a copy for each receiver. A broadcast reaches everyone, whether or not they want it. Multicast sits between the two, because only the hosts that joined a group receive the traffic.

Sourcesends onceto group 239.1.1.1Routerreplicates where neededcopiesReceiver 1joinedcopiesReceiver 2joined

How it works

Routers build distribution trees, and the RPF check keeps those trees loop free.

Multicast addresses

IPv4 multicast uses the range 224.0.0.0 to 239.255.255.255. Some parts have special meanings.

RangeUse
224.0.0.0/24Link local control traffic, never forwarded by routers
232.0.0.0/8Source specific multicast
239.0.0.0/8Administratively scoped, for private use

Examples in the link local range are 224.0.0.5 and 224.0.0.6 for OSPF, 224.0.0.10 for EIGRP and 224.0.0.13 for PIM. On Ethernet, a multicast IP address maps to a MAC address that starts with 01:00:5E.

The RPF check

The reverse path forwarding (RPF) check stops multicast loops. When a multicast packet arrives, the router looks at the source address and asks which interface it would use to send unicast traffic back to that source.

If the packet came in on that interface, it passes the check and is forwarded. If it came in on any other interface, it is dropped. The check uses the unicast routing table, so good routing is a prerequisite for multicast.

R1# show ip rpf 10.1.1.10

The output names the RPF interface and the neighbour for that source.

Packet arrivesfrom source 10.1.1.10checkUnicast tablebest route to sourcesame interfaceForwardpasses RPF

PIM sparse mode

Protocol Independent Multicast (PIM) builds the multicast trees. It is called protocol independent because it uses the unicast routing table, whatever protocol filled it.

Sparse mode builds trees only toward receivers that ask for traffic. It uses a rendezvous point (RP), a router that acts as a meeting place for sources and receivers.

Routers discover each other with PIM hello messages sent to 224.0.0.13. Receivers join a group through IGMP, which is covered on the next page.

Shared tree and source tree

A source at 10.1.1.10 sends to group 239.1.1.1. The receiver's router joins a shared tree toward the RP at 192.168.0.1, the first hop router registers the source with the RP, and the receiver's router then switches to the shortest path tree straight to the source. PIM sparse mode uses two kinds of tree.

TreeNotationRoot
Shared tree(*, G)The RP
Source tree (shortest path tree)(S, G)The source

In an entry, S is the source address and G is the group. A star means any source.

The steps run in this order:

  1. A receiver joins a group, and its router sends a (*, G) join toward the RP.
  2. A source starts sending. Its first hop router registers the source with the RP.
  3. The RP joins toward the source, and traffic flows down the shared tree.
  4. The receiver's router can then switch to the shortest path tree. It joins toward the source directly and prunes the shared tree.

On Cisco routers the switch to the source tree normally happens at the first packet, because the default shortest path tree threshold is zero. The shared tree is a stepping stone, and the final path is often the shortest one.

Finding the RP

Every router needs to know the RP address for a group. There are three ways.

  • Static: ip pim rp-address ADDRESS, which is simple and reliable.
  • Auto-RP: a Cisco method that announces RPs by multicast.
  • BSR: a standard method with a bootstrap router that distributes RP information.

Basic configuration

R1(config)# ip multicast-routing
R1(config)# interface GigabitEthernet0/0
R1(config-if)# ip pim sparse-mode
R1(config)# ip pim rp-address 192.168.0.1

Enable multicast routing globally, enable PIM on every interface in the path, and point to the RP.

Verifying

R1# show ip pim neighbor
R1# show ip pim rp mapping
R1# show ip mroute
R1# show ip rpf SOURCE

show ip pim neighbor shows the PIM neighbours that were found. show ip mroute shows the multicast routing table.

An entry such as (*, 239.1.1.1) is the shared tree, and an entry such as (10.1.1.10, 239.1.1.1) is a source tree. Each entry lists an incoming interface and an outgoing interface list.

If traffic does not flow, check that PIM is on every interface in the path, that every router knows the RP, and that the RPF check passes for both the source and the RP.

What to remember for the exam

Eight facts cover most questions on this topic.

  • IPv4 multicast uses 224.0.0.0 to 239.255.255.255.
  • The RPF check compares the incoming interface with the route back to the source.
  • Packets that fail the RPF check are dropped.
  • PIM uses the unicast routing table, so it is protocol independent.
  • PIM sparse mode uses an RP and builds a shared tree (*, G).
  • A source tree is written (S, G) and is the shortest path tree.
  • ip multicast-routing and ip pim sparse-mode enable the feature.
  • show ip mroute and show ip rpf verify it.
Exam tip

When multicast fails, run show ip rpf for the source first. Broken unicast routing is the usual cause.

Common mistakes

These four mistakes appear often.

Forgetting ip multicast-routing. Without it, the router does not forward multicast even if PIM is on the interfaces.

Enabling PIM on only some interfaces. The tree breaks at the first router that lacks PIM.

Setting different RP addresses. Every router must agree on the RP for a group.

Ignoring asymmetric routing. The RPF check can fail when the best path back to the source is on another interface.

Watch out

Multicast uses the unicast routing table for the RPF check, so a route to the source on the wrong interface will make multicast fail.

Check yourself

Work through these three questions.

  • What does the RPF check compare?

    It compares the interface where the packet arrived with the interface used to reach the source address.

  • What does (*, G) mean in the multicast routing table?

    It is the shared tree for group G from any source, rooted at the rendezvous point.

  • Which two commands enable basic PIM sparse mode on a router?

    ip multicast-routing in global configuration, and ip pim sparse-mode on each interface.

Topic 12 of 13 in Infrastructure

Test yourself on Infrastructure

The full Cisco CCNP 350-401 ENCOR question bank has 854 questions, with timed practice exams and an explanation for every answer.

This study guide is independent and is not affiliated with, endorsed by, or sponsored by Cisco. Vendor names, certification names and exam codes are trademarks of their respective owners and are used for identification only.