The Bonjour protocol operates on service announcements and service queries, which allow devices to ask and advertise specific applications such as:
• File Sharing Services
•Remote Desktop Services
• iTunes File Sharing
• iTunes Wireless iDevice Syncing (in Apple iOS v5.0+)
•Music broadcasting in iOS v4.2+
•Video broadcasting in iOS v4.3+
•Full screen mirroring in iOS v5.0+ (iPad2, iPhone4S, or later)
Each query or advertisement is sent to the Bonjour multicast address for delivery to all clients on the subnet. The Apple Bonjour protocol relies on Multicast DNS (mDNS) operating at User Datagram Protocol (UDP) port 5353 and sending to the reserved group addresses listed below:
•IPv4 Group Address - 22.214.171.124
• IPv6 Group Address - FF02::FB
The addresses used by the Bonjour protocol are link-local multicast addresses and are only forwarded on the local Layer 2 (L2) domain, since link-local multicast is meant to stay local by design. Routers cannot use multicast routing to redirect the traffic because the time to live (TTL) is set to one.
Cisco Bonjour Gateway Solution in Release 7.4
In the 7.4 release, the wireless LAN controller (WLC) supports Bonjour gateway functionality on the WLC itself. You do not need to enable multicast on the controller. The WLC snoops all Bonjour discovery packets but does not forward them on the AIR or Infra network.
Bonjour is the Apple version of zero configuration networking (Zeroconf); it is mDNS with DNS Service Discovery (DNS-SD). Apple devices advertise their services via IPv4 and IPv6 simultaneously (IPv6 link local and Globally Unique). The current 7.4 implementation does not support Bonjour Snooping for IPv6 Addresses. On the iPad, you cannot turn off IPv6 or change any of the Bonjour settings.
If you want to control mDNS/Bonjour, the key is to limit the size of the local segment.
To address this issue, the Cisco WLC acts as a Bonjour gateway. The WLC listens for Bonjour services and by caching those Bonjour advertisements (AirPlay, AirPrint, and so forth) from the source/host (such as AppleTV) and responding back to Bonjour clients when they ask for or request a service. This process is shown below.
1. The controller listens for the Bonjour services.
2. The WLC caches the Bonjour services.
3. The WLC listens for the client queries for services.
4. The WLC sends a unicast response to the client queries for Bonjour services.
Bonjour Deployment Using mDNS Gateway
Bonjour Configuration on WLAN Through the User Interface
In the 7.4 release, the WLC supports Bonjour gateway functionality on the WLC itself. You do not need to enable multicast on the WLC. The WLC snoops all Bonjour discovery packets but does not forward them on the AIR or Infra network.
1. To configure and demonstrate the Bonjour feature on the WLC, create a dynamic interface for Bonjour services on a separate VLAN from the client VLAN.
The example below shows different interfaces and VLANs for Apple Clients and Apple TV:
2. Create a wireless LAN (WLAN) for clients with any security type. By default, mDNS snooping is enabled on the WLAN.
3. To confirm, click WLAN id, click the Advanced tab, and make sure that the mDNS Snooping option is Enabled. Select default-mdns-profile as the mDNS Profile to allow the Bonjour services you require to advertise on the particular WLAN.
4. Click Apply.
Note Only one mDNS profile can be applied to one WLAN.
5. Create another WLAN for services and make sure that the WLAN is mapped to an interface other than management, as shown below.
Note Release v5.0 of Apple TV does not support Wi-Fi Protected Access 2 (WPA2)-Enterprise authentication. For 802.1x networks, you can work around this problem by creating a WPA2-Pre- Shared Key (PSK) WLAN using the same wired interface.
6. Connect the Apple TV to the service set identifier (SSID) created for device services, and connect the Bonjour client (iPad/iPhone) to the SSID for clients.
7. Navigate to Monitor > Clients to see that the Bonjour servicing Apple TV and the Bonjour client (your iPad/IPhone) are associated with two different SSIDs, as shown below:
As shown above, it is implied that the Apple TV and the client are connected on different VLANs. This mapping will be confirmed in the next steps.
8. Click the client MAC address of the Bonjour device Apple TV, as shown above, to view its details.
9. Verify that the Apple TV associated to the interface is mapped to a different VLAN than the VLAN of the client. In this case, it is VLAN 11.
10. Click the MAC address of the client (iPad/iPhone) to view its details. As shown below, ensure that the iPad/iPhone is associated to an interface other than the services interface. In this case, it is VLAN 10.
mDNS Profile Configuration Through the User Interface
1. To create and apply the Bonjour services, go to CONTROLLER > mDNS > General.
2. Under Global Configuration, check the mDNS Global Snooping checkbox to enable snooping; it is disabled by default. The Master Services Database shows the default profiles, which are preconfigured.
The Master Service Database is a user-configured database for all Bonjour services supported by the WLC. As shown above, a default list of services, like Apple TV and Printer, are added to this list on start-up. The WLC snoops and learns about mDNS service advertisements only if the service is present in the master-service-list database. Similarly, only those queries for services listed in the master-service-list are responded back to clients, as long as the Bonjour profile name associated with the client allows for the service query. A maximum of 64 services can be included in the master-service-list database, so the controller has the potential to snoop and learn about 64 different services.
3. To add Bonjour services, select the desired option from the Select Service drop-down list. In this example, select Scanner.
4. Click the Add button, then click Apply. Each service name has a predefined service string.
5. To select the services to be advertised, click mDNS > Profiles. The default profile appears.
6. Navigate to Controller > mDNS > Profiles, and select the default-mdns-profile.
Note If the requirement is to use only default services, assign the default?mdns?profile to that particular WLAN.
To check which Bonjour services are running, click mDNS > Domain Names.
In the example below, Apple TV is being discovered as the wireless medium.
7. When the Bonjour service appears under Domain Name, navigate to mDNS > General > AppleTV to check which mDNS profile the service is using. Since this example uses the default profile, the services appear under default-mdns-profile.
8. Once the profile is attached to the WLAN, check to see if the Bonjour services are routed across the VLANs.
9. Make sure your Apple iPhone/iPad Client is connected to the client SSID.
10. Using the TV remote for the monitor, select AirPlay from the Settings menu, and ensure AirPlay is enabled. You can set an optional passcode for security.
11. On your Apple iOS device, double-click the home button
to reveal the multi-tasking view.
12. Swipe left to right (twice for an iPhone, once for an iPad) to reveal a menu with the AirPlay icon, as shown below.
13. Select the Apple TV from the list, and enable mirroring.
14. The status bar at the top of the Apple device turns blue and displays an icon for AirPlay to signify that you are broadcasting your screen on the Apple TV.
mDNS Services with Wired Bonjour Devices
In most scenarios, some Bonjour devices may be directly connected to the switch or device. Bonjour services can be accessed even when the Bonjour device is connected via an Ethernet cable on a network.
The VLAN of wired Bonjour devices must be trunked to the controller so that their advertisements can be seen and sent out to wireless clients. In this example, the Bonjour device (Apple TV) is on VLAN 11 tied to the dynamic interface on the controller.
1. On the WLC user interface, navigate to Controller > mDNS > Domain Names. Apple TV is now discovered as the wired medium in the dynamic VLAN, as shown below.
2. Use your Apple Client (iPhone/iPad) to check that the Apple services are still being broadcasted.