Saturday, July 13, 2013

Learning Multicast at Home

Sending multicast traffic across a network seems to make most people cringe.  The concept seems difficult and above reproach.  It is actually pretty simple to configure and test on small scale.  I would suggest testing with a single router to start with and then expanding the network by adding an additional router.  From small scale testing, we can expand our knowledge for use in larger networks.
So what do you need to get started?
  • Two computers – one to send the multicast stream and one to receive the multicast stream.
  • Two routers (I’ll be using Juniper Routers because that is what I have, but the concepts are the same with any vendor).
  • VLC – a free video utility that can send video multicast as well as receive it.
  • Wireshark – a packet sniffer/decoder (because in a lab you need to learn what is on the wire)
  • A video file that you can multicast over the network.
What knowledge do you need (we’ll cover the basics)?
  • Multicast address space
  • IGMP – the protocol that allows computers to “join” multicast streams
  • PIM – the protocol that shares multicast information between routers
Lets start with some basic knowledge transfer and focus on the basics.  In part 2, we’ll focus on building a single router network and in part 3 will add an additional router to our network.
If you haven’t already, download and install VLC and Wireshark on your computers.  These programs are available for Windows, OSX, and Linux.
We need to determine the multicast addressing that we will be using.  There are certain multicast addresses that you need to stay away from.  I always use 239.0.0.0/8 for my testing.  The 232.0.0.0/8 block is used for SSM (Source Specific Multicast) and you should refrain from using this multicast address space unless you are doing SSM.  More information about multicast addressing can be found at the IANA website.  As you will see in our network drawing, I have chosen 239.100.100.239 as my multicast address.
Next, we need to make a quick topology drawing for reference.  I usually make hand written drawings and scan them in later for archival purposes.  Be sure to include the multicast sender and receiver, router links, and IP addresses (don’t forget loopbacks) in the drawing.  Here is my quick hand sketch of the topology we will be using in this article.
Click on the image to see a bigger version.
IGMP
What is the purpose of IGMP (Internet Group Management Protocol)?  IGMP is used by the multicast receiver to join active multicast feeds.  The router uses IGMP to manage the multicast receivers on a local LAN segment.  There are 3 versions of the IGMP protocol.  In our example, using VLC, we will be using IGMPv2 (which is the most common version of IGMP used).  IGMPv3 is used with SSM feeds.
Need a good summary of IGMP? Check out this site.
PIM
PIM (Protocol Independent Multicast) is the protocol that is used for router-to-router multicast communications.  It gets the Protocol Independent part of it’s name because it relies on the underlying IGP (Interior Gateway Protocol) to build the route table and prevent routing loops.  PIM has two modes of operation: sparse-mode and dense-mode.  (Sparse-Dense-Mode is a hybrid in which multicast groups are defined under sparse-mode or dense-mode.  A multicast group cannot belong to both modes).
The difference between the two modes of PIM have to do with how the multicast is flooded throughout the network.  To be precise, the source is located “upstream” in the network and the receivers are “downstream”.   PIM Dense-mode (PIM-DM) floods the multicast stream throughout the network to all downstream routers (toward the receivers).  Downstream routers that do not have any interested receivers will send prune messages upstream toward the source.  PIM-DM is great for networks that have few multicast streams, but have a large audience (receivers).  PIM Sparse-mode (PIM-SM) uses the concept of a Rendezvous Point (RP) that “registers” all active multicast sources.  When a receiver wants a multicast stream the downstream router will request the information about the multicast stream from the RP.  PIM-SM is great for networks that have many multicast streams, but have a few audience member per stream.
A good overview of PIM can be found at this site.

Ad Inside Post

Comments system

Disqus Shortname