IP Multicast Basics
- Simplified: unicast = one-to-one, broadcast = one-to-all, multicast = one-to-many (or many-to-many).
- Multicast is simultaneously delivering a single stream of information to multiple receivers.
- The receivers indicate their interest in participating in a multicast group by sending an IGMP host report (join message).
- A multicast group is an arbitrary group of receivers that want to receive a particular data stream. This group has no physical or geographical boundaries - the hosts can be located anywhere.
- The routers use PIM to dynamically create a multicast distribution tree. The multicast stream will then be delivered only to the network segments that are in the path between the source and the receivers.
- IPv4 class D address space is used for IP multicast. The range is 224.0.0.0 through 239.255.255.255.
- Some addresses in the 224.0.0.0/24 range have been reserved for network protocols on the local network segment. Packets to these addresses are typically sent with a TTL of 1 and are not forwarded by a router. For example, 224.0.0.1 is the 'all systems on this subnet' multicast address, and 224.0.0.2 is the 'all routers on this subnet' multicast address.
- Addresses in the 239.0.0.0/8 range are limited scope addresses and constrained to a local multicast applications that will not be forwarded outside the domain. Routers typically use filters to prevent multicast traffic in this address range from flowing outside the AS.
- There are also other reserved multicast addresses, which are not discussed here.
Layer 2 Multicast Addresses
- IP multicast address maps directly to a MAC address.
- NICs can receive packets destined to many different MAC addresses - their own unicast, broadcast, and a range of multicast addresses.
- In the 802.3 standard, bit 0 of the first octet is used to indicate a broadcast or multicast frame.
- The range 0100.5e00.0000 through 0100.5e7f.ffff is used for MAC addresses for IP multicast.
- The mapping places the lower 23 bits in the IP multicast group address into the 23 bits in the MAC address.
- Because the upper five bits of the IP multicast address are dropped in this mapping, the resulting address is not unique. In fact, 32 (2^5) different multicast IP addresses map to the same MAC address.
- This has to be considered when assigning IP multicast addresses.
- For example, 224.1.1.1 and 225.1.1.1 map to the same multicast MAC address.
Internet Group Management Protocol (IGMP)
- IGMP is used to dynamically register individual hosts in a multicast group on a particular LAN.
- Hosts identify group memberships by sending IGMP messages to their local multicast router.
- IGMPv2 improves over IGMPv1 by adding the ability for a host to signal desire to leave a multicast group and IGMPv3 improves over IGMPv2 mainly by adding the ability to listen to multicast originating from a set of source IP addresses only.
- Note: By default, enabling a PIM on an interface enables IGMPv2 on that device.
IGMP Version 1
- Only the following two types of IGMP messages exist:
- Membership query
- Membership report
- Hosts send out IGMP membership reports corresponding to a particular multicast group to indicate that they are interested in joining that group.
- IGMPv1 has no special mechanism by which the hosts can leave the group.
- If the hosts are no longer interested in receiving multicast packets for a particular group, they simply do not reply to the IGMP query packets sent from the router.
- The router periodically sends out an IGMP membership query to verify that at least one host on the subnet is still interested in receiving traffic directed to that group.
- When there is no reply to three consecutive IGMP membership queries, the router times out the group and stops forwarding traffic directed toward that group.
- If the host later wants to receive multicast packets after the timeout period, the host simply sends a new IGMP join to the router, and the router begins to forward the multicast packet again.
- If more than one multicast receiver exists for the same multicast group, only one of these hosts sends an IGMP report message; the other hosts suppress their report messages.
- In IGMPv1, there is no election of an IGMP querier. If more than one router on the segment exists, all the routers send periodic IGMP queries.
IGMP Version 2
- IGMPv1 has been superceded by IGMPv2 (backward compatible with IGMPv1).
- Four types of IGMP messages exist:
- Membership query
- Version 1 membership report
- Version 2 membership report
- Leave group
- IGMPv2 works basically the same way as IGMPv1. The main difference is that there is a leave group message. With this message, the hosts can actively communicate to the local multicast router that they intend to leave the group.
- The router still sends out a group-specific query and determines if any remaining hosts are interested in receiving the traffic.
- If there are no replies, the router times out the group and stops forwarding the traffic.
- The leave group message guarantees that unwanted and unnecessary traffic can be stopped much sooner.
IGMP Version 3
- IGMPv3 is the next step in the evolution of IGMP.
- IGMPv3 adds support for "source filtering," which enables a multicast receiver host to signal to a router the groups from which it wants to receive multicast traffic, and from which sources this traffic is expected.
- The following types of IGMP messages exist:
- Version 3 membership query
- Version 3 membership report
- Receivers signal membership to a multicast host group in the following two modes:
- INCLUDE mode—In this mode, the receiver announces membership to a host group and provides a list of source addresses (the INCLUDE list) from which it wants to receive traffic.
- EXCLUDE mode—In this mode, the receiver announces membership to a multicast group and provides a list of source addresses (the EXCLUDE list) from which it does not want to receive traffic. The host will receive traffic only from sources whose IP addresses are not listed in the EXCLUDE list. To receive traffic from all sources, which is the behavior of IGMPv2, a host uses EXCLUDE mode membership with an empty EXCLUDE list.
- In IGMPv3, hosts send their membership reports to 224.0.0.22; all IGMPv3 routers, therefore, must listen to this address. Hosts, however, do not listen or respond to 224.0.0.22; they only send their reports to that address.
- In addition, in IGMPv3, there is no membership report suppression because IGMPv3 hosts do not listen to the reports sent by other hosts. Therefore, when a general query is sent out, all hosts on the wire respond.
IGMP Join Process
- When a host wants to join a multicast group, the host sends one or more unsolicited membership reports for the multicast group it wants to join. The IGMP join process is the same for IGMPv1 and IGMPv2 hosts.
- In IGMPv3, the join process for hosts proceeds as follows:
- When a hosts wants to join a group, it sends an IGMPv3 membership report to 224.0.0.22 with an empty EXCLUDE list.
- When a host wants to join a specific channel, it sends an IGMPv3 membership report to 224.0.0.22 with the address of the specific source included in the INCLUDE list.
- When a host wants to join a group excluding particular sources, it sends an IGMPv3 membership report to 224.0.0.22 excluding those sources in the EXCLUDE list.
IGMP Leave Process
IGMPv1 Leave Process
- There is no leave-group message in IGMPv1 to notify the router that a host no longer wants to receive multicast traffic for a specific group.
- The host simply stops processing traffic for the multicast group and ceases responding to IGMP queries with IGMP membership reports for the group.
- The only way IGMP routers know that there are no active receivers for a particular multicast group is when they stop receiving membership reports.
- A countdown timer is used to facilitate this process. When a membership report is received, the timer is reset. This timeout interval is typically three times the query interval (3 minutes).
- This timeout interval means that the router may continue to forward multicast traffic onto the subnet for up to 3 minutes after all hosts have left the multicast group.
IGMPv2 Leave Process
- IGMPv2 incorporates a leave-group message to notify the router to stop receiving multicast traffic for a specific group.
- When an IGMPv2 host leaves a multicast group, if it was the last host to respond to a query with a membership report for that group, it sends a leave-group message to the all-devices multicast group (224.0.0.2).
IGMPv3 Leave Process
- IGMPv3 enhances the leave process by introducing the capability for a host to stop receiving traffic from a particular group, source, or channel in IGMP by including or excluding sources, groups, or channels in IGMPv3 membership reports.
References
IP Multicast Technology OverviewIP Multicast: IGMP Configuration Guide, Cisco IOS Release 15M&T
No comments:
Post a Comment