Configuration Examples for Local Area Bonjour in Unicast Mode for LAN Networks
This section provides configuration examples for Local Area Bonjour Domain in unicast mode.
Example: Single-VLAN Unicast Mode Bonjour
This example provides a sample configuration to implement Local Area Bonjour for single-VLAN unicast mode on an access layer switch. The following figure illustrates a single-VLAN unicast mode Bonjour network environment:
The preceding figure illustrates a multiple-VLAN unicast mode Bonjour network environment with an AirPrint-capable printer and a user computer (MacOS or Microsoft Windows). The devices are connected to an Ethernet network and are part of a common Layer 2 VLAN. Once you configure the devices using the following sample configuration, the user computer can dynamically discover the printer using Layer 2 unicast and policy.
Note |
The sample configuration provided in this section can be applied on an access layer switch deployed as a Service-Peer (Layer 2 access) or as an SDG Agent (Layer 3 access). |
Configuration Step |
Sample Configuration |
---|---|
Step 1: Enable mDNS gateway and set the gateway mode. |
|
Step 2: Create a unique mDNS inbound policy to permit ingress AirPrint service announcement from the service provider. |
|
Step 3: Create a unique mDNS outbound policy to permit egress AirPrint service response to the service receiver. |
|
Step 4: Associate the inbound and outbound service lists to a unique service-policy. |
|
Step 5: Activate unicast mDNS gateway on VLAN 10 and associate the service-policy with advanced parameters. |
|
Verifying Single VLAN Unicast Mode Bonjour
Sample outputs for the following show commands on a Cisco Catalyst Series switch in Service Peer mode show the operational status after the discovery of AirPrint service from the local network:
Device# show mdns-sd summary vlan 10
VLAN : 10
==========================================
mDNS Gateway : Enabled
mDNS Service Policy : LOCAL-AREA-POLICY
Active Query : Enabled
: Periodicity 3600 Seconds
Transport Type : IPv4
Service Instance Suffix . : Not-Configured
mDNS Query Type : ALL
SDG Agent IP : 10.0.1.254
Source Interface : Vlan4094
Device#
Device# show mdns-sd service-policy name LOCAL-AREA-POLICY
Service Policy Name Service List IN Name Service List Out Name
===============================================================================
LOCAL-AREA-POLICY LOCAL-AREA-SERVICES-IN LOCAL-AREA-SERVICES-OUT
Device#
Device# show mdns-sd cache vlan 10
<NAME> TYPE TTL/Remaining Vlan-Id/If-name Mac Address <RR Record Data>
_universal._sub._ipp._tcp.local PTR 4500/4486 Vl10 ac18.2651.03fe Bldg-1-FL1-PRN._ipp._tcp.local
_ipp._tcp.local PTR 4500/4486 Vl10 ac18.2651.03fe Bldg-1-FL1-PRN._ipp._tcp.local
Bldg-1-FL1-PRN._ipp._tcp.local SRV 4500/4486 Vl10 ac18.2651.03fe 0 0 631 Bldg-1-FL1-PRN.local
Bldg-1-FL1-PRN.local A 4500/4486 Vl10 ac18.2651.03fe 10.153.1.1
Bldg-1-FL1-PRN.local AAAA 4500/4486 Vl10 ac18.2651.03fe 2001:10:153:1:79:A40C:6BEE:AEEC
Bldg-1-FL1-PRN._ipp._tcp.local TXT 4500/4486 Vl10 ac18.2651.03fe (451)'txtvers=1''priority=30''ty=EPSON WF-3620 Series''usb_MFG=EPSON''usb_MDL=W~'~
Device#
Device# show mdns-sd statistics vlan 10
mDNS Statistics
Vl10:
mDNS packets sent : 612
IPv4 sent : 612
IPv4 advertisements sent : 0
IPv4 queries sent : 612
IPv6 sent : 0
IPv6 advertisements sent : 0
IPv6 queries sent : 0
Unicast sent : 0
mDNS packets rate limited : 0
mDNS packets received : 42
advertisements received : 28
queries received : 14
IPv4 received : 42
IPv4 advertisements received : 28
IPv4 queries received : 14
IPv6 received : 0
IPv6 advertisements received : 0
IPv6 queries received : 0
mDNS packets dropped : 0
=========================================
Query Type : Count
=========================================
PTR : 12
SRV : 0
A : 0
AAAA : 0
TXT : 0
ANY : 3
=================================================
PTR Name Advertisement Query
=================================================
_ipp._tcp.local 9 4
Device#
Example: Multiple-VLAN Unicast Mode Bonjour
This example provides a sample configuration to implement Local Area Bonjour for multilpe-VLAN unicast mode on an access layer switch.
The preceding figure illustrates a multiple-VLAN unicast mode Bonjour network environment with an AirPrint-capable printer and a user computer (MacOS or Microsoft Windows). The devices are connected to an Ethernet network and are part of different Layer 2 VLANs for the same Ethernet switch. Once you configure the devices using the following sample configuration, the user computer can dynamically discover the printer using Layer 2 unicast and policy between the different VLANs.
Note |
The sample configuration provided in this section can be applied on an access layer switch deployed as a Service-Peer (Layer 2 access) or as an SDG Agent (Layer 3 access). |
Configuration Step |
Sample Configuration |
---|---|
Step 1: Enable mDNS gateway and set the gateway mode. |
|
Step 2: Create a location filter to enable local service proxy between the grouped VLANs. |
|
Step 3: Create a unique mDNS inbound policy to permit ingress AirPrint service announcement from service provider. |
|
Step 4: Create a unique mDNS outbound policy to permit egress AirPrint service response to the service receiver. Associate the location filter to share AirPrint service information from grouped VLAN. |
|
Step 5: Associate the inbound and outbound service lists to a unique service-policy. |
|
Step 6: Activate unicast mDNS gateway on VLAN 10 and VLAN 20. Associate the service-policy with advanced parameters. |
|
Verifying Multiple VLAN Unicast Mode Bonjour
Sample outputs for the following show commands on a Cisco Catalyst Series switch in Service Peer mode show the operational status after the discovery of AirPrint service from the local network:
Device# show mdns-sd summary vlan 10
VLAN : 10
==========================================
mDNS Gateway : Enabled
mDNS Service Policy : LOCAL-AREA-POLICY
Active Query : Enabled
: Periodicity 3600 Seconds
Transport Type : IPv4
Service Instance Suffix : Not-Configured
mDNS Query Type : ALL
SDG Agent IP : 10.0.1.254
Source Interface : Vlan4094
Device#
Device# show mdns-sd summary vlan 20
VLAN : 20
==========================================
mDNS Gateway : Enabled
mDNS Service Policy : LOCAL-AREA-POLICY
Active Query : Enabled
: Periodicity 3600 Seconds
Transport Type : IPv4
Service Instance Suffix : Not-Configured
mDNS Query Type : ALL
SDG Agent IP : 10.0.1.254
Source Interface : Vlan4094
Device#
Device# show mdns-sd service-policy name LOCAL-AREA-POLICY
Service Policy Name Service List IN Name Service List Out Name
===============================================================================
LOCAL-AREA-POLICY LOCAL-AREA-SERVICES-IN LOCAL-AREA-SERVICES-OUT
Device#
Device# show mdns-sd cache vlan 10
<NAME> <TYPE> <TTL>/Remaining Vlan-Id/If-name Mac Address <RR Record Data>
_universal._sub._ipp._tcp.local PTR 4500/4486 Vl10 ac18.2651.03fe Bldg-1-FL1-PRN._ipp._tcp.local
_ipp._tcp.local PTR 4500/4486 Vl10 ac18.2651.03fe Bldg-1-FL1-PRN._ipp._tcp.local
Bldg-1-FL1-PRN._ipp._tcp.local SRV 4500/4486 Vl10 ac18.2651.03fe 0 0 631 Bldg-1-FL1-PRN.local
Bldg-1-FL1-PRN.local A 4500/4486 Vl10 ac18.2651.03fe 10.153.1.1
Bldg-1-FL1-PRN.local AAAA 4500/4486 Vl10 ac18.2651.03fe 2001:10:153:1:79:A40C:6BEE:AEEC
Bldg-1-FL1-PRN._ipp._tcp.local TXT 4500/4486 Vl10 ac18.2651.03fe (451)'txtvers=1''priority=30''ty=EPSON WF-3620 Series''usb_MFG=EPSON''usb_MDL=W~'~
Device#
Device# show mdns-sd statistics vlan 10
mDNS Statistics
Vl10:
mDNS packets sent : 612
IPv4 sent : 612
IPv4 advertisements sent : 0
IPv4 queries sent : 612
IPv6 sent : 0
IPv6 advertisements sent : 0
IPv6 queries sent : 0
Unicast sent : 0
mDNS packets rate limited : 0
mDNS packets received : 42
advertisements received : 28
queries received : 14
IPv4 received : 42
IPv4 advertisements received: 28
IPv4 queries received : 14
IPv6 received : 0
IPv6 advertisements received: 0
IPv6 queries received : 0
mDNS packets dropped : 0
=========================================
Query Type : Count
=========================================
PTR : 2
SRV : 0
A : 0
AAAA : 0
TXT : 0
ANY : 3
=================================================
PTR Name Advertisement Query
=================================================
_ipp._tcp.local 21 0
Device#
Example: Configuring Customized Service List and Policy in Unicast Mode for Multilayer Networks
This example provides a sample configuration to implement Local Area Bonjour in unicast mode service-routing for a multilayer network. The network has Layer 2 access switches and Layer 2 or Layer 3 boundary at distribution. The mDNS gateway mode on the Layer 2 access switches must be configured as Service Peers. The distribution layer switch gets configured in SDG Agent mode by default once you activate the mDNS gateway on the specified VLANs. The mDNS service discovery and distribution is extended using an IPv4-based service-routing protocol, instead of the Layer 2 mDNS flood-n-learn over the Layer 2 trunk ports.
The preceding figure illustrates a VLAN unicast mode Bonjour network environment. The network has an AirPrint-capable printer connected in VLAN-10 of SP-1 switch. User-1 computer is connected in same VLAN 10 of SP-2. User-2 computer is connected to a different VLAN 20 of SP-3. Once you configure the devices using the following sample configuration, the user computers can dynamically discover the printer using Layer 2 unicast and policy on same and different VLAN IDs across the Layer 2 network.
Configuration Step |
Service Peer Sample Configuration |
SDG Agent Sample Configuration |
---|---|---|
Step 1: Enable mDNS gateway and set the gateway mode. |
|
|
Step 2: Create a unique mDNS inbound policy to permit ingress AirPrint service announcement from service provider. |
|
|
Step 3: Create a unique mDNS outbound policy to permit egress AirPrint service response to the service receiver. Associate the location filter to share AirPrint service information from the grouped VLAN. |
|
|
Step 4: Associate the inbound and outbound service lists to a unique service-policy. |
|
|
Step 5: Activate unicast mDNS gateway on VLAN 10 and VLAN 20. Associate the service-policy with advanced parameters. Configure the SDG-Agent IP address and the source interface on Service Peer to enable service-routing. No additional configuration required on SDG-Agent. |
|
|
Step 6: Configure mDNS Trust on Layer 2 trunk port of the switches. |
|
|
Step 7: Configure service peer-group on the SDG Agent distribution switch and enable service-routing between the assigned Service Peer switch group. |
No configuration is needed. |
|
Verifying Customized Service List and Policy in Unicast Mode for Multilayer Networks
Sample outputs for the following show commands on a Cisco Catalyst Series switch show the operational status after the discovery of AirPrint service from the local network:
Device# show mdns-sd summary vlan 10
VLAN : 10
==========================================
mDNS Gateway : Enabled
mDNS Service Policy : LOCAL-AREA-POLICY
Active Query : Enabled
: Periodicity 3600 Seconds
Transport Type : IPv4
Service Instance Suffix : Not-Configured
mDNS Query Type : ALL
SDG Agent IP : 10.0.1.254
Source Interface : Vlan4094
Device#
Device# show mdns-sd summary vlan 20
VLAN : 20
==========================================
mDNS Gateway : Enabled
mDNS Service Policy : LOCAL-AREA-POLICY
Active Query : Enabled
: Periodicity 3600 Seconds
Transport Type : IPv4
Service Instance Suffix : Not-Configured
mDNS Query Type : ALL
SDG Agent IP : 10.0.1.254
Source Interface : Vlan4094
Device#
Device# show mdns-sd service-policy name LOCAL-AREA-POLICY
Service Policy Name Service List IN Name Service List Out Name
===============================================================================
LOCAL-AREA-POLICY LOCAL-AREA-SERVICES-IN LOCAL-AREA-SERVICES-OUT
Device#
Device# show mdns-sd cache vlan 10
<NAME> <TYPE> <TTL>/Remaining Vlan-Id/If-name Mac Address <RR Record Data>
_universal._sub._ipp._tcp.local PTR 4500/4486 Vl10 ac18.2651.03fe Bldg-1-FL1-PRN._ipp._tcp.local
_ipp._tcp.local PTR 4500/4486 Vl10 ac18.2651.03fe Bldg-1-FL1-PRN._ipp._tcp.local
Bldg-1-FL1-PRN._ipp._tcp.local SRV 4500/4486 Vl10 ac18.2651.03fe 0 0 631 Bldg-1-FL1-PRN.local
Bldg-1-FL1-PRN.local A 4500/4486 Vl10 ac18.2651.03fe 10.153.1.1
Bldg-1-FL1-PRN.local AAAA 4500/4486 Vl10 ac18.2651.03fe 2001:10:153:1:79:A40C:6BEE:AEEC
Bldg-1-FL1-PRN._ipp._tcp.local TXT 4500/4486 Vl10 ac18.2651.03fe (451)'txtvers=1''priority=30''ty=EPSON WF-3620 Series''usb_MFG=EPSON''usb_MDL=W~'~
Device#
Device# show mdns-sd statistics vlan 10
mDNS Statistics
Vl10:
mDNS packets sent : 612
IPv4 sent : 612
IPv4 advertisements sent : 0
IPv4 queries sent : 612
IPv6 sent : 0
IPv6 advertisements sent : 0
IPv6 queries sent : 0
Unicast sent : 0
mDNS packets rate limited : 0
mDNS packets received : 42
advertisements received : 28
queries received : 14
IPv4 received : 42
IPv4 advertisements received : 28
IPv4 queries received : 14
IPv6 received : 0
IPv6 advertisements received : 0
IPv6 queries received : 0
mDNS packets dropped : 0
=========================================
Query Type : Count
=========================================
PTR : 2
SRV : 0
A : 0
AAAA : 0
TXT : 0
ANY : 3
=================================================
PTR Name Advertisement Query
=================================================
_ipp._tcp.local 21 0
Device#
Device# show mdns-sd summary vlan 10
VLAN : 10
==========================================
mDNS Gateway : Enabled
mDNS Service Policy : LOCAL-AREA-POLICY
Active Query : Enabled
: Periodicity 3600 Seconds
Transport Type : IPv4
Service Instance Suffix : Not-Configured
mDNS Query Type : ALL
SDG Agent IP : 10.0.1.254
Source Interface : Vlan4094
Device#
Device# show mdns-sd summary vlan 20
VLAN : 20
==========================================
mDNS Gateway : Enabled
mDNS Service Policy : LOCAL-AREA-POLICY
Active Query : Enabled
: Periodicity 3600 Seconds
Transport Type : IPv4
Service Instance Suffix : Not-Configured
mDNS Query Type : ALL
SDG Agent IP : 10.0.1.254
Source Interface : Vlan4094
Device#
Device# show mdns-sd service-policy name LOCAL-AREA-POLICY
Service Policy Name Service List IN Name Service List Out Name
===============================================================================
LOCAL-AREA-POLICY LOCAL-AREA-SERVICES-IN LOCAL-AREA-SERVICES-OUT
Device#
Device# show mdns-sd sdg service-peer summary
Cache-Sync Interval: 15
Service-Peer: 40.1.1.10 Port: 10991
Uptime: 30 Hrs 24 Mins 40 secs, Cache-Sync Sent: 117
Last Cache-Sync Time: Thu Apr 16 20:50:27 2020
Service-Peer: 40.1.1.20 Port: 10991
Uptime: 31 Hrs 1 Mins 44 secs, Cache-Sync Sent: 120
Last Cache-Sync Time: Thu Apr 16 20:58:44 2020
Device# show mdns-sd sp-sdg statistics
One min, 5 mins, 1 hour
Average Input rate (pps) : 15, 5, 2
Average Output rate (pps) : 5, 14, 2
Messages received:
Query : 219
ANY query : 0
Advertisements : 10
Advertisement Withdraw : 19
Interface down : 2
Vlan down : 0
Service-peer ID change : 0
Service-peer cache clear : 0
Resync response : 0
Messages sent:
Query response : 129
ANY Query response : 0
Cache-sync : 27
Get service-instance : 0
Device#
Example: Migrating from mDNS Flood to Unicast Mode in Multilayer Networks
Prior to Cisco IOS XE Amsterdam 17.3.1 release, Layer 2 LAN switches functioned as an intermediate pass-through system between an upstream SDG Agent in distribution layer and locally attached wired mDNS end points. This example provides a sample configuration to migrate from mDNS flood to unicast mode in multilayer networks. The network has Layer 2 access switches and Layer 2 or Layer 3 boundary at distribution.
The preceding figure illustrates a sample multilayer network that provides key gateway functional difference before and after upgrading to Cisco IOS XE Amsterdam 17.3.1 release.
The following table provides sample configurations for a traditional mDNS flood-based network and a Cisco Catalyst Series switch in SDG Agent mode that operates in a Layer 2 network environment.
Layer 2 Access Sample Configuration |
Layer 3 SDG Agent Sample Configuration |
---|---|
|
|
The following table provides sample configurations for migration to a Layer 2 unicast-based network for a Cisco Catalyst switch in SDG Agent and Service Peer mode that operates in a Layer 2 network environment. The Layer 2 unicast routing functions between SDG Agent and Service Peer. Thus, no further controller-bound policy or export configuration change is required for the migration to unicast mode.
Configuration Step |
Layer 2 Access Sample Configuration |
Layer 3 SDG Agent Sample Configuration |
---|---|---|
Step 1: Enable Layer 2 Trunk mode between access and distribution switches. |
|
|
Step 2: Configure the LAN management VLAN and assign a valid IP range. |
|
|
Step 3: Enable mDNS gateway and modes at access and distribution switches. |
|
|
Step 4: Create a unique mDNS inbound policy to permit ingress AirPrint service announcement from the service provider. |
|
|
Step 5: Create a unique mDNS outbound policy to permit egress AirPrint service response to the service receiver. Associate the location filter to share AirPrint service information from the grouped VLAN. |
|
|
Step 6: Associate inbound and outbound service lists to a unique service policy. |
|
|
Step 7: Disable mDNS gateway from the SVI interface. |
No configuration is needed. |
|
Step 8: Enable a unicast-based mDNS gateway on VLAN 10. Associate the service policy with advanced parameters. Configure the SDG Agent IP address and the source interface settings on the Service Peer. |
|
|
Step 9: Clear cache on the SDG Agent to remove stale entries which are learnt from the mDNS flood. |
No configuration is needed. |
|
Example: Migrating from mDNS Flood to Unicast Mode in Routed Access Networks
Prior to Cisco IOS XE Amsterdam 17.3.1 release, a Layer 3 Access LAN switch limits the extension of mDNS flood to the upstream Layer 3 network. However, it continues to flood the incoming mDNS frames to all ports participating in a common Layer 2 broadcast domain. This example provides a sample configuration to migrate from mDNS flood to unicast mode in Layer 3 or routed access networks. The network has Layer 2 access switches and Layer 2 or Layer 3 boundary at distribution.
The preceding figure illustrates a sample routed access network that provides key gateway functional difference before and after upgrading to Cisco IOS XE Amsterdam 17.3.1 release.
The following table provides sample configurations for a traditional mDNS flood-based network and a Cisco Catalyst Series switch in SDG Agent mode that operates in a Layer 2 network environment.
Layer 2 Access Sample Configuration |
Layer 3 SDG Agent Sample Configuration |
---|---|
|
|
The following table provides sample configurations for migration to a Layer 2 unicast-based network for a Cisco Catalyst switch in SDG Agent that operates in a Layer 3 network environment. The unicast mode function is a local function on the SDG Agent. Thus, no further controller bound policy or export configuration change required for the migration to unicast mode.
Configuration Step |
Layer 2 Access Sample Configuration |
Layer 3 SDG Agent Sample Configuration |
---|---|---|
Step 1: Enable mDNS gateway and modes at access and distribution switches. |
No configuration is needed. |
|
Step 2: Create a unique mDNS inbound policy to permit ingress AirPrint service announcement from the service provider. |
|
|
Step 3: Create a unique mDNS outbound policy to permit egress AirPrint service response to the service receiver. Associate the location filter to share AirPrint service information from the grouped VLAN. |
|
|
Step 4: Associate inbound and outbound service lists to a unique service policy. |
|
|
Step 5: Disable mDNS gateway from the SVI interface. |
|
|
Step 6: Enable a unicast-based mDNS gateway on VLAN 10. Associate the service policy with advanced parameters. |
|