1.3 Multicast Basics
A multicast address is also called a multicast group address. A group member is a host that expresses interest in receiving packets sent to a specific group address. A group member is also sometimes called a receiver or listener. A multicast source is a host that sends packets with the destination IP address set to a multicast group. A multicast source does not have to be a member of the group; sourcing and listening are mutually exclusive.
Because there can be multiple receivers, the path that multicast packets take may have several branches. A multicast data path is known as a distribution tree. Data flow through the multicast distribution trees is sometimes referenced in terms of upstream and downstream. Downstream is in the direction toward the receivers. Upstream is in the direction toward the source. A downstream interface is also known as an outgoing or outbound interface; likewise, an upstream interface is also known as an incoming or inbound interface.
Routers keep track of the incoming and outgoing interfaces for each group, which is known as multicast forwarding state. The incoming interface for a group is sometimes referred to as the IIF. The outgoing interface list for a group is sometimes referred to as the OIL or olist. The OIL can contain 0 to N interfaces, where N is the total number of logical interfaces on the router.
Multicast forwarding state in a router is typically kept in terms of "(S,G)" and "(*,G)" state, which usually are pronounced "ess comma gee" and "star comma gee," respectively. In (S,G), the "S" refers to the unicast IP address of the source. The IP header of the multicast data packet contains S as the packet's source address. The "G" represents the specific multicast group IP address of concern. The IP header of the multicast data packet contains G as the packet's destination address. So for a host whose IP address is 10.1.1.1 acting as a source for the multicast group 224.1.1.1, (S,G) state would read (10.1.1.1,224.1.1.1).
In (*,G) notation, the asterisk (*) is a wild card used to denote the state that applies to any source sending to group G. A multicast group can have more than one source. If two hosts are both acting as sources for the group 224.1.1.2, (*,224.1.1.2) could be used to represent the state a router could contain to forward traffic from both sources to the group. The significance of (S,G) and (*,G) state will become more apparent when we discuss shortest path and shared trees in Chapters 2 and 3.
1.3.1 Reverse Path Forwarding
Multicast routing involves a significant paradigm change from standard unicast routing. In general, routers make unicast routing decisions based on the destination address of the packet. When a unicast packet arrives, the router looks up the destination address of the packet in its routing table. The routing table tells the router out from which interface to forward packets for each destination network. Unicast packets are then routed from source to destination.
In multicast, routers set up forwarding state in the opposite direction of unicast, from receiver to the root of the distribution tree. Routers perform a reverse path forwarding (RPF) check to determine the interface that is topologically closest to the root of the tree (see Figure 1-4). RPF is a central concept in multicast routing. In an RPF check, the router looks in a routing table to determine its RPF interface, which is the interface topologically closest to the root. The RPF interface is the incoming interface for the group.
Figure 1-4 Reverse path forwarding (RPF)
In a shortest path tree (SPT), the root of the distribution tree is the source. If a router learns that an interested listener for a group is on one of its directly connected interfaces, it tries to join the tree for that group. In Figure 1-5, this router
Figure 1-5 Shortest path tree (SPT)
The router sends a Join message out the RPF interface to inform the next router upstream it wants to receive packets for this group from this source. This message is an (S,G) Join message. The router receiving the (S,G) Join message adds the interface on which it was received to the OIL for the group and performs an RPF check on the source. This upstream router sends an (S,G) Join message out its RPF interface for the source informing its upstream router that it wants to join the group.
Each upstream router repeats this process of propagating Joins out the RPF interface until this new branch of the tree either a) reaches the router directly connected to the source or b) reaches a router that already has multicast forwarding state for this source-group pair. In this way, a new branch of the tree is created from receiver to source. Once this branch is created and each of the routers as forwarding state for the source-group pair, multicast packets can flow down the tree from source to receiver.
In a shared tree, the root of the distribution tree is a router somewhere in the core of a network. In PIM-SM, this core router is called a rendezvous point (RP). If a router learns that an interested listener for a group is on one of its directly connected interfaces, it tries to join the tree for that group. In Figure 1-6, this router
Figure 1-6 Rendezvous point tree (RPT)
does not know the address of the source of this group. However, it does know that another router in the network is aware of the source. The router that somehow knows the sources for all multicast groups is the RP (we will find out just how it knows this in Chapters 2 and 3).
The router with the directly connected listener, or the last-hop router, performs an RPF check for the IP address of the RP. This RPF check yields the RPF interface for the RP, and a (*,G) Join is sent out from this interface toward the RP. Notice that this is a (*,G) Join instead of an (S,G) Join because the last-hop router does not know the source. It needs to know only a) that the RP should know the source and b) how to get to the RP. By sending the (*,G) Join toward the RP, the last-hop router is telling the upstream router it is interested in receiving multicast packets for the group via the shared tree, or rendezvous point tree (RPT) as it called in PIM-SM.
The router receiving the (*,G) Join message adds the interface on which it was received to the OIL for the group and performs an RPF check on the RP. This upstream router sends a (*,G) Join message out its RPF interface for the RP, informing its upstream router that it wants to join the group. Each upstream router repeats this process of propagating Joins out of the RPF interface until this new branch of the tree either a) reaches the RP or b) reaches a router that already has multicast forwarding state for the group along the RPT. In this way, a new branch of the tree is created from receiver to RP.
To forward multicast packets down the RPT, the RP itself must be receiving the multicast packets. To receive this traffic, the RP can execute an RPF for the source and send an (S,G) Join toward the source. By joining the SPT, the RP is able to transmit packets down the RPT. Multicast packets now flow from the source to the RP via the SPT and then from RP to the receiver down the RPT.
Further details of SPT, RPT, and PIM-SM operation are examined in greater depth in subsequent chapters. For now, it is most important to understand the concept of reverse path forwarding.
1.3.2 Populating the RPF Table
The routing table used for RPF checks can be the same routing table used to forward unicast data packets, or it can be a separate routing table dedicated to multicast RPF. In either case, this RPF table contains only unicast routes. It does not contain multicast group addresses because RPF checks are performed only on unicast addresses (either the source or the RP).
If the same routing table used to forward unicast data packets is used for RPF, it is populated by the traditional unicast routing protocols (RIP, OSPF, IS-IS, BGP, and so on). If a dedicated multicast RPF table is used, it must be populated by some other means. Some multicast routing protocols (for example, DVMRP) include mechanisms for populating a dedicated RPF table. Others (for example, PIM-SM and PIM-DM) rely on other protocols to set up this table.
Some traditional routing protocols (such as BGP and IS-IS) now have extensions that can be used to differentiate between different sets of routing information (for example, Multiprotocol Extensions to Border Gateway ProtocolMBGPand Multitopology Routing in IS-ISM-ISIS). Routes can be tagged as multicast RPF routes and thus distinguished from unicast routes. The advantage of having a dedicated RPF table is that a network administrator can set up separate paths and policies for unicast and multicast traffic. Chapters 7 and 8 examine in detail MBGP and M-ISIS, respectively.