Configuring Local Area Bonjour in Unicast Mode for LAN Networks

Cisco Catalyst 9000 Series switches and Cisco Catalyst 9800 Series WLC introduce the unicast mode function in Local Area Bonjour network domain. The new enhanced gateway function at the first hop of wired and wireless networks communicates directly with any industry standard RFC 6762 compliant mDNS end point in Layer 2 unicast mode. The new unicast mode communication eliminates the Layer 2 mDNS flood challenge in large-scale enterprise-grade LAN and WLAN networks. The unicast mode provides enhanced security, bandwidth, scale, and performance within the network.

Prerequisites for Local Area Bonjour in Unicast Mode for LAN Networks

You must ensure that the Cisco Catalyst devices are successfully configured and are operational prior to implementing Cisco Local Area Bonjour in unicast mode for LAN networks. The following are the prerequisites that need to be verified on a Cisco Catalyst Switch before deploying it in SDG-Agent mode or Service-Peer mode:

  • Verify that the targeted Cisco Catalyst switch platform is supported in SDG-Agent or Service-Peer mode from the support matrix.

  • Verify that the targeted Cisco Catalyst SDG-Agent and Service-Peer switch are running the minimum required Cisco IOS XE software version.

  • The Cisco Catalyst switch in SDG-Agent and Service-Peer mode must have the valid Cisco DNA Advantage license installed and running.

  • In a Multilayer network with Layer 2 unicast service-routing, ensure that the SDG-Agent in distribution-layer and Service-Peer is interconnected through a Layer 2 trunk in static mode.

  • Ensure that the SDG-Agent and Service-Peer switches have IP reachability on the same IPv4 subnet in global routing.

Restrictions for Local Area Bonjour in Unicast Mode for LAN Networks

  • Local Area Bonjour in Unicast Mode for LAN Networks is not supported on Cisco Catalyst 2900 Series, Cisco Catalyst 3850 Series, Cisco Catalyst 3650 Series, Cisco Catalyst 4500 Series, Cisco Catalyst 6500 Series, Cisco Catalyst 6800 Series switches, C9500X-28C8D model of the Cisco Catalyst 9500 Series Switches, and Cisco Catalyst 9600 Series Supervisor 2 Module.

  • Cisco SD-Access for wired and wireless networks is supported only for releases starting from Cisco IOS XE Amsterdam 17.3.3.

  • Cisco Embedded Wireless Controller on a Cisco Catalyst Series switch is supported only for releases starting from Cisco IOS XE Amsterdam 17.3.3.

  • The Cisco Bonjour gateway solution follows the industry standard RFC 6762 Multicast DNS (mDNS) guidelines and only supports wired or wireless end points that comply with unicast mode.

  • The Catalyst Switch Management Port is not supported for local area service-routing.

  • mDNS doesn't support the split of transport with dual stack on FHRP between SDG agents. You can either enable IPv4 or IPv6 management VLAN and make one switch as FHRP active.

  • You can configure either Local Area Bonjour in Unicast Mode or Local Area Bonjour in Multicast DNS mode, and not both, on the same SDG agent or the same service peer.

  • Beginning from Cisco IOS XE Cupertino 17.9.1, if autostate is disabled on a switch virtual interface (SVI), cache records will not be updated. To update the cache records, autostate must be enabled on the SVI.

Information About Local Area Bonjour in Unicast Mode for LAN Networks

The zero-configuration service discovery and distribution capabilities use the link-local mDNS protocol to discover rich services intuitively without extensive user knowledge and intervention. RFC 6762 provides guidelines to discover services via Layer 2 multicast or Layer 2 unicast in a local segment. The receiving end point may request service discovery over an IPv4 and IPv6 network to collect information prior to use. The Layer 2 multicast frames are broadcast-category packets in a LAN and WLAN environment. Thus, they are flooded based on the Layer 2 flood boundary size across the network.

The Layer 2 or Layer 3 network boundary varies broadly in an enterprise network for LAN and wireless designs. The Local Area Bonjour domain introduces two new unicast communication modes. The unicast communication modes prevent mDNS flooding in the network for any current or evolving network deployment models. The following are the two new aspects of Local Area Bonjour Unicast modes:

  • Unicast mode end points

  • Unicast mode Layer 2 network

End Points for Unicast Mode

Starting with Cisco IOS XE Amsterdam Release 17.3.2, Cisco Catalyst 9000 Series switches and Cisco Catalyst 9800 Series WLCs introduce Layer 2 unicast service gateway solution. The mDNS endpoint continues to advertise or query services over Layer 2 mDNS. However, with the unicast mode settings enabled, the incoming mDNS IPv4 and IPv6 frames are handled uniquely. The unicast technique eliminates the mDNS flood challenges and provides a policy-based service query response to the requesting end points over a unicast MAC address. The following figure illustrates the functional difference between the new Layer 2 unicast (flood-free) and the traditional Layer 2 Multicast (flood) communication with wired and wireless end points.

Figure 1. Layer 2 Unicast Mode End Points

Layer 2 Network for Unicast Mode

The Layer 3 boundary for wired and wireless networks can reside in the distribution layer with Layer 2 connections extended over trunk ports to an access layer switch or WLC. The association of the nonpruned or common VLAN ID to the trunk ports extends the Layer 2 flood boundary across the network.

Starting with Cisco IOS XE Amsterdam Release 17.3.2, Cisco Catalyst 9000 Series switches and Cisco Catalyst 9800 Series WLCs introduce the Service Peer role to eliminate transmitting mDNS flood over trunk ports. The Service Peer establishes a unicast Layer 3 IPv4-based service-routing session with the distribution layer system in Service Discovery Gateway (SDG) role. The Service Peer establishes the session over the existing Layer 2 trunk ports without modifying any existing Layer 2 VLAN configuration. The new mDNS trust port between access layer and distribution layer uses the existing out-of-band management network to statefully discover and distribute services (based on policies) to replace traditional flood-n-learn methods from the Layer 2 network.

If the Layer 3 boundary in a LAN environment is at the access layer, then the SDG mode provides integrated Service Peer role. Further, the SDG mode needs only Wide Area Bonjour with Cisco DNA Center for service-routing in a Layer 3 IP network.

The following figure illustrates a Layer 2 Network with the unicast mode and a traditional Layer 2 network with mDNS flood:

Figure 2. Unicast Mode Layer 2 Network

Default mDNS Service Configurations

Starting with Cisco IOS XE Bengaluru 17.6.1, an intuitive approach to configuring mDNS services, known as the default mDNS service configuration, is introduced. The default service configuration contains a default service policy that creates a service list with default service-types that is automatically enforced in the ingress or egress direction. The following figure illustrates the default mDNS service configurations:

Figure 3. Default mDNS Service Configuration

The default mDNS service configurations accelerates solution adoption, increases user productivity, and reduces operation overhead. Additionally you can define a custom policy and define a service list with custom-defined service types and enforce it in the ingress or egress direction.

HSRP-Aware mDNS Service-Routing

Starting from Cisco IOS XE Bengaluru 17.6.1, Hot Standby Router Protocol-aware (HSRP-aware) mDNS Service-Routing is supported between Service Peers and SDG agents in a multilayer network. During a changeover, that is when the primary SDG agent fails and the secondary SDG agent becomes the new primary, the service-routing session between the Service Peer and the SDG agent remains uninterrupted. The new primary SDG agent establishes a session with the Service Peer and cache information is resynced.

mDNS Service-Routing is performed over the management VLAN between the Service Peer and the SDG Agent. The HSRP virtual IP address of the management VLAN is enabled on the SDG agent using the standby group_number ip ip_address command. The HSRP virtual IP address needs to configured on the Service Peer as the IP address of the SDG agent.


Note


The HSRP virtual IP address must be reachable and in active state during a changeover.


The following figure illustrated a wired and wireless network that supports HSRP-aware mDNS Service-Routing:

Figure 4. HSRP-Aware mDNS Service-Routing on a Wired and Wireless Network

mDNS Service-Gateway SSO Support

Starting from Cisco IOS XE Bengaluru 17.6.1, mDNS Stateful Switchover (SSO) is supported on network devices configured in Service Peer role and SDG agent role. In SSO-enabled devices, one device is selected as an active device and the other as a standby device. The cache information learnt by the active device is synced with the standby device. When the active device fails, the standby device becomes the new active device and continues the mDNS service discovery process.

Figure 5. mDNS Service-Gateway SSO

Note


Use the show mdns-sd summary command to check whether SSO is in active or disabled state.

mDNS service-gateway SSO is supported on Cisco Catalyst 9600 Series Switches configured with either redundant supervisor engine module in SSO state or with Cisco StackWise Virtual.


How to Configure Local Area Bonjour Unicast Mode for LAN Networks

This section shows how to configure the first-hop Layer 2 LAN access switch in Service Peer mode, to enable mDNS gateway function with policies, and to enable peering with upstream Layer 3 gateway in SDG Agent mode. The procedure also applies to the first-hop Layer 3 LAN access switch and the first-hop Layer 3 gateway switch in SDG Agent mode.

Configuring mDNS Gateway Mode

To configure mDNS gateway mode, perform the following 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 Layer 2 switch and enters mDNS gateway configuration mode.

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

  • active-query timer [min]: Enables refresh of discovered services and their records with a periodic mDNS query message for the permitted service types. The value ranges from 1 to 120 minutes.

    Note

     

    Starting from Cisco IOS XE Bengaluru 17.6.1, the active-query timer command can be configured globally in Service-Peer for multilayer networks and in SDG agent for routed access networks.

  • air-print-helper: Enables communication between Apple iOS devices like iPhones and iPads to discover and use older printers that do not support driverless AirPrint function.

  • any-query forward: Enables forwarding any query to wide area bonjour.

    Note

     

    This is disabled by default.

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

  • cache-sync timer: Configures the periodicity of sending cache synchronization messages from the SDG-Agent to the service peer.

  • query-response mode[recurring|on-demand]: Configures the mode in which incoming queries are handled and responded.

    • recurring: In this mode, once a query is received from endpoints, a response is sent at regular intervals to ensure that the latest information is stored in the cache at the endpoints. The interval must be configured with the active-response timer command.

      This is the default mode.

    • on-demand: In this mode, a response is sent only when a query is received from the endpoints.

  • active-response timer[sec]: Configures the periodicity to respond to queries from endpoints. The value ranges from 5 to 60 seconds. The default is 15 seconds.

    Note

     

    The active-response timer command can be configured only if the query-response mode command is configured with the recurring keyword.

    If the query-response mode is changed from recurring to on-demand after the active response timer is set, then the active response timer must be disabled using the no active-response timer command.

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

  • service-announcement-count: Configures maximum service announcement count per scheduler to upstream SDG-Agent or Cisco DNA Center controller. Service advertisement count ranges from 10 to 500.

  • service-announcement-timer periodicity: Configures service advertisement time scheduler in seconds to upstream SDG-Agent or Cisco DNA Center controller. The value ranges from 5 to 36000 seconds.

  • service-query-count: Configures maximum service query request count per scheduler to upstream SDG-Agent or Cisco DNA Center controller. The value ranges from 10 to 500 service query count.

  • service-query-timer periodicity: Configures service query request time scheduler in seconds to upstream SDG-Agent or Cisco DNA Center controller. The value ranges from 5 to 36000 seconds.

  • service-receiver-purge timer [sec]: Configures the expiry period for the entries in the query database. The entries in the database will be deleted once the expiry period is completed. The values range from to 30 to 4500 seconds. The default is 120 seconds.

  • service-mdns-query {ptr|srv|txt} : Permits processing a specific query type.

    The default value is ptr .

    Note

     

    Starting from Cisco IOS XE Bengaluru 17.6.1, the service-mdns-query command can be configured globally on the Layer 2 switch.

  • service-record-ttl {enhanced|original}[sec]: The method to configure the Time to Live (TTL) timer in seconds for the discovered service records in the cache.

    • enhanced : In this method, the TTL timer is set to the default of 4500 seconds.

    • original : In this method, the TTL timer overrides the default value and is set to the value received from the service provider.

  • source-interface interface-id: Selects the interface with a valid IP address that sources the service-routing session with the upstream Cisco Catalyst SDG Agent switch.

Step 4

mode {service-peer | sdg-agent}

Example:

Device(config-mdns-sd)# mode service-peer
OR
Device(config-mdns-sd)# mode sdg-agent

Configure mDNS gateway in either of the following modes based on system settings:

  • service-peer: Enables the Layer 2 Catalyst Series switch in mDNS Service Peer mode.

  • sdg-agent: Enables the Layer 3 Catalyst Series switch in SDG Agent mode to peer with Cisco DNA Center controller for Wide Area Bonjour service-routing.

    This is the default mode.

Step 5

end

Example:

Device(config-mdns-sd)# end

Returns to privileged EXEC mode.

Configuring mDNS Service Policy

The mDNS service policy creates a service list that permits built-in or user-defined custom service-types. It then associates the service-list to a service-policy to enforce it in ingress or egress direction. It then applies the service-policy to the new VLAN configuration mode. This configuration remains the same on a Cisco Catalyst Series switch in both Service Peer and SDG Agent mode.

To configure an mDNS service policy and apply it on a target VLAN in Service Peer mode, perform the following 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 in

Configures the incoming mDNS service list to classify one or more service types.

A unique service list is required to process the incoming mDNS message and the outbound response to the requesting end points.

Step 4

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

Example:

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

Checks the inbound service-list. The switch either accepts or drops the incoming mDNS service type (like Apple TV) advertisement or query matching message type.

The service list contains an implicit deny at the end.

The default message-type is any .

Note

 

Starting from Cisco IOS XE Bengaluru 17.6.1, the match all command can be configured under a service-list to accept all mDNS service-types.

Step 5

exit

Example:

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

Returns to global configuration mode.

Step 6

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

Example:

Device(config)# mdns-sd service-list VLAN100-LIST-OUT out

Configures the outgoing mDNS service list to classify one or more service types.

A unique service list is required to process the incoming mDNS message and the outbound response to the requesting end points.

Step 7

match {all | service-definition-name [message-type {any | announcement | query} ] [location-filter location-filter-name] [source-interface {mDNS-VLAN-number | mDNS-VLAN-range} ] }

Example:

Device(config-mdns-sl-out)# match APPLE-TV
Device(config-mdns-sl-out)# match PRINTER-IPPS

Checks the outgoing service-list. The switch provides a local service proxy function by responding with a matching service-type to the requesting end point. For example, the Apple-TV and Printer learned from VLAN 100 are distributed to the receiver in the same VLAN 100.

The service-list contains an implicit deny at the end.

The message-type for an outbound service list is optional.

Note

 

Starting from Cisco IOS XE Bengaluru 17.6.1, the match all command can be configured under a service-list to accept all mDNS service-types.

Step 8

exit

Example:

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

Returns to global configuration mode.

Step 9

mdns-sd service-policy service-policy-name

Example:

Device(config)# mdns-sd service-policy VLAN100-POLICY

Creates a unique mDNS service-policy.

Step 10

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

Example:

Device(config-mdns-ser-policy)# service-list VLAN100-LIST-IN in
Device(config-mdns-ser-policy)# service-list VLAN100-LIST-OUT out

Configures an mDNS service policy to associate with the service list for each direction.

Step 11

exit

Example:

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

Returns to global configuration mode.

Step 12

vlan configuration vlan-id

Example:

Device(config)# vlan configuration 100
Device(config)# vlan configuration 101-110, 200

Enables VLAN configuration for advanced service parameters. One or more VLANs can be created for the same settings.

Step 13

mdns-sd gateway

Example:

Device(config-vlan)# mdns-sd gateway

Enables the mDNS gateway on the specified VLAN IDs.

Step 14

service-policy [service-policy-name]

Example:

Device(config-vlan-mdns)# service-policy VLAN100-POLICY

Associates an mDNS service policy with the specified VLAN IDs.

Note

 

Starting from Cisco IOS XE Bengaluru 17.6.1, if no service policy is configured, the default service policy is used.

Step 15

end

Example:

Device(config-vlan-mdns)# end

Returns to privileged EXEC mode.

(Optional) Configuring mDNS Location-Group on Service Peer

A Cisco Catalyst Series switch in service-peer mode provides granular mDNS service-routing based by assigning Location-Group ID tags to its Wired LAN Ports. You can expand policy capabilities with inclusion of matching Location-Group ID tag to discover and distribute mDNS services. You can design and build Location-Group tag based dynamic mDNS service boundaries at micro-segmented service-zones on each floor.

To enable mDNS location-group on service peer, perform the following 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 location-group location-group-id vlan vlan-id

Example:

Device(config)# mdns-sd location-group 1 vlan 100

Configures a location-group tag to a VLAN

Step 4

interface interface-name

Example:

Device(config-vlan)# interface gigabitethernet 1/0/1

Assigns location-group tag to individual or group of Ethernet ports.

Step 5

end

Example:

Device(config-vlan)# end

Returns to privileged EXEC mode.

Configuring mDNS Location-Filter

A Cisco Catalyst Series switch in Unicast network mode provides, by default, a local service proxy between the mDNS service provider and the receiver connected in the same Layer 2 VLAN. Also, you can configure the mDNS location filter to allow service discovery and distribution between locally configured VLAN IDs. The configuration remains the same for both Service Peer and SDG Agent modes.

To enable the local service proxy on the switch to discover mDNS services between local VLANs, perform the following 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 location-filter location-filter-name

Example:

Device(config)# mdns-sd  location-filter LOCAL-PROXY

Configures a unique location filter.

Step 4

match location-group {all | default | ID} vlan vlan-id

Example:

Device(config-mdns-loc-filter)# match location-group default vlan 100
Device(config-mdns-loc-filter)# match location-group default vlan 101

Configures the match criteria that mutually distribute permitted services between grouped VLANs.

Step 5

exit

Example:

Device(config-mdns-loc-filter)# exit

Returns to global configuration mode.

Step 6

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

Example:

Device(config)# mdns-sd service-list VLAN100-LIST-IN in
Device(config)# mdns-sd service-list VLAN100-LIST-OUT out

Configures the mDNS service list to classify one or more service types.

A unique service list is required to process the incoming mDNS message and the outbound response to the requesting end points.

Step 7

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

Example:

Device(config-mdns-sl-out)# match APPLE-TV location-filter LOCAL-PROXY

Checks the outgoing service-list. The switch provides a local service proxy function by responding with a matching service-type to the requesting end point. For example, the Apple-TV and Printer learned from VLAN 100 are distributed to the receiver on different VLAN 101.

The service-list contains an implicit deny at the end.

The message-type for an outbound service list is optional.

Note

 

Starting from Cisco IOS XE Bengaluru 17.6.1, the match all command can be configured under a service-list to accept all mDNS service-types.

Step 8

exit

Example:

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

Returns to global configuration mode.

Step 9

mdns-sd service-policy service-policy-name

Example:

Device(config)# mdns-sd service-policy VLAN100-POLICY

Creates a unique mDNS service-policy.

Step 10

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

Example:

Device(config-mdns-ser-policy)# service-list VLAN100-LIST-OUT out

Configures an mDNS service-policy to associate with the service-list for each direction.

Step 11

exit

Example:

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

Returns to global configuration mode.

Step 12

vlan configuration vlan-id

Example:

Device(config)# vlan configuration 100
Device(config)# vlan configuration 101-110, 200

Enables VLAN configuration for advanced service parameters. One or more VLANs can be created for the same settings.

Step 13

mdns-sd gateway

Example:

Device(config-vlan)# mdns-sd gateway

Enables the mDNS gateway on the specified VLAN IDs.

Step 14

service-policy [service-policy-name]

Example:

Device(config)# service-policy VLAN100-POLICY

Associates an mDNS service-policy with the specified VLAN IDs.

Note

 

Starting from Cisco IOS XE Bengaluru 17.6.1, configuring a service policy name is optional. If no service policy is configured, then the default service policy is used.

Step 15

end

Example:

Device(config)# end

Returns to privileged EXEC mode.

(Optional) Configuring Custom Service Definition

Cisco IOS XE supports various built-in mDNS service definition types that map the key mDNS PTR records to user-friendly names. For example, a built-in Apple-TV service type is associated with _airplay._tcp.local and _raop._tcp.local PTR records to successfully enable the service in the network. You can create custom service-definitions with matching mDNS PTR records to enable mDNS service-routing in the network.

To create a custom service definition, associate it with the service list and discover mDNS services between local VLANs, perform the following 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-definition service-definition-name

Example:

Device(config)# mdns-sd  service-definition APPLE-CLASSROOM

Configures a unique location filter.

Step 4

service-type service-type-string

Example:

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

Configures two or more local VLANs and mutually distributes permitted services between the grouped VLANs.

Step 5

end

Example:

Device(config)# end

Returns to privileged EXEC mode.

Configuring Service-Routing on Service Peer

The Layer 2 Cisco Catalyst switch in service-peer mode builds service-routing with an upstream distribution-layer switch in SDG Agent mode. To build service-routing the Layer 2 Cisco Catalyst switch requires at least one interface with valid IP address to reach upstream SDG Agent Catalyst switch. The switch management port is unsupported.

To enable service routing on a Cisco Catalyst Series switch in service-peer mode and configure mDNS trust interface settings, perform the following steps:

Before you begin

The mdns-sd trust command must be enabled on the interface that is configured between the Service Peer and SDG agent.

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

vlan configuration vlan-id

Example:

Device(config)# vlan configuration 100
Device(config)# vlan configuration 101-110, 200

Enables VLAN configuration for advanced service parameters. One or more VLANs can be created for the same settings.

Step 4

mdns-sd gateway

Example:

Device(config-vlan)# mdns-sd gateway

Enables the mDNS gateway on the specified VLAN IDs.

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

  • active-query timer [ min] : Enables refresh of discovered services and their records with a periodic mDNS query message for the permitted service types. The value ranges from 1 to 120 minutes.

    Note

     

    Starting from Cisco IOS XE Bengaluru 17.6.1, the following changes are applicable for the active-query timer command:

    • The unit of measurement for the timer is changed to minutes from seconds.

    • This command can also be configured globally on the Layer 2 switch in addition to a VLAN. The VLAN configuration for this command takes precedence over the global configuration.

  • service-policy: Creates a unique mDNS service-policy.

  • transport { ipv4| ipv6| both} : Permits processing for IPv4 traffic, IPv6 traffic, or both.

    We recommend that you add only one network type to reduce redundant processing and avoid responses with same information over two network types.

    The default value is ipv4 .

Step 5

end

Example:

Device(config-vlan-mdns-sd)# end

Returns to privileged EXEC mode.

Configuring Service-Routing on Service Discovery Gateway

Cisco Catalyst 9000 Series switches at the distribution layer support SDG Agent mode. SDG Agent mode enables the unicast mode of Bonjour service-routing with downstream Layer 2 access layer Ethernet switches and Cisco Catalyst 9800 Series WLCs.

To enable policy-based service discovery and distribution between locally paired service peers network devices, perform the following steps:


Note


Configure the mDNS service policy as described in Configuring mDNS Service Policy.


Before you begin

The mdns-sd trust command must be enabled on the interface configured between the Service Peer and SDG agent.

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-peer group

Example:

Device(config)# mdns-sd service-peer group

Configures a unique Service Peer group.

Step 4

peer-group group-id

Example:

Device(config-mdns-svc-peer)# peer-group 1

Assigns a unique peer group ID to pair the Service Peers that permit mDNS service discovery and allows distribution within assigned group list.

The allowed peer group range is 1 to 1000 for every SDG Agent switch.

Step 5

service-policy service-policy

Example:

Device(config-mdns-svc-peer)# service-policy VLAN100-POLICY

Filters services based on configured service policy.

If custom service policy is configured under the service peer group, then SDG agent applies filters based on the custom service policy.

If a custom service policy is not configured, the SDG agent applies filters based on the default service policy.

Step 6

service-peer [ipv4-address] location-group {all | default | id}

Example:

Device(config-mdns-svc-peer-grp)# service-peer 10.0.0.1 location-group default
Device(config-mdns-svc-peer-grp)# service-peer 10.0.0.2 location-group default

Configures at least one Service Peer to accept mDNS service advertisement or query message. When grouped with more than one Service Peers, the SDG Agent provides Layer 2 unicast mode routing between the configured peers.

For example, the SDG Agent provides unicast-based service gateway function between the two Layer 2 service peer switches (10.0.0.1 and 10.0.0.2) that match the associated service policy.

Step 7

end

Example:

Device(config)# end

Returns to privileged EXEC mode.

(Optional) Configuring HSRP-aware mDNS Service-Routing Support on SDG Agent

To configure HSRP-aware mDNS Service-Routing support on SDG agent, perform the following 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 Layer 2 switch and enters mDNS gateway configuration mode.

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

  • active-query timer [min]: Enables refresh of discovered services and their records with a periodic mDNS query message for the permitted service types. The value ranges from 1 to 120 minutes.

    Note

     

    Starting from Cisco IOS XE Bengaluru 17.6.1, the active-query timer command can be configured globally in Service-Peer for multilayer networks and in SDG agent for routed access networks.

  • air-print-helper: Enables communication between Apple iOS devices like iPhones and iPads to discover and use older printers that do not support driverless AirPrint function.

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

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

  • service-announcement-count: Configures maximum service announcement count per scheduler to upstream SDG-Agent or Cisco DNA Center controller. Service advertisement count ranges from 10 to 500.

  • service-announcement-timer periodicity: Configures service advertisement time scheduler in seconds to upstream SDG-Agent or Cisco DNA Center controller. The value ranges from 5 to 36000 seconds.

  • service-query-count: Configures maximum service query request count per scheduler to upstream SDG-Agent or Cisco DNA Center controller. The value ranges from 10 to 500 service query count.

  • service-query-timer periodicity: Configures service query request time scheduler in seconds to upstream SDG-Agent or Cisco DNA Center controller. The value ranges from 5 to 36000 seconds.

  • service-mdns-query {ptr|srv|txt}: Permits processing a specific query type.

    The default value is ptr .

    Note

     

    Starting from Cisco IOS XE Bengaluru 17.6.1, the service-mdns-query command can be configured globally on the Layer 2 switch.

Step 4

source interface interface-id

Example:

Device(config-mdns-sd)# source-interface vlan 4094

Selects the interface with a valid IP address that sources the service-routing session with the upstream Cisco Catalyst SDG Agent switch.

Typically, the management VLAN interface is used.

Step 5

exit

Example:

Device(config-mdns-sd)# exit

Returns to global configuration mode.

Step 6

interface interface-name

Example:

Device(config)# interface vlan 101

Enters interface mDNS configuration mode and enables interface configuration.

Step 7

ip address ip-address subnet-mask

Example:

Device(config-if)# ip address 10.0.1.1 255.255.255.0

Specifies an IP address for an interface.

Step 8

standby group-number ip ip-address

Example:

Device(config-if)# standby 1 ip 10.1.1.254

Creates (or enable) the HSRP group using its number and virtual IP address.

  • group-number: The group number on the interface for which HSRP is being enabled. The range is 0 to 255; the default is 0.

  • ip-address: The virtual IP address of the first hop SDG agent interface. You must enter the virtual IP address for at least one of the interfaces; it can be learned on the other interfaces.

Step 9

standby group-number priority priority

Example:

Device(config-if)# standby 1 priority 110

Sets a priority value that is used in choosing the active SDG agent. The range is 1 to 255; the default priority is 100. The highest number represents the highest priority.

Step 10

standby group-number preempt [delay [minimum seconds] [reload seconds] [sync seconds]

Example:

Device(config-if)# standby 1 preempt delay 300

Configures the router to preempt, which means that when the local router has a higher priority than the active router, it becomes the active router.

  • group-number: The group number to which the command applies.

  • (Optional) delay minimum: Set to cause the local router to postpone taking over the active role for the number of seconds shown. The range is 0 to 3600 seconds (1 hour); the default is 0 (no delay before taking over).

  • (Optional) delay reload: Set to cause the local router to postpone taking over the active role after a reload for the number of seconds shown. The range is 0 to 3600 seconds (1 hour); the default is 0 (no delay before taking over after a reload).

  • (Optional) delay sync: Set to cause the local router to postpone taking over the active role so that IP redundancy clients can reply (either with an ok or wait reply) for the number of seconds shown. The range is 0 to 3600 seconds (1 hour); the default is 0 (no delay before taking over).

Use the no form of the command to restore the default values.

Step 11

end

Example:

Device(config-if)# end

Returns to privileged EXEC mode.

Verifying Local Area Bonjour in Unicast Mode for LAN Networks

This section provides information about verifying Local Area Bonjour in unicast mode for both Service Peer and SDG Agent modes.

Verifying a Service Peer Catalyst Switch in Local Area Bonjour Domain

The following show commands are used to verify the various Local Area Bonjour domain mDNS service configuration parameters, cache records, statistics, and other information on a Cisco Catalyst Series switch configured in Service Peer mode.

Table 1. Commands to Verify a Service Peer Catalyst Switch in Local Area Bonjour Domain

Command

Purpose

show mdns-sd cache {all | interface | invalid | mac | name | service-peer | static | type | vlan}

Displays the available mDNS cache records that support multiple variables and provides granular source details. The following variables are available:

  • all: Displays all available cache records that are discovered from multiple source connections of a system.

  • interface: Displays the available cache records that are discovered from specified Layer 3 interface.

  • invalid: Displays invalid service instances in the cache records. A service instance is invalid if one or more related mDNS record type (TXT, SRV, A, or AAAA) in the service instance is missing or expired.

  • mac: Displays the available cache records that are discovered from the specified MAC address.

  • name: Displays the available cache records based on the name of the service provider announced.

  • service-peer: Displays available cache records discovered from the specified Layer 2 Service Peer.

  • static: Displays the locally configured static mDNS cache entries.

  • type: Displays the available cache records based on the specific mDNS record type (PTR, SRV, TXT, A, or AAAA).

  • vlan: Displays the available cache records that are discovered from the specified Layer 2 VLAN ID in unicast mode.

show mdns-sd service-definition {name | type}

Displays the built-in and user-defined custom service definitions and provides the mapping from service name to mDNS PTR records.

The service definitions can be filtered by name or by type.

show mdns-sd service-list {direction | name}

Displays the configured inbound and outbound service lists that classify matching service types for a service policy.

The service lists can be filtered by name or by direction.

show mdns-sd service-peer statistics

Displays the detailed mDNS packet statistics (number of packets that are sent to and received from the client, number of packets that are sent to and received from SDG-agent, and so on) that is processed by the system, when mDNS is configured in service-peer mode.

show mdns-sd service-policy {interface | name}

Displays the list of mDNS service policies that are mapped with inbound and outbound service lists.

The service policies list can be filtered by the associated interface or by name.

show mdns-sd statistics {all | cache | debug | interface | service-list | service-policy | services | vla}

Displays the detailed mDNS statistics that are processed bidirectionally by the system on each mDNS-gateway-enabled VLAN, when mDNS is configured in unicast mode.

The keywords for the mDNS statistics provide a detailed view on the interface, policy, service list, and services.

show mdns-sd summary {interface | vlan}

Displays the brief information about mDNS gateway and the key configuration status on all VLANs and interfaces of the system.

show mdns-sd sdg service-peer summary

Displays the service-routing session information of the Service Peer and SDG agent.

Verifying a Service Discovery Gateway Agent Catalyst Switch in Local Area Bonjour Domain

See Verifying a Service Peer Catalyst Switch in Local Area Bonjour Domain for the complete list of show commands that are used to verify the various Local Area Bonjour domain mDNS service configuration parameters, cache records, statistics, and other information on a Cisco Catalyst Series switch configured in SDG Agent mode.