Multicast routing introduces a new level of complexity beyond standard Unicast routing. In unicast routing, the destination IP address is the address of the host, and a router simply needs to send the packets out the correct interface to reach that host. With multicast, the IP address is not a host's ip, but rather a 'transmission identifier'. There is no information within the packet that specificies what IP addresses the multicast packet should be relayed to.
To deal with this issue, multicast routing protocols have been developed. These routing protocols allow routers to relay information about member multicast groups, thereby building a multicast routing table that can be used to forward various multicast packets. By running a multicast routing protocol, routers build a virtual tree to model the distribution of multicast packets. There are two different tree models that can be used.
Source Distribution Tree is the first variety and is the simplest. The 'root' of the tree is the source of the multicast traffic, while branches define the various recipients. This method uses the shortest path between the source and the destination, and is thus called Shortest Path Tree (SPT) as well.
A notation of (S,G) is used to elucidate specific multicast streams. The S is for source, while the G is the multicast group address. For instance, an SG of (192.168.1.1,22.214.171.124) indicates the source address being 192.168.1.1, with the multicast address of 126.96.36.199 (which is Network Time Protocol).
Shared Distribution Tree is the other variety. These trees use a single root for every multicast stream, designated as a Rendezvous Point (RP), or Core (hence making RP Tree (RPT) and Core-Based Tree (CBT) alternate names for this tree variety). Every multicast stream is sent to this Core router and then distributed from there, so it's typically in some central, high-bandwidth portion of the network. The notation used for this type of tree is (*,G). The G, of course, stands for the group address. Since the root is always the same server, no source address is needed. An example notation would be (*,188.8.131.52).
Multicast streams have several features to help manage them. One thing that can be used is TTL. By setting TTL limits on multicast packets, a router can be used to selectively prune multicast packet streams by their TTL values. For instance, a multicast packet stream may start with a TTL of 32. After 6 hops, this has been reduced to 26, at which point it encounters a router with a TTL limit configured. In this case, the TTL limit is 15, so the TTL is reduced by 1 and forwarded on. Ten hops later, the TTL is down to 15 and the packet encounters a router with a TTL limit of 20. At this point, the multicast stream is discarded. By creating intelligent TTL limits, specific (distant) multicast streams can be eliminated from various network segments.
To configure multicast TTL, use the following command line:
Router(config-if)#ip multicast ttl-threshold ttl
Any multicast packet that arrives with a ttl below the specified value is automatically dropped. The default value is 0, which allows all packets to pass.
Another method to control multicast is Reverse Path Forwarding (RPF). Any time a router receives a multicast packet, it checks the source of the ip. It then looks at its routing table and figures out which interface it would send packets to reach that address. If the interface that the packet entered and the interface the router would send packets to get to the source are the same, the packet is passed. If, however, the packet came in on a different interface, the packet is dropped. Basically, the reasoning is that packets from a server should be coming in the same interface that packets destined to that server leave from. If the two are different, there must be a network loop. This check allows multicast to remain loop-free.
Routing protocols may also be classified as either Dense Mode or Sparse Mode. Dense Mode assumes that there will be alot of multicast clients throughout the network and an abundance of bandwidth.. Broadcasting a radio channel to every room, for instance, would be Dense Mode. Some examples of Dense Mode routing protocols are Distance Vector Multicast Routing Protocol (DVMRP), Protocol Independent Multicast Dense Mode (PIMDM), and Multicast Open Shortest Path First (MOSPF). Dense Mode protocols always use the shortest-path tree, using the (S,G) notation and assumes that there will be receivers in every point on the network. It then pushes multicast traffic to all these points until specifically told to not broadcast there.
Alternately, Sparse Mode assumes that multicast clients are widely dispersed and that network flooding would be an unnecessary waste of bandwidth. Sparse Mode begins with an empty distribution tree and only adds branches upon request. Some examples of Sparse Mode protocols incude Core-Based Trees (CBT) and Protocol Independent Multicast Sparse Mode (PIM SM).