How to convert Multicast IP Address into Multicast MAC Address
<span class="bsf-rt-reading-time"><span class="bsf-rt-display-label" prefix="Reading Time"></span> <span class="bsf-rt-display-time" reading_time="5"></span> <span class="bsf-rt-display-postfix" postfix="mins"></span></span><!-- .bsf-rt-reading-time -->

How to convert Multicast IP Address into Multicast MAC Address

In the world of networking, communication isn’t always just between one device and another. Sometimes, you need to send data from one source to multiple destinations efficiently. That’s where multicast comes in handy. Multicast enables efficient one-to-many communication. This is particularly useful for applications such as video streaming, online gaming, and content distribution networks (CDNs).

Every multicast IP address (Group Address) is mapped to a special MAC address that allows ethernet interface to identify multicast packets to a specific group.

In class D every single IP represent a multicast group. There is no Subnetting.

Multicast operates within the Class D range of IP addresses, specifically reserved by the Internet Assigned Numbers Authority (IANA) from 224.0.0.0 to 239.255.255.255. Each IP address within this range represents a multicast group, and any device that joins a multicast group can receive data intended for that group.

In Multicast packet source IP is unicast and destination IP represent multicast group.

Just as with Unicast IPs, there are some reserved IP within this class D

Understanding 224.0.0.0/24: Local Network Control

IP address range 224.0.0.0/24, designated for local network control, plays a crucial role in facilitating this process within a specific broadcast domain or subnet.

The 224.0.0.0/24 address range is reserved for protocol control traffic that remains within a local area network (LAN) or broadcast domain. This means that packets sent to these addresses are not forwarded beyond the boundaries of the subnet. This local scope ensures that network control traffic does not unnecessarily traverse the entire network, thereby conserving bandwidth and maintaining network efficiency.

TTL (Time-to-Live)

In multicast communications, the TTL field in the IP header determines how many network hops (routers) a packet can traverse before being discarded. For addresses within 224.0.0.0/24, the TTL is typically set to 1 or 2. This low TTL ensures that multicast packets for local network control do not propagate beyond the immediate subnet, aligning with the intended local scope of these protocols.

Commonly Used Addresses

Several specific multicast addresses within the 224.0.0.0/24 range are commonly used for different networking protocols:

224.0.0.1  Used for all hosts on the subnet. This address is employed by protocols to send messages that are intended for all devices within the local network.

224.0.0.2 Used for all routers on the subnet. Routers use this address to exchange routing information and maintain network connectivity within the broadcast domain.

224.0.0.10 Used specifically for Enhanced Interior Gateway Routing Protocol (EIGRP) communication. EIGRP routers use this address to exchange routing tables and network information.

224.0.0.5 and 224.0.0.6 Used for Open Shortest Path First (OSPF) routing protocol. OSPF routers utilize these addresses to communicate and synchronize routing information within the subnet.

224.0.0.13 Used for Protocol Independent Multicast (PIM) routers. PIM routers utilize this address for coordination and management of multicast traffic within the local network.

232.0.0.0/8 Source Specific Multicast (SSM)
In the realm of multicast communication, Source Specific Multicast (SSM) provides a streamlined approach to delivering multicast streams where the source of the data is explicitly known.
The IP address range 232.0.0.0/8 is reserved for Source Specific Multicast (SSM) operations.

239.0.0.0/8 Organizational Local Scope (Private IPs)

The IP address range 239.0.0.0/8 serves a specific purpose known as Organizational Local Scope. This range is designated for private multicast usage within organizations, providing a controlled environment for efficient data distribution.
The 239.0.0.0/8 address range is reserved for multicast communication within a limited scope, typically confined within an Autonomous System (AS) or an organizational network. Similar to private IP unicast ranges (like 10.0.0.0/8 and 192.168.0.0/16), 239.0.0.0/8 offers a dedicated space for internal multicast applications, ensuring that multicast traffic remains local to the organization and does not traverse the broader internet.
Organizations deploy 239.0.0.0/8 for various multicast applications, including video conferencing, streaming media, software distribution, and content delivery networks (CDNs).

Layer 2 Multicast Addressing

At Layer 2, multicast addresses are distinguished by a reserved 24-bit prefix: 01-00-5E.

The MAC address range 01:00:5e:00:00:00–01:00:5e:7f:ffis reserved for IPv4 multicast packets (with an OUI owned by the IANA).

The first octet (01) indicates a multicast address, while the next two octets (00:5e) form the fixed prefix. The remaining 23 bits are derived from the lower 23 bits of the 28-bit IPv4 multicast address.

Example: For instance, the IPv4 multicast address 224.1.1.1 (binary: 11100000. 00000001. 00000001. 00000001 ) would correspond to the Ethernet MAC address 01:00:5e:01:01:01.

Why do we need multicast MAC Address ?

A MAC address, or Media Access Control address, is a 48-bit alphanumeric((0-9 and A-F) identifier commonly represented as six pairs of hexadecimal digits separated by colons(Six Octet, One Octet equals six bits) or hyphens (e.g., 00:1A:2B:3C:4D:5E).

OUI (Organizationally Unique Identifier): The first three octets ,first half of the MAC address (24 Bits), typically the initial three pairs of hexadecimal digits, indicates the OUI, which identifies the manufacturer of the network interface card.

Device Identifier: The last three octets, second half of the MAC address (24 Bits) represents a unique identifier assigned by the manufacturer to the specific network interface. NIC/vendor-specific information.

Unlike unicast addresses, which are specific to individual devices, multicast addresses are designed to reach multiple devices interested in receiving particular data streams. This is particularly useful for applications such as streaming video, audio conferencing, or distributing updates to a group of devices.

Multicast MAC addresses allow a single transmission to be received by multiple devices that have subscribed to the multicast group. This significantly reduces network congestion and bandwidth usage compared to sending separate unicast transmissions to each recipient.

There are some  specific MAC addresses used in IP Multicast Technology. These are Multicast MAC Addresses.

How we generate Multicast MAC address based on Multicat IPv4 address?

Ethernet MAC addresses consist of 48 bits, where the first 24 bits are assigned for various purposes. For multicast traffic, the first 24 bits are fixed as 01-00-5E. This reserved prefix ensures that multicast packets are recognizable and distinguishable from unicast and broadcast packets at the network level.

Step: 1
the first 24 bit in 48 bit Multicast MAC Address prefix 01-00-5E

Step: 2
IPv4 multicast addresses are within the range of 224.0.0.0 to 239.255.255.255. For example, the address 224.0.1.1 converts to binary as:

224. 255. 0. 1
11100000  11111111   00000000 00000001 

25th bit of multicast MAC address is 0 So,the Fixed part of multicast MAC address
01-00-5e = 0000 0001- 0000 0000 –0101 1110 – 0

Step : 3

Convert Lower 23 bit into Hexadecimal

224. 255. 0. 1
 11100000 01111111  00000000 00000001 
   7F 00  01 

Step : 4
We will concatenate the fixed 25 bits with the last 23 bits of the multicast IP to form our Multicast MAC Address.

0000 0001– 0000 0000 – 0101 1110 – 011111110000000000000001

01-00-5E-7F-00-01


 

In a Multicast IP Address, the initial 4 bits are constant, set as 1110 so range 224.0.0.0 to 239.255.255.255  The last 23 bits contribute to the Multicast MAC Address.

The 5 bits in between are variable, allowing for (25) 32 unique IP addresses within this range.

we will map 32 multicast IP addresses to 1 multicast MAC address (01-00-5E-01-01-01)

Sr. No.Multicast IPMulticast MAC
01224.127.0.101-00-5E-01-01-01
02224.255.0.1 01-00-5E-01-01-01 
03 225.127.0.1 01-00-5E-01-01-01 
04225.255.0.101-00-5E-01-01-01
05 226.127.0.101-00-5E-01-01-01 
 06 226.255.0.101-00-5E-01-01-01 
07 227.127.0.1 01-00-5E-01-01-01 
08  227.255.0.1 01-00-5E-01-01-01
 09 228.127.0.1 01-00-5E-01-01-01
10 228.255.0.1 01-00-5E-01-01-01 
 11229.127.0.1 01-00-5E-01-01-01 
 12 229.255.0.101-00-5E-01-01-01 
 13230.127.0.1 01-00-5E-01-01-01 
 14230.255.0.1 01-00-5E-01-01-01 
 15231.127.0.1 01-00-5E-01-01-01 
 16 231.255.0.101-00-5E-01-01-01 
 17 232.127.0.101-00-5E-01-01-01 
 18232.255.0.1 01-00-5E-01-01-01 
19  233.127.0.101-00-5E-01-01-01 
 20233.255.0.1 01-00-5E-01-01-01 
21 234.127.0.1 01-00-5E-01-01-01 
22 234.255.0.1 01-00-5E-01-01-01 
 23 235.127.0.1 01-00-5E-01-01-01
 24235.255.0.1  01-00-5E-01-01-01
 25236.127.0.1 01-00-5E-01-01-01 
 26236.255.0.1 01-00-5E-01-01-01 
 27 237.127.0.101-00-5E-01-01-01 
 28 237.255.0.101-00-5E-01-01-01 
29 238.127.0.101-00-5E-01-01-01 
 30238.255.0.1 01-00-5E-01-01-01 
31 239.127.0.1 01-00-5E-01-01-01 
 32239.255.0.1  01-00-5E-01-01-01

This can lead to network issues. For instance, a host set to receive the multicast IP address 239.1.1.1 will configure its network card to listen for MAC address 01-00-5E-01-01-01. However, if another stream is directed to the multicast IP address 224.1.1.1, it will also be received by our host due to the identical MAC address. To differentiate, the host must examine the IP address of the incoming frame to determine if it’s intended for 239.1.1.1, discarding those meant for 224.1.1.1

Leave a Reply