PIM / IGMP

Multicast Overivew
- IP multicast range is 224.0.0.0/4
- Link-local: 224.0.0.0/24
- Source Specific Multicast: 232.0.0.0/8
- GLOP: 233.0.0.0/8
-
Administratively scoped (private): 239.0.0.0/8
-
Multicast MAC OUI is 01:00:5E
- 25th bit is always 0
- Last 23 bits are mapped from IP address
- 32 possible multicast IPs map to a multicast MAC (collision)
IGMP
IGMPv1
- Host sends a membership report to local router. Multicast IP is the destination
- Every 60 seconds on router (the querier) sends a query to all hosts (224.0.0.1) to see if at least one host is still interest in receiving multicast
- Has no mechanism to leave group so has to age out (3 query intervals)
IGMPv2
- Adds group-specific queries in addition to general queries
- Hosts can leave group dynamically (Leave group message) to 224.0.0.2 (all routers).
- Adds a querier election (lowest IP)
- Adds query-interval response time (tells members how long they have to respond)
- If IGMPv1 router on segment, all routers must speak v1 (even if v2 supported)
IGMPv3
- Adds source filtering (source-specific multicast [SSM])
Multicast Distribution Trees
- Source-based tree (S,G). Rooted at source. Requires more router resources (maintain for every server).
- Shared tree (*,G). Rooted at rendezvous point (RP). Use less resources but can result in suboptimal paths.
- Traffic is only forwarded to interfaces that have interested receivers
Reverse Path Forwarding
- Verify traffic arrived on the same interface that would be used if the router were to send traffic towards the source
- If multicast packet arrives on the RPF port (facing upstream towards the server), the router forwards the packet out the interfaces in the OIL (outgoing interface list) of a multicast routing table
- If packet does not arrive on the RPF port it is discarded to prevent loops
- Uses the unicast routing table to determine the upstream path to the source
- Check is performed every 5 seconds (cisco)
PIMv2
- Sends Hello messages every 30 seconds by default (224.0.0.13 ALL-PIM-ROUTERS)
Dense mode
- Assumes that all hosts on all links are interested in the multicast traffic and so floods out alll paths, only to have some paths ask not to receive the traffic ("bush out, prune back")
- Uses source based trees
Sparse mode
- Assumes that no one wants the traffic until they ask for it
- Uses a shared tree (RP). RP is used to connect hosts and servers.
- Once PIM-SM routers start receiving traffic from a source (and learn the source IP address), they (optionally) switch over to a shortest-path tree rooted at the multicast server
SSM (Source-specific multicast)
- Builds trees rooted in just one source (S,G)
Operation (sparse mode)
- Client sends a membership report to join a multicast group (G)
- The router forwards multicast packets for that group to only those interfaces with explicit joins
- A PIM DR (designated router), sends periodic Join/Prune messages towards an RP. All routers must join through the RP
- Each router along the path to the RP builds a (*,G) state for the group and sends Join/Prune towards the RP. The wild card entry's incoming interface points towards the RP. The OIL points to the source of the Join(s)
Juniper PIM Sparse Mode Operation
Bootstrap Router (BSR)
- Disseminates RP information (similar to Cisco Auto-RP in PIMv1)
- Every router configured as BSR floods bootstrap messages and listens to other BSR candidates. The BSR that hears another BSR with a higher priority gives up its role of the BSR. Eventually there is only one BSR, and every router in the domain, including the candidate RPs learn about it.
- Every RP unicasts its own address and the configured group ranges to the BSR. Eventually, BSR learns of every RP and continuously keeps flooding the new information through the domain.
Designated Router (DR)
- Responsible for source and receiver registration with the RP.
- The DR receives IGMP query report notices from interested receivers and encapsulates those messages into unicast packets and forwards them to its configured RP
- Since sources don't notify they simply start sending traffic, the DR when it receives an initial multicast packet for a *,G entry for its configure RP, it will encapsulate the packet and forward it to the RP for registration via unicast. The RP then sends Join/Prune to the source to receive unencapsulated traffic.
- DR priority sent in hello messages. Highest priority wins. Highest IP address is tie breaker
Assert Mechanism / Forwarder
- In multi-access networks, there may be parallel paths to either the source or the RP. This can lead to group members receiving duplicate packets from multiple routers. To avoid this problem, PIM-SM uses Assert messages to determine a designated forwarder.
- When a router receives a multicast packet from a particular source on an interface in its own OIL on a segment it should send an Assert Message.
- Assert Messages contain the metric of the unicast route to the source in question, the Administrative Distance of the protocol that discovered the route, the multicast source and the group itself, and are used to elect what is called the PIM Forwarder.
- Chooses lowest admin distance for the route to the source. Best unicast routing metric to break the tie. If metrics are the same, the highest Ip address will be elected the PIM Forwarder
Sample packets
PIM
Bootstrap:

Hello:

Join:

Prune:
Note: S=Sparse Mode bit, W=Wildcard bit (*.G), R=RP Bit (Join/prune should be sent towards the RP)
