Wednesday, January 9, 2013

Basics Of Multicast

The most popular and widely deployed multicast protocol is PIM, which is known as Protocol Independent Multicast (PIM). Unlike other multicast routing protocols such as Distance Vector Multicast Routing Protocol (DVRMP) or Multicast Open Shortest Path First (MOSPF), PIM does not maintain a separate multicast routing table, but relies on the existing IGP table when performing its Reverse Path Forwarding (RPF) check.

PIM can be configured as Dense Mode, Sparse Mode and Spare-Dense mode (Hybrid Mode).

PIM Dense Mode (PIM-DM)
PIM-DM uses a flood like broadcast and prune mechanism. When a source sends to an IP multicast group address, each router that receives the packet will create a (S, G) forwarding state entry. The receiving router will initially forward the multicast packet to output interfaces that meet the following requirements:
• Reverse Path Forwarding (RPF) check.
• Internet Group Membership Protocol (IGMP) receivers

To pass the RPF check, an incoming multicast packet must be received on an interface that the IGP routing table indicates the source (of the multicast packet) is reachable from.

Note that multicast enabled interfaces must have the corresponding unicast source routes in the IGP to avoid black holes. In the situation where equal cost paths exist, the unicast route with the highest upstream neighbor IP address is chosen. Also, when there are multiple routers sending on to the same subnet, a PIM assert process is triggered to elect a single designated router (DR).

(Design Considerations: How to select multicast group address)
When a state is created according to the RPF check, a source tree or shortest path tree (SPT) is developed with the source at the root or first hop router. Multicast packets following the tree take the optimal path through a network and packets are not duplicated over the same subnets.

Last hop routers with no receivers then prune back from the tree, however OIL in the upstream neighbour are maintained. These entries periodically (every 3minutes) move into a forwarding state and prune process re-occurs. PIM-DM is usually not suitable for a WAN environment and recommended for small and for LAN networks.

PIM Sparse Mode (PIM-SM) PIM-SM uses an explicit join model, where routers with active receivers will join multicast groups. This has advantages over the flood and prune mechanism as mentioned in PIM-DM. PIM-SM uses a control point known as Rendezvous Point or RP, a common point where all the sources register themselves first and all the receivers always comes first for the sources address.

(Multicast doesnot work with two loopbacks)
First hop designated routers (the routers with sources attached) register the sources to the RP. When the RP sees the source traffic coming in it will build an SPT back to the source, hence there will be (S, G) state entries between the RP and the source. The last hop designated routers (the routers with the receivers attached) join to the RP hop by hop, creating a shared tree (*, G) with the ‘*’ meaning any source.

When a source starts transmitting, the initial multicast traffic flows to the RP via a SPT then down to the receivers for that group via a shared tree (with the RP being the root). This may result in a non-optimal path being created to a receiver depending where the RP is positioned.

To address this problem, a mechanism known as SPT switch over can be used. The last hop router, depending on the traffic rate, sends and (S, G) join towards the source to create an optimal SPT forwarding path, and once established sends RP Prunes towards the RP. The decision to create an SPT to the source is dependant upon the SPT-threshold in terms of bandwidth.

PIM Sparse-Dense Mode
This mode is a combination of both previous modes. The decision to use sparse or dense mode for a particular multicast group depends on whether a group has a matching entry in the Group-to-RP mapping cache. If an entry exists in the cache, then that group is operates in sparse mode on that interface. If the multicast group does not have a corresponding entry in the mapping cache, then that group operates in dense mode.

This mode is required when using the Cisco Auto-RP mechanism to distribute Group-to-RP mappings.

People who read this post also read :

No comments: