Details the end-to-end configuration of Local Area Bonjour in Wireless FlexConnect mode, providing step-by-step CLI-based procedures for gateway modes, service policies, location filtering, custom service definitions, service routing, wired integration, and verification methods.
Local area Bonjour for wireless FlexConnect mode is a network configuration that enables service discovery and routing across distributed wireless infrastructure by implementing Cisco Catalyst 9000 series Ethernet switches as mDNS gateways with service-peer and SDG Agent mode capabilities to build service-routing connections with upstream distribution-layer switches.
Configuration guidelines
This configuration enables service-peer and SDG Agent mode to enable service-routing with upstream distribution-layer Cisco Catalyst 9000 series switch in SDG Agent mode to build Local Area Bonjour.
Configure mDNS gateway mode (CLI)
This task enables mDNS gateway functionality on network switches to facilitate multicast DNS service discovery across network segments.
Use this procedure when you need to enable mDNS gateway and Service-Peer mode on Layer 2 access switch and SDG Agent mode on Layer 3 distribution layer switch.
Procedure
1.
enable
Example:
Device# enable
Enables privileged EXEC mode.
Enter your password, if prompted.
2.
configureterminal
Example:
Device# configure terminal
Enters global configuration mode.
3.
mdns-sd gateway
Example:
Device(config)# mdns-sd gateway
Enables mDNS on the Layer 2 Catalyst switch and enters the mDNS gateway configuration mode.
(Optional) You can configure additional parameters:
air-print-helper: Enables communication between Apple iOS devices like iPhone or iPad to discover and use older printers that does not support driverless AirPrint function.
cache-memory-max: Configures the percentage memory for cache.
service-type-enumeration: Configures service enumeration.
Note
For cache-memory-max, ingress-client, rate-limit, service-announcement-count, service-announcement-timer, service-query-count, service-query-timer, and service-type-enumeration commands, you can retain the default value of the respective parameter for general deployments. Configure a different value, if required, for a specific deployment.
4.
mode {service-peer | SDG-agent}
Example:
Device(config-mdns-sd)# mode service-peer
Device(config-mdns-sd)# mode sdg-agent
Configure mDNS gateway in one of these modes based on the system settings:
SDG-agent– Default. Enables Layer 3 distribution layer Catalyst switch in SDG Agent mode to peer with central Cisco Catalyst Center controller for Wide Area Bonjour service routing.
5.
exit
Example:
Device(config-mdns-sd)# exit
Exits mDNS gateway configuration mode.
The mDNS gateway mode is configured on the switch. The switch can now facilitate mDNS service discovery across network segments based on the configured mode.
Configure mDNS service policy (CLI)
Configure mDNS service policy to enable multicast DNS service discovery and proxy functionality on Catalyst switches, allowing service advertisement and discovery across VLANs in both Service-Peer and SDG agent modes.
You need to perform this configuration to enable mDNS service policy on Catalyst switches. This configuration is required in Service-Peer mode for Layer 2 Catalyst switches and SDG agent mode for Layer 3 Catalyst switches.
You need to perform the following to configure an mDNS service policy:
Create service-list to permit built-in or user-defined custom service types.
Associate service-list to a service-policy to enforce ingress or egress direction.
Apply the service policy to the new VLAN configuration mode.
Note
You will need this configuration in Service-Peer mode for Layer 2 Catalyst switch and SDG agent mode for Layer 3 Catalyst switch.
The figure shows how to configure mDNS policies on Catalyst switch in Service-Peer and SDG agent modes.
Figure 1. mDNS service policy configuration on Catalyst switch in Service-Peer and SDG agent modes
This procedure builds and applies service-policies on target VLAN in service-peer and SDG agent modes.
Before you begin
Follow these steps to configure mDNS service policy using CLI commands:
Procedure
1.
enable
Example:
Device# enable
Enables privileged EXEC mode.
Enter your password, if prompted.
2.
configureterminal
Example:
Device# configure terminal
Enters global configuration mode.
3.
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
Configure mDNS service-list to classify one or more service types. Unique service-list is required to process incoming mDNS message and outbound response to request locally connected wired or FlexConnect wireless end points.
4.
match service-definition-name [message-type {any | announcement | query}]
Example:
Device(config)# mdns-sd service-list VLAN100-LIST-IN in
Device(config-mdns-sl-in)# match APPLE-TV
Device(config-mdns-sl-in)# match PRINTER-IPPS message-type announcement
Matches inbound service-list.
The Catalyst switch validates to accept or drop incoming mDNS service-type (such as, Apple TV) advertisement or query matching message type from locally connected wired or FlexConnect wireless end points. The service-list contains implicit deny at the end.
The default message-type used is any.
5.
match service-definition-name [message-type {any | announcement | query}]
Example:
Device(config)# mdns-sd service-list VLAN100-LIST-OUT out
Device(config-mdns-sl-in)# match APPLE-TV
Device(config-mdns-sl-in)# match PRINTER-IPPS
Matches outbound service-list.
The Catalyst switch provides local service proxy function by responding matching service-type to the requesting end point(s). For example, the Apple-TV and Printer learnt from VLAN 100 will be distributed to FlexConnect wireless receiver in same VLAN 100. The service-list contains implicit deny at the end.
The message-type for outbound service-list is not required.
Device(config-mdns-ser-policy)# service-list VLAN100-LIST-IN in
Device(config-mdns-ser-policy)# service-list VLAN100-LIST-OUT out
Configures mDNS service-policy to associate service-list for each direction.
8.
VLAN configuration ID
Example:
Device(config)# vlan configuration 100
Enables wired or wireless FlexConnect user VLAN configuration for advanced service parameters. One or more VLANs can be created for the same settings.
Here, ID refers to the VLAN configuration ID. The range is from 101 to 110 and 200. This range allows to configure consecutive and non-consecutive VLAN ID(s).
9.
mdns-sd gateway
Example:
Device(config-vlan)# mdns-sd gateway
Enables mDNS gateway on configured wired or FlexConnect wireless user VLAN ID(s).
Associates mDNS service-policy to the configured wired or FlexConnect wireless user VLAN ID(s).
11.
exit
Example:
Device(config-vlan-mdns)# exit
Exits mDNS gateway configuration mode.
The mDNS service policy is successfully configured and applied to the specified VLAN. The Catalyst switch can now process mDNS service advertisements and queries according to the configured service lists and policy rules.
Configure mDNS Location-Filter (CLI)
Configure mDNS location-filter to enable local service proxy on Cisco Catalyst switch in Service-Peer mode and discover mDNS services between local wired and wireless FlexConnect user VLANs.
Optionally, you can configure mDNS location-filter to allow service discovery and distribution between locally configured VLAN IDs associated to FlexConnect wireless user networks.
The following figure illustrates and references location-filter policy on Catalyst switch in Service-Peer mode permitting to discover and distribute mDNS services between wired and FlexConnect wireless user VLANs.
Follow these steps to enable local service proxy on Cisco Catalyst switch in Service-Peer mode and discover mDNS services between local wired and wireless FlexConnect user VLANs:
Configures a unique location-filter in global configuration mode.
4.
match location-group {all | default | ID} 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 to mutually distribute the permitted services between grouped VLANs. For example, mDNS services can be discovered and distributed using the Unicast mode between wireless FlexConnect user VLAN ID 100 and wired user VLAN ID 101.
5.
mdns-sd service-list service-list-name {in | out}
Example:
Device(config)# mdns-sd service-list VLAN100-LIST-OUT out
Configures the mDNS service-list to classify one or more service types.
The service-list configuration is required to process any incoming or outgoing mDNS messages.
6.
match service-definition-name [message-type {any | announcement | query}]
Example:
Device(config)# mdns-sd service-list VLAN100-LIST-OUT out
Device(config-mdns-sl-out)# match APPLE-TV location-filter LOCAL-PROXY
Associates location-filter to one or more service types to enable local proxy between local VLANs. For example, the Apple-TV learnt from VLAN 100 and VLAN 101 will be distributed to receiver in VLAN 100.
Note
You do not require a message-type for the outbound service-list.
Device(config-mdns-ser-policy)# service-list VLAN100-LIST-OUT out
Configures mDNS service-policy to associate service-list for each direction.
9.
VLAN configuration ID
Example:
Device(config)# vlan configuration 100
Enables VLAN configuration for advanced service parameters. You can create one or more VLANs with the same settings.
Here, ID refers to the VLAN configuration ID. The range is from 101 to 110 and 200. This range allows to configure consecutive and non-consecutive VLAN ID(s).
Associates mDNS service-policy to the configured VLAN ID(s).
12.
exit
Example:
Device(config-vlan-mdns-sd)# exit
Exits mDNS gateway configuration mode.
mDNS location-filter is successfully configured to enable local service proxy between the specified VLANs. The mDNS services can now be discovered and distributed between wired and FlexConnect wireless user VLANs.
Configure custom service definition (CLI)
Create custom service-definition with matching mDNS PTR records to enable end mDNS service-routing in the network.
The Cisco IOS-XE supports mapping of various built-in well-known mDNS service-definition types to key mDNS PTR records and user-friendly names. For example, built-in Apple-TV service-type is associated with _airplay. _tcp.local and _raop. _tcp.local PTR records to successfully enable service in the network. Network administrators create custom service-definition with matching mDNS PTR records to enable end mDNS service-routing in the network.
Configures a regular-expression string for custom mDNS PoinTeR(PTR) record.
5.
exit
Example:
Device(config-mdns-ser-def)# exit
Exits mDNS gateway configuration mode.
The custom service-definition is configured and can be associated to the service-list to enable mDNS service-routing functionality in the network.
Configure service-routing on service-peer using CLI
Configure service-routing on a Layer 2 Cisco Catalyst switch in Service-Peer mode to establish communication with an upstream distribution-layer switch in SDG Agent mode and enable mDNS trust interface settings.
The Layer 2 Cisco Catalyst switch in Service-Peer mode builds a service-routing with an upstream distribution-layer switch in the SDG Agent mode. To build service-routing, the Layer 2 Cisco Catalyst switch requires at least one interface with valid IP address to reach the upstream SDG Agent Catalyst switch. The switch management port is unsupported.
The following figure illustrates the topology to enable unicast-based service-routing over Layer 2 trunk between access-layer Catalyst switch in the Service-Peer mode and distribution-layer Catalyst switch in SDG Agent mode.
Follow these steps to configure service-routing on Cisco Catalyst switch in Service-Peer mode and setup mDNS trust interface settings:
Procedure
1.
enable
Example:
Device# enable
Enables Privileged EXEC mode. Enter your password, if prompted.
2.
configureterminal
Example:
Device# configure terminal
Enters the global configuration mode.
3.
VLAN configuration ID
Example:
Device(config)# vlan configuration 100
Enables Wired and FlexConnect user VLAN configuration for advanced service parameters. One or more VLANs can be created for the same settings.
Here, ID refers to the VLAN configuration ID. For example, VLAN configuration 101-110, 200 range, allows to configure consecutive and non-consecutive VLAN ID(s).
4.
mdns-sd gateway
Example:
Device(config-vlan-config)# mdns-sd gateway
Enables mDNS gateway on configured VLAN ID(s).
To enable the respective functionalities, enter these commands in the mDNS gateway configuration mode:
active-query timer [sec]: Configure to enable refresh discovered services and their records with periodic mDNS Query message for permitted service types. The valid range is from 60 to 3600 seconds. The recommended value is 3600 seconds.
service-mdns-query {PTR | srv | txt}: Permits processing specific Query type. The default query type is PTR.
transport {ipv4 | ipv6 | both}: Permits processing for IPv4, IPv6, or both. It is recommended to use one network type to reduce redundant processing and respond with the same information over two network types. The default network type is IPv4.
Selects the interface with a valid IP address to source service-routing session with the upstream Cisco Catalyst SDG Agent switch. Typically, the management VLAN interface can be used.
6.
SDG-agent [IPv4_address]
Example:
Device(config-vlan-mdns-sd)# sdg-agent 10.0.0.254
Configures the SDG Agent IPv4 address, typically, the management VLAN gateway address. If FHRP mode, then use the FHRP virtual IP address of the management VLAN.
7.
exit
Example:
Device(config-vlan-mdns-sd)# exit
Exits the mDNS gateway configuration mode.
Service-routing is configured on the service-peer, establishing communication with the upstream SDG Agent switch and enabling mDNS gateway functionality on the specified VLAN.
Location-based mDNS
Location-based mDNS is a network service discovery mechanism that
enables per-switch mDNS discovery and distribution for FlexConnect wireless users attached locally to Layer 2 Catalyst switches in Service-Peer mode by default
supports user mobility across multiple Layer 2 Catalyst switches even when FlexConnect user VLANs are extended between switches, and
requires mDNS service-policy configuration on the SDG Agent to accept policy-based service provider and receiver information from downstream Service-Peer access-layer switches.
Configure the mDNS service policy on the distribution layer SDG Agent switch before proceeding to the next configuration step. For more information, see the Configuring mDNS Service Policy section.
Configure service-routing on SDG agent (CLI)
Configure service-routing on SDG agent to enable Unicast mode Bonjour service-routing with downstream Layer 2 access-layer Ethernet switches connected to FlexConnect wireless users.
The Cisco Catalyst 9000 series switches support SDG Agent mode automatically at the distribution layer and enables Unicast mode Bonjour service-routing with the downstream Layer 2 access-layer Ethernet switches connected to the FlexConnect wireless users. The SDG Agent must be configured with mDNS service-policy on wireless FlexConnect user VLAN to accept mDNS service cache from downstream Service-Peer switches.
This section provides step-by-step configuration guidelines to enable policy-based service discovery and distribution between locally paired Layer 2 access network switches in the Service-Peer mode.
The following figure illustrates unicast service-routing on SDG Agent and downstream Layer 2 access network switches in the Service-Peer mode.
Configure the mDNS service policy on the distribution layer SDG Agent switch before proceeding to the next configuration step. For more information, see the Configuring mDNS Service Policy section.
Follow these steps to enable the mDNS service policy and peer-group on SDG Agent switch, and enable Unicast mode service-routing with Layer 2 access network switches in Service-Peer mode:
Procedure
1.
enable
Example:
Device# enable
Enables privileged EXEC mode.
Enter your password, if prompted.
2.
configureterminal
Example:
Device# configure terminal
Enters global configuration mode.
3.
mdns-sd service-peer group service-peer-group-name
Example:
Device(config)# mdns-sd service-peer group group_1
Configures a unique Service-Peer group.
4.
peer-group [ID]
Example:
Device(config-mdns-svc-peer)# peer-group 1
Assigns a unique peer-group ID to the Service-Peers pair permitting mDNS service discovery and distribution within the assigned group list.
The valid peer-group range is from 1 to 1000 for each SDG Agent switch.
Configures at least one Service-Peer to accept the mDNS service advertisement or query message. When a group has 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 three (10.0.0.1 and 10.0.0.2) Layer 2 Service-Peer switches matching the associated service-policy.
The mDNS service information from the unpaired Layer 2 Service-Peer (10.0.0.3) cannot announce or receive mDNS services with the other grouped Service-Peers (10.0.0.1 and 10.0.0.2).
7.
exit
Example:
Device(config-mdns-svc-peer-grp)# exit
Exits mDNS gateway configuration mode.
The SDG Agent is configured with service-routing to enable Unicast mode service-routing with downstream Layer 2 access network switches in Service-Peer mode.
Verify local area Bonjour in service-peer mode
This section provides guidelines to verify various Local Area Bonjour domain mDNS service configuration parameters, cache records, statistics and more on the controller in service-peer mode.
Command or Action
Purpose
show mdns-sd cache {all | interface | MAC | name | service-peer | static | type | VLAN}
Displays available mDNS cache records supporting multiple variables providing granular source details received from wired or wireless FlexConnect user VLANs. The variables are as follows:
all – Displays all available cache records discovered from multiple source connections of a system.
interface – Displays available cache records discovered from the specified Layer 3 interface.
MAC - Displays available cache records discovered from the specified MAC address.
name - Displays available cache records based on the service provider announced name.
service-peer - Displays available cache records discovered from the specified Layer 2 Service-Peer.
type – Displays available cache records based on the specific mDNS record type, such as, PTR, SRV, TXT, A or AAAA.
VLAN - Displays available cache records discovered from the specified Layer 2 VLAN ID in the Unicast mode.
show mdns-sd service-definition {name | type}
Displays built-in and user-defined custom service-definition that maps service name to the mDNS PTR records. The service-definition can be filtered by name or type.
show mdns-sd service-list {direction | name}
Displays inbound or outbound direction list of configured service-list to classify matching service-types for service-policy. The list can be filtered by name or specific direction.
show mdns-sd service-policy {interface | name}
Displays list of mDNS service-policy mapped with inbound or outbound service-list. The service-policy list can be filtered by an associated specified interface or name.
Displays detailed mDNS statistics processed bi-directionally by the system on each mDNS gateway enabled VLAN configured mDNS in Unicast mode. The expanded keyword for mDNS statistics can provide detailed view on interface, policy, service-list, and services.
Note
This command displays all mDNS packets received from directly connected (Local Mode) or Flex clients in WLAN.
show mdns-sd summary {interface | VLAN}
Displays brief information about mDNS gateway and key configuration status on all wired and wireless FlexConnect user VLANs, and interfaces of the system.
Verify local area Bonjour in SDG agent mode
This section provides guidelines to verify various Local Area Bonjour domain mDNS service configuration parameters, cache records, statistics and more on the controller in SDG Agent mode
Command or Action
Purpose
show mdns-sd cache {all | interface | MAC | name | service-peer | static | type | VLAN | VRF}
Displays available mDNS cache records supporting multiple variables providing granular source details. The variables are as follows:
all – Displays all available cache records discovered from multiple source connections of a system.
interface – Displays available cache records discovered from the specified Layer 3 interface.
MAC - Displays available cache records discovered from the specified MAC address.
name - Displays available cache records based on the service provider announced name.
service-peer - Displays available cache records discovered from the specified Layer 2 Service-Peer.
type – Displays available cache records based on the specific mDNS record type, such as, PTR, SRV, TXT, A or AAAA.
VLAN - Displays available cache records discovered from the specified Layer 2 VLAN ID in the Unicast mode.
VRF - Displays per-VRF available cache records based on specific mDNS record type, i.e., PTR, SRV, TXT, A or AAAA.
show mdns-sd service-definition {name | type}
Displays built-in and user-defined custom service-definition that maps service name to the mDNS PTR records. The service-definition can be filtered by name or type.
show mdns-sd service-list {direction | name}
Displays inbound or outbound direction list of the configured service-list to classify matching service-types for service-policy. The list can be filtered by name or specific direction.
show mdns-sd service-policy {interface | name}
Displays list of mDNS service-policy mapped with inbound or outbound service-list. The service-policy list can be filtered by an associated specified interface or name.
Displays detailed mDNS statistics processed bi-directionally by the system on each mDNS gateway enabled VLAN configured mDNS in Unicast mode. The expanded keyword for mDNS statistics can provide detailed view on interface, policy, service-list, and services.
show mdns-sd summary {interface | VLAN}
Displays brief information about mDNS gateway and key configuration status on all VLANs and interfaces of the system.
Reference
Table 1.
Related Topic
Document Title
DNA Service for Bonjour Deployment on Cisco Catalyst 9600 Switch