There are a lot of good use cases to allow applications to use multicast to discover hosts on a network. Multicast is already commonly used by printers or multimedia devices.
In Airtame's case, multicast is used for the Airtame application to discover all Airtame devices on the network. In order for the list of available Airtame devices to automatically appear in the Airtame application, multicast must be enabled. The objective is to improve user experience in dynamic environments. Although it is fair to expect more bandwidth consumed by multicast traffic, by leveraging the tools our network technology already offers us, this becomes manageable.
1. Enable IP Multicast routing
Routers on the network need to be configured to allow multicast routing. It is usually disabled by default. For example, this is the command to enable it on a Cisco IOS router, through the CLI in "Global configuration mode":
Router(config)# ip multicast-routing
PIM: Protocol Independent Multicast
PIM is a protocol used to route multicast traffic across routers and networks. By configuring PIM, we can fine-tune the path that multicast packets will take on the network. For a full explanation, please refer to this article: Setup Multicast discovery across VLANs.
PIM can be configured to operate in either dense mode or sparse mode. The decision on which mode to choose largely depends on how your network is designed and where you want to send the multicast messages.
If you want to send multicast messages to a remote network, you will want to configure PIM in sparse mode on the layer 3 interface of the VLAN (SVI). A typical scenario where one would expect to use PIM in sparse mode is when you want to send multicast messages to hosts in a different VLAN that terminates on a different network appliance in your network.
In the case of Airtame, you can place your Airtame devices in their own VLAN that terminates on your firewall. Because the guest network terminates on the firewall, the firewall will see that subnet as a connected network. Since your internal networks are likely terminated in your core network, you must configure your firewall to know where to send those multicast messages. The IP address of the layer 3 interface on your core network will be your rendezvous point.
PIM Dense Mode
If your network is designed so that the sender and receivers of multicast messages are placed in VLANs that terminate on the same device, PIM in dense mode will be configured on the Layer 3 interface (SVI) of the Airtame VLAN. This mode of PIM does not forward multicast messages to remote networks.
Some L3 devices that support multicast may not support PIM. Those devices that don't support PIM will usually have IGMP Proxy as a feature and will be accessible through the GUI of the appliance.
IGMP proxy enables the router to issue IGMP host messages on behalf of hosts that the router discovered through standard IGMP interfaces. The router acts as a proxy for its hosts.
IGMP Snooping is a feature usually found on layer 2 access switches. When IGMP traffic reaches a level 2 device (e.g. access switch) it will forward the packets to all ports, regardless of whether recipients of that endpoint have joined a multicast group or not.
With IGMP snooping, a switch will check if recipients in each port are interested in that Multicast traffic, keep a table of these ports, then only forward multicast packets to the registered ports.
This way we gain bandwidth efficiency in our networks.
IP Multicast Filtering
With this option, we can whitelist the multicast addresses that we want to allow in our network. So we can effectively prevent network devices from freely joining multicast groups and sending/receiving multicast packets. Any other protocol, depending on the multicast address that is blocked, will not work. This way we have kept a tight grasp on security. Airtame can use SSDP or mDNS for auto-discovery. These are the multicast addresses for the two protocols:
Transmission Optimization Rate
If you are concerned about bandwidth consumption of multicast traffic, you can check if your network gear allows the Transmission Optimization rate feature. Some network controllers expose an option to manually and/or dynamically adjust the transfer rate of multicast traffic based on the lowest of unicast rates across all associated clients.
2. Prioritizing multicast traffic using QoS
Quality of Service is a method of prioritizing network traffic. In cases where multicast bandwidth is a concern, with this tool we can make sure our most critical services will be given priority.
By default, multicast traffic is placed in the default queue by many vendors of network appliances. Prioritizing the multicast traffic sent by the Airtame (auto-discovery, AirPlay) will allow for seamless discovery and AirPlay functionality. Airplay and the auto-discovery function are dependent on SSDP (UDP 1900 & 1901) and/or mDNS (UDP 5353). Classification of multicast traffic can be achieved by setting the IP address of the multicast protocol being used to a higher priority queue to ensure prioritized delivery.
SSDP uses the multicast address 18.104.22.168
mDNS uses multicast address 22.214.171.124
For an in-depth explanation, please refer to this article: How to prioritize Airtame traffic using QoS.
3. Verify IGMP groups
After you have configured your network to pass multicast traffic, we need to verify that the IGMP groups are forming on your layer 3 devices. The IGMP groups are labeled based on the protocol’s multicast IP address. In the following example, this is the command:
Router(config)# show IGMP groups
On a Cisco* device, where I will see the output for 126.96.36.199 and the VLAN interfaces that are participating in the IGMP group.
Note: Airtame will work with any vendor of network equipment, however, a Cisco device was used as an example while writing this article.