IP Multicast uses UDP for transporting multicast packets. You learned that UDP is an unreliable transport in Chapter 2, "Exploring the Network Layers." Multicast applications, such as video conferencing and corporate communications, do not require reliable delivery. However, for applications that require reliable delivery, such as bulk file and software distribution, you can use Pragmatic General Multicast (PGM).
To learn how to enable PGM on your content engines to distribute content reliably to receiving applications, refer to Chapter 14, "Distributing and Routing Managed Content."
PGM uses transport session identifiers (TSI), similar to TCP port numbers, to identify multicast transport sessions. PGM hosts assign sequence numbers to detect missing packets and reorder out-of-sequence packets. Based on the sequence numbers, PGM hosts maintain transmit and receive windows to manage the flow of multicast traffic. Recall that TCP hosts use positive acknowledgements (ACK) to acknowledge data they receive. Unlike TCP, in multicast environments, lost packets affect large numbers of receivers, not just a single host. As such, the PGM flow control mechanism must not overburden the source with positive acknowledgement traffic. Therefore, multicast receivers send selective negative acknowledgements (NAK) instead. PGM receivers selectively send NAKs to PGM senders only when packets are missing. Therefore, in practice, NAKs are far more scalable than positive ACKs for multicast environments.
PGM senders periodically send source path messages (SPM) with the original data (ODATA) for PGM-enabled routers to maintain the route with which the multicast session packets traverse the distribution tree downstream. PGM routers do not use this state information to route the downstream multicast packetsPGM routers save this state to route upcoming NAKs from receivers back up the distribution tree.
PGM is a Layer 4 transport layer protocol and relies on PIM multicast routing at Layer 3 to route downstream multicast traffic downstream.
PGM receivers detect missing packets by inspecting the sequence numbers of incoming packets. A PGM host detects packet loss if it receives packets with higher-sequence numbers than the expected packet. To ensure that the packet is not simply out of order, PGM hosts wait for numerous packets of higher-sequence numbers before generating a NAK for the missing packet. To detect whether the last packet of a stream is actually missing, PGM hosts use timers.
A receiver sends the NAK upstream to the sender. The sender in turn responds with a NAK confirmation (NCF) and repair data (RDATA) downstream to the multicast group receivers.
NAKs are unicast by PGM receivers to the last-hop routers. Before sending the NAK to the last-hop PGM host, the receiver backs off for a random amount of time, in case other receivers on the segment also need to send a NAK. The PGM router configured with the PGM router-assist feature responds to the receiver by sending an NCF message to the multicast group out the originating interface. If a receiver receives an NCF before its back-off timer expires, it does not send its NAK. The router then forwards the NAK upstream to the sender using the source state information created previously, but suppresses duplicate NAKs received on a network segment by multiple receivers. The overall result of both the random back-off by the receiver and the router NAK suppression feature is that the source receives only one or a few NAKs, and not one from every receiver that requires the missing data. Furthermore, when the upstream PGM routers receive the NAK message, they create a repair data state to know how to send the sender's upcoming NCF and RDATA downstream. With this repair state, PGM routers send only NCFs and RDATA to the segments that contain receivers that are missing the requested data.
When the source eventually receives the NAK, it too multicasts an NCF message to the group along with the requested RDATA. The downstream PGM routers, if necessary, suppress the NCFs on interfaces that do not have active receivers. Figure 5-19 shows how receivers send NAKs and receive RDATA for missing packets.
Figure 5-19. PGM Receivers Soliciting Missing Data
You must enable PGM on at least the sending and receiving hosts of multicast traffic in your network to benefit from the reliable transport mechanism of PGM defined in RFC 3208. This RFC also defines the PGM functions for routers to assist in the reliable transport of multicast traffic over a network. To enable the PGM Router-Assist feature on your routers, enter the global configuration command ip pgm router. This command enables the routers to create source and repair state, and efficiently forward NCFs and RDATA to receivers.