Configuring Local Area Bonjour in Multicast DNS Mode for LAN and Wireless Networks

How to configure Multicast DNS Mode for LAN and Wired Networks

This section provides information about how to configure Local Area Bonjour in multicast DNS mode.

Enabling mDNS Gateway on the Device

To configure mDNS on the device, follow these steps:

Procedure

  Command or Action Purpose

Step 1

enable

Example:

Device> enable

Enables privileged EXEC mode.

Enter your password, if prompted.

Step 2

configure terminal

Example:

Device# configure terminal

Enters global configuration mode.

Step 3

mdns-sd gateway

Example:

Device(config)# mdns-sd gateway

Enables mDNS on the device and enters mDNS gateway configuration mode.

Enter the following commands in mDNS gateway configuration mode to enable the respective functionalities:

  • air-print-helper : Enables IOS devices like iPADs to discover and use older printers that support Bonjour

  • cache-memory-max : Configures the percentage memory for cache

  • ingress-client : Configures Ingress Client Packet Tuners

  • rate-limit : Enables rate limiting of incoming mDNS packets

  • service-announcement-count : Configures maximum service advertisement count

  • service-announcement-timer : Configures advertisements announce timer periodicity

  • service-query-count : Configures maximum query count

  • service-query-timer : Configures query forward timer periodicity

Note

 

For cache-memory-max , ingress-client , rate-limit , service-announcement-count , service-announcement-timer , service-query-count , and service-query-timer commands, you can retain the default value of the respective parameter for general deployments. Configure a different value, if required, for a specific deployment.

Step 4

exit

Example:

Device(config-mdns-sd)# exit

Exits mDNS gateway configuration mode.

Creating Custom Service Definition

Service definition is a construct that provides an admin friendly name to one or more mDNS service types or PTR Resource Record Name. By default, a few built-in service definitions are already predefined and available for admin to use. In addition to built-in service definitions, admin can also define custom service definitions.

Procedure

  Command or Action Purpose

Step 1

enable

Example:

Device> enable

Enables privileged EXEC mode.

Enter your password, if prompted.

Step 2

configure terminal

Example:

Device# configure terminal

Enters global configuration mode.

Step 3

mdns-sd service-definition service-definition-name

Example:

Device(config)# mdns-sd service-definition CUSTOM1

Configures mDNS service definition.

Note

 

All the created custom service definitions are added to the primary service list. Primary service list comprises of a list of custom and built-in service definitions.

Step 4

service-type string

Example:

Device(config-mdns-ser-def)# service-type _custom1._tcp.local

Configures mDNS service type.

Step 5

Repeat step 4 to configure more than one service type in the custom service definition.

Step 6

exit

Example:

Device(config-mdns-ser-def)# exit

Exit mDNS service definition configuration mode.

Creating Service List

mDNS service list is a collection of service definitions. To create a service list, follow these steps:

Procedure

  Command or Action Purpose

Step 1

enable

Example:

Device> enable

Enables privileged EXEC mode.

Enter your password, if prompted.

Step 2

configure terminal

Example:

Device# configure terminal

Enters global configuration mode.

Step 3

mdns-sd service-list service-list-name {in | out}

Example:

Device(config)# mdns-sd service-list VLAN100-list in

Configures mDNS service list.

Step 4

match service-definition-name [message-type {any | announcement | query}]

Example:

Device(config-mdns-sl-in)# match PRINTER-IPPS message-type announcement

Matches the service to the message type. Here, service-definition-name refers to the names of services, such as, airplay, airserver, airtunes, and so on.

Note

 

To add a service, the service name must be part of the primary service list.

If the mDNS service list is set to IN, the applicable command syntax is: match service-definition-name [message-type {any | announcement | query}] .

If the mDNS service list is set to OUT, the applicable command syntax is: match service-definition-name [message-type {any | announcement | query}] [location-filter location-filter-name] [source-interface {mDNS-VLAN-number | mDNS-VLAN-range}] .

Step 5

exit

Example:

Device(config-mdns-sl-in)# exit

Exits mDNS service list configuration mode.

Creating Service Policy

A Service Policy that is applied to an interface specifies the allowed Bonjour service announcements or the queries of specific service types that should be processed, in ingress direction or egress direction or both. For this, the service policy specifies two service-lists, one each for ingress and egress directions. In the Local Area Bonjour domain, the same service policy can be attached to one or more Bonjour client VLANs; however, different VLANs may have different service policies.

To configure service policy with service lists, follow these steps:

Procedure

  Command or Action Purpose

Step 1

enable

Example:

Device> enable

Enables privileged EXEC mode.

Enter your password, if prompted.

Step 2

configure terminal

Example:

Device# configure terminal

Enters global configuration mode.

Step 3

mdns-sd service-policy service-policy-name

Example:

Device(config)# mdns-sd service-policy mdns-policy1

Configures mDNS service policy.

Step 4

service-list service-list-name {in | out}

Example:

Device(config-mdns-ser-pol)# service-list VLAN100-list in
Device(config-mdns-ser-pol)# service-list VLAN300-list out

Configures service lists for IN and OUT directions.

Step 5

exit

Example:

Device(config-mdns-ser-pol)# exit

Exits mDNS service policy configuration mode.

Associating Service Policy to an Interface

To configure mDNS on the device, follow these steps:

Procedure

  Command or Action Purpose

Step 1

enable

Example:

Device> enable

Enables privileged EXEC mode.

Enter your password, if prompted.

Step 2

configure terminal

Example:

Device# configure terminal

Enters global configuration mode.

Step 3

interface interface-name

Example:

Device(config)# interface Vlan 601

Enters interface mDNS configuration mode and enables interface configuration.

Step 4

mdns-sd gateway

Example:

Device(config-if)# mdns-sd gateway

Configures mDNS gateway on the interface.

Enter the following commands in the interface mDNS gateway configuration mode to enable the respective functionalities:

  • active-query : Sets the time interval for SDG agent to refresh the active status of connected Bonjour client services. The timer value ranges from 60 to 3600 seconds.

    Note

     

    This configuration is mandatory only on VLANs whose Bonjour policy is configured to accept Bonjour service announcements from connected Bonjour clients. If the VLAN is configured to only accept Bonjour queries but not Bonjour service announcements, this configuration is optional.

  • service-instance-suffix (Optional) : Appends the service instance suffix to any announced service name that is forwarded to the controller.

  • service-mdns-query [ ptr | all] : Configures mDNS query request message processing for the specified query types.

    If the service-mdns-query command is used without any keyword, then all Bonjour query types (PTR, SRV, and TXT) are processed by default. It is recommended to use the service-mdns-query ptr command.

  • service-policy policy-name : Attaches the specified service policy to the VLAN. Bonjour announcements, and queries received by and sent from the VLAN are governed by the policies configured in the service policy. This configuration is mandatory for all VLANs.

    Note

     

    Service policies can only be attached at interface level.

  • transport [ all | ipv4 | ipv6] (Optional): Configures BCP parameter.

    It is recommended to use transport ipv4 command, except in those networks where the Bonjour clients send only IPv6 announcements and queries.

Step 5

exit

Example:

Device(config-if-mdns-sd)# exit

Exits mDNS gateway configuration mode.

How to Configure Local Area Bonjour in Multicast DNS Mode for Wireless Networks

The configuration of local area Bonjour on a switch that acts as the SDG Agent in a wireless network involves the same set of procedures that are used to configure local area Bonjour on a switch that acts as the SDG Agent in a wired network.

The Bonjour protocol operates on service announcements and queries. Each query or advertisement is sent to the mDNS IPv4 address 224.0.0.251 and IPv6 address FF02::FB. The mDNS messages are carried over well-known industry standard UDP port 5353, over both Layer 3 transport types.

The Layer 2 address used by the Bonjour protocol is link-local multicast address and therefore it’s only forwarded to the same Layer 2 network. As multicast DNS (mDNS) is limited to a Layer 2 domain, for a client to discover a service, it has to be a part of the same Layer 2 domain. This isn’t always possible in a large-scale deployment or enterprise.

To enable mDNS communication between Wireless endpoints and Cisco Catalyst switch that acts as an SDG Agent, the intermediate WLC must transparently allow the network to transmit and receive mDNS messages.

Hence, for a Multicast DNS Mode Wireless network deployment, disable the mDNS Snooping on Cisco AireOS based WLC and enable mDNS Gateway feature on Cisco Catalyst 9800 series WLC and set the AP Multicast Mode to Multicast.

Figure below illustrates a prerequisite configuration for Wireless network to enable seamless communication between SDG-Agent switches and Wireless endpoints.

The Cisco WLC and Access Points by default prevent the forwarding of Layer 2 or Layer 3 Multicast frames between Wireless and Wired network infrastructure. The forwarding is supported with stateful capabilities enabled using AP Multicast. The network administrator must globally enable Multicast and configure a unique Multicast Group to advertise in the network. This multicast group is only required for Cisco Access Points to enable Multicast over Multicast (MCMC) capabilities across the LAN network. The Bonjour solution doesn’t require any Multicast requirements on Wireless Client VLAN; thus, it’s optional and applicable only for other Layer 3 Multicast applications.

The core network must be configured with appropriate Multicast routing to allow the Access Points to join WLC Multicast Group. The Multicast configuration must be enabled on Cisco WLC management VLAN and on the Cisco Access Points of their respective distribution layer switch.

Enabling mDNS Gateway on the Device

To configure mDNS on the device, follow these steps:

Procedure

  Command or Action Purpose

Step 1

enable

Example:

Device> enable

Enables privileged EXEC mode.

Enter your password, if prompted.

Step 2

configure terminal

Example:

Device# configure terminal

Enters global configuration mode.

Step 3

mdns-sd gateway

Example:

Device(config)# mdns-sd gateway

Enables mDNS on the device and enters mDNS gateway configuration mode.

Enter the following commands in mDNS gateway configuration mode to enable the respective functionalities:

  • air-print-helper : Enables IOS devices like iPADs to discover and use older printers that support Bonjour

  • cache-memory-max : Configures the percentage memory for cache

  • ingress-client : Configures Ingress Client Packet Tuners

  • rate-limit : Enables rate limiting of incoming mDNS packets

  • service-announcement-count : Configures maximum service advertisement count

  • service-announcement-timer : Configures advertisements announce timer periodicity

  • service-query-count : Configures maximum query count

  • service-query-timer : Configures query forward timer periodicity

Note

 

For cache-memory-max , ingress-client , rate-limit , service-announcement-count , service-announcement-timer , service-query-count , and service-query-timer commands, you can retain the default value of the respective parameter for general deployments. Configure a different value, if required, for a specific deployment.

Step 4

exit

Example:

Device(config-mdns-sd)# exit

Exits mDNS gateway configuration mode.

Creating Custom Service Definition

Service definition is a construct that provides an admin friendly name to one or more mDNS service types or PTR Resource Record Name. By default, a few built-in service definitions are already predefined and available for admin to use. In addition to built-in service definitions, admin can also define custom service definitions.

Procedure

  Command or Action Purpose

Step 1

enable

Example:

Device> enable

Enables privileged EXEC mode.

Enter your password, if prompted.

Step 2

configure terminal

Example:

Device# configure terminal

Enters global configuration mode.

Step 3

mdns-sd service-definition service-definition-name

Example:

Device(config)# mdns-sd service-definition CUSTOM1

Configures mDNS service definition.

Note

 

All the created custom service definitions are added to the primary service list. Primary service list comprises of a list of custom and built-in service definitions.

Step 4

service-type string

Example:

Device(config-mdns-ser-def)# service-type _custom1._tcp.local

Configures mDNS service type.

Step 5

Repeat step 4 to configure more than one service type in the custom service definition.

Step 6

exit

Example:

Device(config-mdns-ser-def)# exit

Exit mDNS service definition configuration mode.

Creating Service List

mDNS service list is a collection of service definitions. To create a service list, follow these steps:

Procedure

  Command or Action Purpose

Step 1

enable

Example:

Device> enable

Enables privileged EXEC mode.

Enter your password, if prompted.

Step 2

configure terminal

Example:

Device# configure terminal

Enters global configuration mode.

Step 3

mdns-sd service-list service-list-name {in | out}

Example:

Device(config)# mdns-sd service-list VLAN100-list in

Configures mDNS service list.

Step 4

match service-definition-name [message-type {any | announcement | query}]

Example:

Device(config-mdns-sl-in)# match PRINTER-IPPS message-type announcement

Matches the service to the message type. Here, service-definition-name refers to the names of services, such as, airplay, airserver, airtunes, and so on.

Note

 

To add a service, the service name must be part of the primary service list.

If the mDNS service list is set to IN, the applicable command syntax is: match service-definition-name [message-type {any | announcement | query}] .

If the mDNS service list is set to OUT, the applicable command syntax is: match service-definition-name [message-type {any | announcement | query}] [location-filter location-filter-name] [source-interface {mDNS-VLAN-number | mDNS-VLAN-range}] .

Step 5

exit

Example:

Device(config-mdns-sl-in)# exit

Exits mDNS service list configuration mode.

Creating Service Policy

A Service Policy that is applied to an interface specifies the allowed Bonjour service announcements or the queries of specific service types that should be processed, in ingress direction or egress direction or both. For this, the service policy specifies two service-lists, one each for ingress and egress directions. In the Local Area Bonjour domain, the same service policy can be attached to one or more Bonjour client VLANs; however, different VLANs may have different service policies.

To configure service policy with service lists, follow these steps:

Procedure

  Command or Action Purpose

Step 1

enable

Example:

Device> enable

Enables privileged EXEC mode.

Enter your password, if prompted.

Step 2

configure terminal

Example:

Device# configure terminal

Enters global configuration mode.

Step 3

mdns-sd service-policy service-policy-name

Example:

Device(config)# mdns-sd service-policy mdns-policy1

Configures mDNS service policy.

Step 4

service-list service-list-name {in | out}

Example:

Device(config-mdns-ser-pol)# service-list VLAN100-list in
Device(config-mdns-ser-pol)# service-list VLAN300-list out

Configures service lists for IN and OUT directions.

Step 5

exit

Example:

Device(config-mdns-ser-pol)# exit

Exits mDNS service policy configuration mode.

Verifying Local Area Bonjour in Multicast DNS Mode for LAN and Wireless Networks

This section shows how to verify Local Area Bonjour in Multicast DNS mode for LAN and Wireless networks.

Verifying SDG-Agent Status

The following is a sample output of the show mdns-sd service-list service-list-name {in | out} command.


Name           Direction  Service    Message-Type     Source
============================================================
VLAN100-list    In         Printer   Announcement      -
                In         Airplay   Query             -
                In         CUSTOM1   Any               -
VLAN300-list    Out        Printer   Announcement     Vl200

The following is a sample output of the show mdns-sd service-definitionservice-definition-name service-type {custom | built-in} command.


Service                PTR                        Type
=========================================================================
apple-tv               _airplay._tcp.local         Built-In
                        _raop._tcp.local
apple-file-share      _afpovertcp._tcp.local      Built-In
CUSTOM1               _custom1._tcp.local         Custom
CUSTOM2               _customA._tcp.local         Custom
                      _customA._tcp.local		

The following is a sample output of the show mdns-sd service-policy-name interface interface-name command.


Name			Service-List-In			Service-List-Out	
==================================================
mdns-policy-1		VLAN100-list			VLAN300-list		
mdns-policy-2		VLAN400-list			VLAN400-list	

The following is a sample output of the show mdns-sd summary command.


mDNS Gateway: Enabled
Mode: Service Peer
Service Announcement Periodicity(in seconds): 30
Service Announcement Count: 50
Service Query Periodicity(in seconds): 15
Service Query Count: 50
Active Response Timer (in seconds): Disabled
ANY Query Forward: Disabled
SDG Agent IP: 9.8.57.10
Active Query Periodicity (in minutes): 30
mDNS Query Type: PTR only
Transport Type: IPv4
mDNS AP service policy: default-mdns-service-policy

The following is a sample output of the show mdns-sd sp-sdg statistics command.


mDNS SP Statistics
last reset time: 07/27/21 15:36:33
Messages sent:
Query : 122
ANY query : 35
Advertisements : 12
Advertisement Withdraw : 1
Service-peer cache clear : 0
Resync response : 3
Srvc Discovery response : 0
Keep-Alive : 2043
Messages received:
Query response : 0
ANY Query response : 0
Cache-sync : 9
Get service-instance : 0
Srvc Discovery request : 0
Keep-Alive Response : 2042

Verifying Wide Area Bonjour Controller Status

The following is a sample output of the show mdns controller summary command.

Device# show mdns controller summary

Controller Summary
=====================================
 Controller Name  :   DNAC-BONJOUR-CONTROLLER
 Controller IP    :   10.104.52.241
 State            :   UP
 Port             :   9991
 Interface        :   Loopback0
 Filter List      :   policy1
 Dead Time        :   00:01:00 

The following is a sample output of the show mdns controller export-summary command.

Device# show mdns controller export-summary

Controller Export Summary
=========================
 Controller IP    :   10.104.52.241
 State            :   UP
 Filter List      :   policy1
 Count            :   100
 Delay Timer      :   30 seconds
 Export           :   300
 Drop             :   0
 Next Export      :   00:00:01 

The following is a sample output of the show mdns controller statistics command.

Device# show mdns controller statistics

Total BCP message sent           : 47589
  Total BCP message received       : 3
  Interface WITHDRAW messages sent : 0
  Clear cache messages sent        : 0
  Total RESYNC state count         : 0
  Last successful RESYNC           : Not-Applicable

  Service Advertisements:
   IPv6 advertised                 : 0
   IPv4 advertised                 : 300
   Withdraws sent                  : 0
   Advertisements Filtered         : 0
   Total service resynced          : 0

  Service Queries:
   IPv6 queries sent               : 0
   IPv6 query responses received   : 0
   IPv4 queries sent               : 0
   IPv4 query responses received   : 0

The following is a sample output of the show mdns controller detail command.

Device# show mdns controller detail

Controller : DNAC-BONJOUR-CONTROLLER
 IP : 10.104.52.241, Dest Port : 9991, Src Port : 0, State : UP
 Source Interface : Loopback0, MD5 Disabled
 Hello Timer 0 sec, Dead Timer 0 sec, Next Hello 00:00:00
 Uptime 00:00:00
Service Announcement :
 Filter : policy1
 Count 100, Delay Timer 30 sec, Pending Announcement 0, Pending Withdraw 0
 Total Export Count 300, Next Export in 00:00:16
Service Query :
 Query Suppression Disabled
 Query Count 50, Query Delay Timer 15 sec, Pending 0
 Total Query Count 0, Next Query in 00:00:01

Verifying Local Area Bonjour Configuration for LAN and Wireless Networks

The following is a sample output of the show run command.


mdns-sd gateway                         
 
mdns-sd service-definition custom1     
 service-type _airplay._tcp.local      
 service-type _raop._tcp.local          
 
        
mdns-sd service-list list1 IN           
 match custom1
mdns-sd service-list list2 OUT
 match custom1
 
 
mdns-sd service-policy policy1
service-list list1 IN
service-list list2 OUT
 
 
service-export mdns-sd controller DNAC-CONTROLLER-POLICY 
controller-address 99.99.99.10
controller-service-policy policy1 OUT
controller-source-interface Loopback0