Tackling the multicast beast.

Ive started on the Developing IP Multicast Networks book from Beau Williamson. This book is apparently “the” book on multicasting, so I hope it will help me out with this weak area of mine. So far ive read about DVMRP which is not on the blueprint, but it sounded like it would be a good help to understanding PIM modes, which are on the blueprint, so I decided to go through it anyways. So far its a good read, however you can tell that its dated a bit. The overview of the applications running on the MBone is from Windows 95 🙂 quite a few years ago.

I think that i get confused on how IGMP and the multicast routing protocol in place interacts. For one thing, I came across that PIM helps IGMP v1 to figure out the active querier on the multiaccess-network. This is since IGMP v1 does not have a native way of figuring this out like IGMP v2 has. In IGMP v2, the lowest IP address becomes the querier of the network.

Basically: IGMP is between hosts and their local routers. Multicast routing protocols are between routers.

Its all about the trees.

Well, it really is about the trees, in routing as in the real world :). As Beau mentions in the beginning of his book, this is really routing upside down. You do not route to a destination, you route from a source. From the source you branch out to everyone who needs it. This in effect creates a “tree” of receivers who needs the multicast stream. The management of this tree is up to the multicast routing protocols to figure out.

There are three categories of multicast routing protocols:

In dense-mode, you assume that theres at least one receiver on every subnet, so you push all you can out there. You then leave it up to the individual routers to prune the branches for the multicast groups they dont need (have no receivers for). In PIM-DM this pruning has a lifetime of about 3 minutes. After that the tree “regrows”, and you must prune the branches again if they are still not needed. This can by the pure sight of it seem like a waste of resources, and ofcourse it is. DVMRP is also a dense-mode protocol that also relies upon pruning to cut of the branches not required.

If a receiver is all of sudden appearing on a previously pruned branch, the local router can “graft” the branch back onto the tree, but sending graft messages back up the tree. This is to avoid waiting for up to three minutes before the branch is “regrown” by it being unpruned. This process of grafting is acknowledgement based.

Always remember where you come from.

This is particularly true of multicasting. One of the key components is the use of whats called an RPF check. RPF stands for Reverse Path Forwarding. It covers that for a given group you want to make sure that data is received on the correct and best interface toward that source. If this check is not successfull you might have a routing loop. When data is received, you look up into a table (more on this table later), whether the receiving interface is the RPF interface of this stream. If so, great, send it out all outgoing interface. If not, drop the packet. The table used for this lookup depends on the multicast routing protocol used. In the case of DVMRP, it has a special DVMRP routing table it uses. PIM, because it is Protocol Independent, uses the standard IP routing table (RIB) for this purpose. This means that no matter what installed the route to the source, it will be used, based on all the standard methods for assessing routes. If two equal cost routes are in the RIB, the one with the highest next-hop IP address becomes the one used for the RPF check.

Assert that you are the best, but be democratic about it.

When multiple routers are connected to the same LAN segment with receivers, you dont want to waste bandwidth, and cpu cycles on all receivers by sending two identical data streams. You only want one of them sending out this data, also called the forwarder. In PIM, this forwarder is figured out by the routers when they receive each others multicast streams. They each send out an assert message with the metric (AD, Metric) to the source of the multicast stream. The one with the lowest one wins. If there is a tie, the one with the highest IP (of the routers) win the election.

Okay, thats some basic theory behind especially PIM-DM. I will cover the PIM-SM after its been read through. Note that this is all theory. I will try to give some examples when I have a good grasp on it in later chapters.