Kole's Networking Journey

Multicast

Multicast is a type of network group communication that allows a sender to transmit traffic to multiple endpoints at once. Multicast is an alternative to unicast and broadcast communication. Multicast is useful for sending large amounts of data to a selected group of receivers. It is particularly useful for data heavy services such as streaming, gaming, video conferencing.

As a review, unicast is one-to-one communication and broadcast is one-to-all communication. Broadcom differentiates itself from broadcast by providingone-to-many communication. This allows for greater efficiency as the sender can be more selective on where certain traffic is sent. In multicast, endpoints are placed into different multicast groups and traffic can be sent to only a specific group. This reduces network load by not allowing traffic to flow to unwanted endpoints

Multicast Addressing

Multicast uses IPv4 Class D address range 223.0.0.0 - 239.255.255.255

IPv6 multiclass addresses begin with FF

The multicast address range is further divided by different use cases. Here is a breakdown:

One cool thing to look at is the specific address allocations on the IANA website

IANA multicast registry - https://www.iana.org/assignments/multicast-addresses/multicast-addresses.xhtml

Multicast MAC Address Mapping

In order for multicast (which is a layer 3 protocol) to function, there needs to be a way to pass the multicast traffic at a layer 2 level to ensure it reaches the appropriate destination. Since layer 2 traffic is passed based on MAC addresses of network nodes, a MAC address needs to be assigned to a multicast IP address (since they do not have one naturally). This is done through a process called multicast MAC address mapping.

Multicast MAC addresses all begin with the prefix 01-00-5e. Then the last 23 bits of the multicast IP address are appended on the end and when converted to hexadecimal, we are left with the multicast MAC address.

Multicast Routing

Internet Group Management Protocol (IGMP) - IGMP is a protocol that is used to establish and manage multicast groups.

When a host wishes to join a multicast group, it will send an IGMP membership query message to it's local router. Once acknowledged, the host will join the group and traffic designated to that multicast traffic will now be passed to that host.

IGMP comes in 3 different versions:

IGMPv1- 1st iteration, allows hosts to request to join a multicast group. (hardly used today) IGMPv2-Update allowing hosts to request to leave a group

IGMPv3- Introduces Source Specific Multicasting (SSM) allowing more efficient group managing protocols by allowing host interest in traffic from only specific source types

Once multicast groups have been established, routers use IGMP Snooping to identify different groups. IGMP snooping is important to reduce network traffic as it helps limit traffic being sent only to the desired areas instead of flooding the network. This also helps reduce vulnerability to DoS attacks.

Reverse Path Forwarding Check (RPF) - Is a check used to prevent loops in a multicast network. RPF only allows packets coming in from an interface that is used to reach the source and drops packets received on other ports.

Protocol Independent Multicast (PIM) - Is a set of multicast routing protocols used to determine the best path for multicast traffic. There a few different PIM modes for different use-cases:

PIM Dense mode- Traffic is sent everywhere on the network were PIM dense mode is

enabled. Ideal in networks with the majority of receivers participating in multicast.

PIM Sparse mode- Receivers signal to the network that they want to receive traffic from a

multicast group.

PIM Sparse dense mode- Uses a combination of sparse and dense modes depending on

the multicast group.

Distribution Trees

Routers will work to create ideal paths for multicast traffic to take. These paths are called distribution trees. There are 2 main types of distribution trees in multicast routing:

Source Distribution Tree - Also called Shortest Path Tree (SPT). SPT will take the shortest path through a network starting from a source and branching down to the receivers. Unnecessary paths in a SPT are then "pruned" to prevent unnecessary and redundant traffic flow.

Shared Distribution Tree - Also called a Rendezvous-point Tree (RPT), designates a node in the path to become the "rendezvous point" and act as the source. Multicast traffic will then go through the rendezvous point to pass traffic on the best path possible.

Created with © systeme.io