Multicast multipath

With two equal-cost paths back to the senders, every stream still arrives on one uplink: by default the RPF neighbour is the PIM neighbour with the highest address. ip multicast multipath splits streams across equal-cost RPF paths per (S,G), not per packet, and splitting is not balancing. The basic S-G hash adds the group, which suits a sender with many channels.

In Daveth Pro (Network)6 min video · lab: Multicast

By , founder of Daveth · Updated

Opening frame of the video walkthrough of Multicast multipath

Watch this lesson

6 min · Video walkthrough

In Daveth Pro (Network)

The full 6 min walkthrough is in Daveth Pro (Network). See what the plan opens

Upcoming practical lab

Lab C9: Multicast

What the lab covers

What this page answers

What does ip multicast multipath do?

It splits multicast streams across multiple equal-cost RPF paths, choosing a path per (S,G) or (*,G) stream rather than per packet. Splitting does not guarantee a balanced load. Read it in “Splitting is not balancing”

What is the multicast S-G hash?

A load-splitting algorithm based on both source and group address, so streams from one sender to many groups, such as an IPTV server, are split across paths more effectively than with the source alone. Read it in “Hash the group too”

Why does multicast multipath leave some links unused?

If source addresses are hashed the same way at each hop, the flows split across N paths at one router all take the same path at the next: the links behind it are polarized. Read it in “The links nobody uses”

Two paths, one carrying everything

A university runs its own campus TV network. The media department's server VLAN holds three senders: IPTV-1 with 20 campus TV channels, CAM-1 with a 4K lecture-capture stream, and SIGN-1 with the signage feed. Every router between them and the lecture halls has two equal-cost paths back to the senders. Yet DIST-1 receives all 22 streams on one uplink, and the other carries nothing. Is something broken?

Plain words first. A multicast stream is one sender sending to a group address, and a router keeps one entry for it, written (S, G): source and group. Equal-cost paths are routes to the same place that the routing table rates exactly the same.

From 1.6.b, one fact matters here: a router accepts a multicast stream only on the interface it would use to reach the sender. That test is the reverse path forwarding (RPF) check.

If the resulting route has only one available path, then the RPF lookup is complete, and the next-hop device and interface of the route become the RPF neighbor and RPF interface of this multicast tree. If the route has more than one path available, then route-path-selection is used to determine which path to choose. By default, for Protocol Independent Multicast sparse mode (PIM-SM), Source Specific Multicast (PIM-SSM), bidirectional PIM (bidir-PIM), groups, if multiple equal-cost paths are available, Reverse Path Forwarding (RPF) for IPv4 multicast traffic is based on the PIM neighbor with the highest IP address.

Configuration: DIST-1 with nothing added.

! no ip multicast multipath: the highest PIM neighbor is chosen

Computed from the state, which neighbor DIST-1 picks for each sender's streams. No command prints it in this form.

sender            via CORE-1    via CORE-2
IPTV-1 10.50.0.10 0             20
CAM-1 10.50.0.21  0             1
SIGN-1 10.50.0.30 0             1
22 states on DIST-1, highest PIM neighbor (default)

Look at the via CORE-2 column: all 22. CORE-2's address, 10.62.2.1, is higher than CORE-1's 10.62.1.1, and that is the whole decision.

Without further configuration, IPv4 multicast traffic in the topology illustrated in the figure would always flow across one serial interface (either serial interface 0 or serial interface 1), depending on which interface has the higher IP address.

So is anything broken? No. One path for every stream is the documented default.

Splitting is not balancing

What does ip multicast multipath change, and what doesn't it?

Load splitting and load balancing are not the same. Load splitting provides a means to randomly distribute (*, G) and (S, G) traffic streams across multiple equal-cost reverse path forwarding (RPF) paths, which does not necessarily result in a balanced IP multicast traffic load on those equal-cost RPF paths. After the equal-cost paths are recognized, ECMP multicast load splitting operates on a per (S, G) basis, rather than a per packet basis as in unicast traffic.

Read the unit in those sentences: streams, per (S, G), not per packet. Each state still arrives on one path. The command only changes which path each state gets.

Enable ECMP multicast load splitting on the device that is to be the receiver for traffic from more than one incoming interfaces, which is opposite to unicast routing. Because this command changes the way an RPF neighbor is selected, it must be configured consistently on all devices in a redundant topology to avoid looping.

From elsewhere: the first form of the command. The names, numbers and addresses come from elsewhere, not from this scenario.

Device(config)# ip multicast multipath

Configuration: DIST-1 typing the first form; the other four routers type the same line.

DIST-1# configure terminal
DIST-1(config)# ip multicast multipath
DIST-1(config)# end

IPTV-1's 20 channels are 20 separate states. Where will they arrive on DIST-1 now?

ECMP multicast load splitting traffic based on source address uses the S-hash algorithm, enabling the RPF interface for each (*, G) or (S, G) state to be selected among the available equal-cost paths, depending on the RPF address to which the state resolves. Load splitting will not occur across equal-cost paths for multicast traffic from the same source sent to different multicast groups.

Computed from the state, which neighbor DIST-1 picks with the S-hash. No command prints it in this form.

sender            via CORE-1    via CORE-2
IPTV-1 10.50.0.10 20            0
CAM-1 10.50.0.21  0             1
SIGN-1 10.50.0.30 1             0
22 states on DIST-1, S-hash

Look at the IPTV-1 row: 20 via CORE-1, none via CORE-2. One source, one hash, one path. CAM-1 went the other way, so the router did split: by sender.

Which way each sender went is this course's stand-in, not IOS XE's. Cisco doesn't publish the hash. What the page fixes, and this walk keeps, is that this form looks at the source and nothing else.

Multipath, it turns out, is plural for the router and singular for every stream.

You must have an adequate number of sources (at least more than two sources) to enable ECMP multicast load splitting based on source address. The ip multicast multipath command load splits the traffic and does not load balance the traffic. Traffic from a source will use only one path, even if the traffic far outweighs traffic from other sources.

Computed from the state: what each link carries with the S-hash. No command prints it in this form.

link               states  Mbps
HEAD-1 to CORE-1   21      162
HEAD-2 to CORE-1   0       0
HEAD-1 to CORE-2   0       0
HEAD-2 to CORE-2   1       50
CORE-1 to DIST-1   21      162
CORE-2 to DIST-1   1       50
idle: HEAD-2 to CORE-1, HEAD-1 to CORE-2

Read the Mbps column for the two links into DIST-1: 162 and 50. CAM-1's single 50 Mbps stream is the only thing on CORE-2 to DIST-1. Split, and nowhere near balanced.

Hash the group too

IPTV-1 is exactly the kind of sender the next form is for. What changes when the group goes into the hash?

ECMP multicast load splitting based on source and group address uses a simple hash, referred to as the basic S-G-hash algorithm, which is based on source and group address. Using the basic S-G-hash algorithm for load splitting, in particular, enables multicast traffic from devices that send many streams to groups or that broadcast many channels, such as IPTV servers or MPEG video servers, to be more effectively load split across equal-cost paths.

From elsewhere: the second form of the command. The names, numbers and addresses come from elsewhere, not from this scenario.

Device(config)# ip multicast multipath s-g-hash basic

Configuration: DIST-1 moving to the second form; the other four routers type the same line.

DIST-1# configure terminal
DIST-1(config)# ip multicast multipath s-g-hash basic
DIST-1(config)# end

Computed from the state, which neighbor DIST-1 picks with the basic S-G-hash. No command prints it in this form.

sender            via CORE-1    via CORE-2
IPTV-1 10.50.0.10 10            10
CAM-1 10.50.0.21  1             0
SIGN-1 10.50.0.30 0             1
22 states on DIST-1, basic S-G-hash

Look at the IPTV-1 row now: 10 and 10. The channels spread across both uplinks.

If there are just a few (S, G) or (*, G) states flowing across a set of equal-cost links, the chance that they are well balanced is quite low.

By this course's reading, 22 states counts as few here, and one of them is CAM-1's 50 Mbps stream, so an even count of states still isn't an even load.

The links nobody uses

DIST-1 split the streams. What did CORE-1 do with the half it received?

Computed from the state, which neighbor CORE-1 picks with the basic S-G-hash. No command prints it in this form.

sender            via HEAD-1    via HEAD-2
IPTV-1 10.50.0.10 10            0
CAM-1 10.50.0.21  1             0
11 states on CORE-1, basic S-G-hash

Every stream CORE-1 receives goes via HEAD-1. Why would a router that splits stop splitting?

If an RP address or source addresses are calculated once to have flows split across N paths, then they will be split across those N paths in the same way in all places in the topology. The S-G-hash mechanism, however, is subject to polarization because for a given source and group, the same hash is always picked irrespective of the device this hash is being calculated on.
would sort the list of equal-cost paths in the same way (by IP address)

By this course's reading, that is exactly what happened here. DIST-1 and CORE-1 each have two paths, both sort them by address, and both hash the same source and group, so a stream DIST-1 sends to its first path goes to CORE-1's first path too.

Computed from the state: one channel's RPF answer on each router along its path. No command prints it in this form.

(10.50.0.10, 232.10.0.2)
DIST-1  RPF neighbor 10.62.1.1  Te1/1/1, CORE-1
CORE-1  RPF neighbor 10.61.11.1 Te1/1/1, HEAD-1

Computed from the state: what each link carries with the basic S-G-hash. No command prints it in this form.

link               states  Mbps
HEAD-1 to CORE-1   11      130
HEAD-2 to CORE-1   0       0
HEAD-1 to CORE-2   0       0
HEAD-2 to CORE-2   11      82
CORE-1 to DIST-1   11      130
CORE-2 to DIST-1   11      82
idle: HEAD-2 to CORE-1, HEAD-1 to CORE-2

Read the idle line: HEAD-2 to CORE-1 and HEAD-1 to CORE-2 carry nothing. The inputs to the hash are the same on every router, so the answer is too. That has a name:

polarization is a problem that prevents routers in some topologies from effectively utilizing all available paths for load splitting.