Sending a message from a single source to selected multiple destinations across a Layer 3 network in one data stream is the basic definition of IP multicasting.
If you want to send a message from one source to one destination, you could send a unicast message. If you want to send a message from one source to all the destinations on a local network, you could send a broadcast message. However, if you want to send a message from one source to selected multiple destinations spread across a routed network in one data stream, the most efficient method is IP multicasting.
How Multicasting Provides a Scalable Solution
The six basic requirements for supporting multicast across a routed network are as follows:
A designated range of Layer 3 addresses that can only be used by multicast applications must exist. A network administrator needs to install a multicast application on a multicast server using a Layer 3 multicast address from the designated range.
A multicast address must be used only as a destination IP address and specifically not as a source IP address. Unlike a unicast IP packet, a destination IP address in a multicast packet does not specify a recipient’s address but rather signifies that the packet is carrying multicast traffic for a specific multicast application.
The multicast application must be installed on all the hosts in the network that need to receive the multicast traffic for the application. The application must be installed using the same Layer 3 multicast address that was used on the multicast server. This is referred to as launching an application or joining a group.
All hosts that are connected to a LAN must use a standard method to calculate a Layer 2 multicast address from the Layer 3 multicast address and assign it to their network interface cards (NIC).
There must be a mechanism by which a host can dynamically indicate to the connected router whether it would like to receive the traffic for the installed multicast application. The Internet Group Management Protocol (IGMP) provides communication between hosts and a router connected to the same subnet.
There must be a multicast routing protocol that allows routers to forward multicast traffic from multicast servers to hosts without overtaxing network resources. Some of the multicast routing protocols are Distance Vector Multicast Routing Protocol (DVMRP), Multicast Open Shortest Path First (MOSPF), and Protocol Independent Multicast dense mode (PIM-DM) and sparse mode (PIM-SM).
How Multicast Delivers Traffic to Selected Users
The figure below shows how multicast traffic is forwarded in a Layer 3 network. The purpose of this illustration is to give you an overview of how multicast traffic is forwarded and received by selected hosts.
Assume that a video multicast application was installed on the video server using the special Layer 3 multicast address 18.104.22.168. A multicast routing protocol is configured on R1 and R2 so that they can forward the multicast traffic. R2 knows that it has hosts on both Ethernet links that would like to receive multicast traffic for the group 22.214.171.124 because these hosts have indicated their desire to receive traffic for the group using IGMP.
A multicast packet travels from the video server over the Ethernet link to R1, and R1 forwards a single copy of the multicast packet over the WAN link to R2. When R2 receives a multicast packet on the WAN link with the destination address 126.96.36.199, it makes a copy of the packet and forwards a copy on each Ethernet link. Because it is a multicast packet for the group (application) 188.8.131.52, R2 calculates the Layer 2 destination multicast address of 0x0100.5e05.0505 and uses it as the destination MAC address on each packet it forwards to both switches.
When the switches receive these packets, they forward them on appropriate ports to hosts. When the hosts receive the packets, their NICs compare the destination MAC address with the multicast MAC address they are listening to, and because they match, inform the higher layers to process the packet.
Multicast IP Addresses
The Internet Assigned Numbers Authority (IANA) has assigned class D IP addresses to multicast applications. The first 4 bits of the first octet for a class D address are always 1110. IP multicast addresses range from 184.108.40.206 through 220.127.116.11. As these addresses are used to represent multicast groups (applications) and not hosts, there is no need for a subnet mask for multicast addresses because they are not hierarchical. In other words, there is only one requirement for a multicast address: The first 4 bits of the first octet must be 1110. The last 28 bits are unstructured.
Reserved Multicast Addresses
IANA has reserved two ranges of permanent multicast IP addresses. The main distinction between these two ranges of addresses is that the first range is used for packets that should not be forwarded by routers, and the second group is used when packets should be forwarded by routers.
The range of addresses used for local (not routed) purposes is 18.104.22.168 through 22.214.171.124.The range of permanent group addresses used when the packets should be routed is 126.96.36.199 through 188.8.131.52.
The table below shows some of the well-known addresses from the permanent address range.
Addresses for Source-Specific Multicast Applications (SSM)
IANA has allocated the range 184.108.40.206 through 220.127.116.11 for SSM applications and protocols. The purpose of these applications is to allow a host to select a source for the multicast group. SSM makes multicast routing efficient, allows a host to select a better- quality source, and helps network administrators minimize multicast denial of service (DoS) attacks.
Multicast Addresses for GLOP Addressing
IANA has reserved the range 18.104.22.168 through 22.214.171.124 (RFC 3180), called GLOP addressing, on an experimental basis. It can be used by anyone who owns a registered autonomous system number (ASN) to create 256 global multicast addresses that can be owned and used by the entity. IANA reserves addresses to ensure global uniqueness of addresses; for similar reasons, each autonomous system should be using an assigned unique ASN.
By using a value of 233 for the first octet, and by using the ASN for the second and third octets, a single autonomous system can create globally unique multicast addresses as defined in the GLOP addressing RFC.
For example, the autonomous system using registered ASN 5663 could convert ASN 5663 to binary (0001011000011111). The first 8 bits, 00010110, equals 22 in decimal notation, and the last 8 bits, 00011111, equals 31 in decimal notation. Mapping the first 8 bits to the second octet and the last 8 bits to the third octet in the 233 range addresses, the entity that owns the ASN 5663 is automatically allocated the address range 126.96.36.199 through 188.8.131.52.
Multicast Addresses for Private Multicast Domains
The last of the reserved multicast address ranges mentioned here is the range of administratively scoped addresses. IANA has assigned the range 184.108.40.206 through 220.127.116.11 (RFC 2365) for use in private multicast domains,
Mapping IP Multicast Addresses to MAC Addresses
Assigning a Layer 3 multicast address to a multicast group (application) automatically generates a Layer 2 multicast address. The figure below shows how a multicast MAC address is calculated from a Layer 3 multicast address. The MAC address is formed using an IEEEregistered OUI of 01005E, then a binary 0, and then the last 23 bits of the multicast IP address.
To understand the mechanics of this process, use the following six steps, which are referenced by number in the figure above:
Step 1: Convert the IP address to binary. Notice the first 4 bits; they are always 1110 for any multicast IP address.
Step 2: Replace the first 4 bits 1110 of the IP address with the 6 hexadecimal digits (or 24 bits) 01-00-5E as multicast OUI, in the total space of 12 hexadecimal digits (or 48 bits) for a multicast MAC address.
Step 3: Replace the next 5 bits of the binary IP address with one binary 0 in the multicast MAC address space.
Step 4: Copy the last 23 bits of the binary IP address in the last 23-bit space of the multicast MAC address.
Step 5: Convert the last 24 bits of the multicast MAC address from binary to 6 hexadecimal digits.
Step 6: Combine the first 6 hexadecimal digits 01-00-5E with the last 6 hexadecimal digits, calculated in Step 5, to form a complete multicast MAC address of 12 hexadecimal digits.