I'm not sure why I've taken such an interest in mDNS, service discovery, and the Bonjour protocol, but I have. It probably has something to do with my not being able to use AirPlay at home for such a long time because, like any true network geek, I put my wireless devices on a separate VLAN from my home media devices. I mean, duh. So now I keep an eye out for different methods of enabling mDNS in the network in anticipation of my own experience in my home network becoming one of my customer's experience in their enterprise network.

To that end, I took special note of a feature introduced in Cisco's latest software release (v7.4) for the Wireless LAN Controller (WLC). This feature is called mDNS Gateway. As the name implies, it enables the WLC to act as a gateway between an mDNS client in VLAN A and an mDNS server in VLAN B.

The idea is very similar to the way Avahi works, as I described in a previous post (AirPlay, VLANs, and an Open Source Solution). The WLC has an arm into whatever VLANs contain mDNS clients and servers. Note that I did not differentiate between wireless or wired, just "VLANs". If there is an mDNS device on a wired VLAN, as long as that VLAN is trunked to the WLC, it is capable of acting as an mDNS gateway for that VLAN too. As servers advertise their services, the WLC caches the service information along with the IP and MAC of the server. After that, service discovery messages from clients are seen by the WLC which responds based on information in the cache.

That's all pretty straightforward. There's more to this though than just helping devices see each other across VLANs. Since the WLC is able to see all the servers and therefore know exactly what services are available on the network, when a client issues a multicast discovery packet, the WLC does two things.

  1. It does not forward that multicast packet out to the rest of the ports/APs in that VLAN. It doesn't need to. The WLC itself knows where the services are so it will reply to the client. This eliminates the flooding of multicast discovery packets across the network.
  2. The WLC dips into its cache of services, finds the right one, and unicasts a reply back to the client.

If the WLC does not have knowledge of an appropriate service, it does not respond to the discovery request from the client.

The importance of item #1 above cannot be overlooked. If the WLC was simply bridging the client's multicast packets (as is the default behavior), those packets will go out to every single AP and out every single wired port that belongs to that client's VLAN. Multiply that out by the number of mDNS clients on the network and the number of multicast packets flooding the network goes up very, very quickly. This drives up CPU utilization on the WLC and consumes network bandwidth.

One more neat thing about mDNS Gateway is the ability to put policy around it. Imagine a corporate environment where you have a guest wifi network and an employee wifi network. You want guests to only have access to AirPlay services while employees have access to AirPlay, AirPrint, and File Share services. By building a Service Discovery Policy on the WLC, you can define what service(s) will be made available to each wireless LAN.

My other articles related to mDNS and Bonjour:

Related external links:

Disclaimer: The opinions and information expressed in this blog article are my own and not necessarily those of Cisco Systems.