Configuration Examples for Cisco DNA Service for Bonjour

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:

Figure 1. Single VLAN Unicast Mode Bonjour Network

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).


Table 1. Configuring Single VLAN Unicast Mode Bonjour

Configuration Step

Sample Configuration

Step 1: Enable mDNS gateway and set the gateway mode.

!
mdns-sd gateway
 active-query timer 1
 mode service-peer
!

Step 2: Create a unique mDNS inbound policy to permit ingress AirPrint service announcement from the service provider.

!
mdns-sd service-list LOCAL-AREA-SERVICES-IN in
 match printer-ipps
!

Step 3: Create a unique mDNS outbound policy to permit egress AirPrint service response to the service receiver.

!
mdns-sd service-list LOCAL-AREA-SERVICES-OUT out
 match printer-ipps
!

Step 4: Associate the inbound and outbound service lists to a unique service-policy.

!
mdns-sd service-policy LOCAL-AREA-POLICY
 service-list LOCAL-AREA-SERVICES-IN
 service-list LOCAL-AREA-SERVICES-OUT
!

Step 5: Activate unicast mDNS gateway on VLAN 10 and associate the service-policy with advanced parameters.

!
vlan configuration 10
 mdns-sd gateway
   service-policy LOCAL-AREA-POLICY
   
!

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.

Figure 2. Multiple-VLAN Unicast Mode Bonjour Network

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).


Table 2. Configuring Multiple VLAN Unicast Mode Bonjour

Configuration Step

Sample Configuration

Step 1: Enable mDNS gateway and set the gateway mode.

!
mdns-sd gateway
 active-query timer 1
 mode service-peer
!

Step 2: Create a location filter to enable local service proxy between the grouped VLANs.

!
mdns-sd location-filter LOCAL-PROXY
 match location-group default vlan 10
 match location-group default vlan 20
!

Step 3: Create a unique mDNS inbound policy to permit ingress AirPrint service announcement from service provider.

!
mdns-sd service-list LOCAL-AREA-SERVICES-IN in
 match printer-ipps 
!

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.

!
mdns-sd service-list LOCAL-AREA-SERVICES-OUT out
 match printer-ipps location-filter LOCAL-PROXY
!

Step 5: Associate the inbound and outbound service lists to a unique service-policy.

!
mdns-sd service-policy LOCAL-AREA-POLICY
 service-list LOCAL-AREA-SERVICES-IN
 service-list LOCAL-AREA-SERVICES-OUT
!

Step 6: Activate unicast mDNS gateway on VLAN 10 and VLAN 20. Associate the service-policy with advanced parameters.

!
vlan configuration 10,20
 mdns-sd gateway
   service-policy LOCAL-AREA-POLICY
   
!

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.

Figure 3. Customized Service List and Policy in Unicast Mode for a Multilayer Network

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.

Table 3. Configuring Customized Service List and Policy in Unicast Mode for Multilayer Networks

Configuration Step

Service Peer Sample Configuration

SDG Agent Sample Configuration

Step 1: Enable mDNS gateway and set the gateway mode.

!
mdns-sd gateway
 active-query timer 1
 mode service-peer
!
!
mdns-sd gateway
 mode service-peer
!

Step 2: Create a unique mDNS inbound policy to permit ingress AirPrint service announcement from service provider.

!
mdns-sd service-list LOCAL-AREA-SERVICES-IN in
 match printer-ipps
!
!
mdns-sd service-list LOCAL-AREA-SERVICES-IN in
 match printer-ipps
!

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.

!
mdns-sd service-list LOCAL-AREA-SERVICES-OUT out
 match printer location-filter LOCAL-PROXY
!
!
mdns-sd service-list LOCAL-AREA-SERVICES-OUT out
 match printer location-filter LOCAL-PROXY
!

Step 4: Associate the inbound and outbound service lists to a unique service-policy.

!
mdns-sd service-policy LOCAL-AREA-POLICY
 service-list LOCAL-AREA-SERVICES-IN
 service-list LOCAL-AREA-SERVICES-OUT
!
!
mdns-sd service-policy LOCAL-AREA-POLICY
 service-list LOCAL-AREA-SERVICES-IN
 service-list LOCAL-AREA-SERVICES-OUT
!

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.

!
vlan configuration 10,20
 mdns-sd gateway
   service-policy LOCAL-AREA-POLICY
   source-interface vlan 4094
   sdg-agent 10.0.0.254
!
!
vlan configuration 10,20
 mdns-sd gateway
   service-policy LOCAL-AREA-POLICY
!

Step 6: Configure mDNS Trust on Layer 2 trunk port of the switches.


interface range TenG 1/0/1 – 2
 switchport mode trunk
 mdns-sd trust
!
!
interface range TenG 1/0/1 – 6
 switchport mode trunk
 mdns-sd trust
!

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.

!
mdns-sd service-peer group
 peer-group 1
 service-peer 10.0.0.1 location-group default
 service-peer 10.0.0.2 location-group default
 service-peer 10.0.0.3 location-group default
!

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.

Figure 4. Migration from mDNS Flood to Layer 2 Service-Routing Unicast Mode

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.

Table 4. Layer 2 Access Configuration and Layer 3 SDG Agent Configuration

Layer 2 Access Sample Configuration

Layer 3 SDG Agent Sample Configuration

!
interface TenG 1/1
 switchport mode trunk
 switchport trunk allowed vlan 10,4094
!
interface Vlan 4094
 description CAMPUS LAN MGMT
 ip address 10.0.1.1 255.255.255.0
 no shutdown
!
!
interface TenG 1/1
 switchport mode trunk
 switchport trunk allowed vlan 10,4094
!
interface Vlan 4094
 description CAMPUS LAN MGMT
 ip address 10.0.1.254 255.255.255.0
 no shutdown
!
mdns-sd gateway
active-query timer 1
!
mdns-sd service-list LOCAL-AREA-SERVICES-IN in
 match printer-ipps
!
mdns-sd service-list LOCAL-AREA-SERVICES-OUT out
 match printer-ipps
!
mdns-sd service-policy LOCAL-AREA-POLICY
 service-list LOCAL-AREA-SERVICES-IN
 service-list LOCAL-AREA-SERVICES-OUT
!
! mDNS Flood-based gateway
!
interface vlan 10
 mdns-sd gateway
   service-policy LOCAL-AREA-POLICY
   
!

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.

Table 5. Configuring Layer 2 Access and Layer 3 SDG Agent for Migration to Layer 2 Service-Routing 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.

!
interface TenG 1/1
 switchport mode trunk
 switchport trunk allowed vlan 10, 4094
 mdns trust
!
!
interface TenG 1/1
 switchport mode trunk
 switchport trunk allowed vlan 10, 4094
 mdns trust
!

Step 2: Configure the LAN management VLAN and assign a valid IP range.

!
interface Vlan 4094
 description CAMPUS LAN MGMT
 ip add 10.0.1.1 255.255.255.0
 no shutdown
!
!
interface Vlan 4094
 description CAMPUS LAN MGMT
 ip add 10.0.1.254 255.255.255.0
 no shutdown
!

Step 3: Enable mDNS gateway and modes at access and distribution switches.

!
mdns-sd gateway
 mode service-peer
!
!
mdns-sd gateway
 mode sdg-agent
!

Step 4: Create a unique mDNS inbound policy to permit ingress AirPrint service announcement from the service provider.

!
mdns-sd service-list LOCAL-AREA-SERVICES-IN in
 match printer-ipps
!
!
mdns-sd service-list LOCAL-AREA-SERVICES-IN in
 match printer-ipps
!

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.

!
mdns-sd service-list LOCAL-AREA-SERVICES-OUT out
 match printer-ipps
!
!
mdns-sd service-list LOCAL-AREA-SERVICES-OUT out
 match printer-ipps
!

Step 6: Associate inbound and outbound service lists to a unique service policy.

!
mdns-sd service-policy LOCAL-AREA-POLICY
 service-list LOCAL-AREA-SERVICES-IN
 service-list LOCAL-AREA-SERVICES-OUT
!
!
mdns-sd service-policy LOCAL-AREA-POLICY
 service-list LOCAL-AREA-SERVICES-IN
 service-list LOCAL-AREA-SERVICES-OUT
!

Step 7: Disable mDNS gateway from the SVI interface.

No configuration is needed.

!
interface vlan 10
 no mdns-sd gateway
!

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.

!
! mDNS Unicast based gateway
!
vlan configuration 10
 mdns-sd gateway
   service-policy LOCAL-AREA-POLICY
   active-query timer 1
   sdg-agent 10.0.0.254
   source-interface Vlan 4094
!
!
! mDNS Unicast based gateway
!
vlan configuration 10
 mdns-sd gateway
   
!

Step 9: Clear cache on the SDG Agent to remove stale entries which are learnt from the mDNS flood.

No configuration is needed.

! 
clear mdns-sd cache   
!

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.

Figure 5. Migration from mDNS Flood to Layer 3 Unicast Mode

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.

Table 6. Layer 2 Access Configuration and Layer 3 SDG Agent Configuration

Layer 2 Access Sample Configuration

Layer 3 SDG Agent Sample Configuration

!
interface TenG 1/1
 switchport mode trunk
 switchport trunk allowed vlan 10,4094
!
interface Vlan 4094
 description CAMPUS LAN MGMT
 ip address 10.0.1.1 255.255.255.0
 no shutdown
!
!
interface TenG 1/1
 switchport mode trunk
 switchport trunk allowed vlan 10,4094
!
interface Vlan 4094
 description CAMPUS LAN MGMT
 ip address 10.0.1.254 255.255.255.0
 no shutdown
!
mdns-sd gateway
active-query timer 1
!
mdns-sd service-list LOCAL-AREA-SERVICES-IN in
 match printer-ipps
!
mdns-sd service-list LOCAL-AREA-SERVICES-OUT out
 match printer-ipps
!
mdns-sd service-policy LOCAL-AREA-POLICY
 service-list LOCAL-AREA-SERVICES-IN
 service-list LOCAL-AREA-SERVICES-OUT
!
! mDNS Flood-based gateway
!
interface vlan 10
 mdns-sd gateway
   service-policy LOCAL-AREA-POLICY
   
!

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.

Table 7. Configuring Layer 2 Access and Layer 3 SDG Agent for Migration to Layer 3 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.

!
mdns-sd gateway
 active-query timer 1
 mode sdg-agent
!

Step 2: Create a unique mDNS inbound policy to permit ingress AirPrint service announcement from the service provider.

!
mdns-sd service-list LOCAL-AREA-SERVICES-IN in
 match printer-ipps
!

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.

!
mdns-sd service-list LOCAL-AREA-SERVICES-OUT out
 match printer-ipps
!

Step 4: Associate inbound and outbound service lists to a unique service policy.

!
mdns-sd service-policy LOCAL-AREA-POLICY
 service-list LOCAL-AREA-SERVICES-IN
 service-list LOCAL-AREA-SERVICES-OUT
!

Step 5: Disable mDNS gateway from the SVI interface.

!!
interface vlan 10
 no mdns-sd gateway
!

Step 6: Enable a unicast-based mDNS gateway on VLAN 10. Associate the service policy with advanced parameters.

!
! mDNS Unicast based gateway
!
vlan configuration 10
 mdns-sd gateway
   service-policy LOCAL-AREA-POLICY
   
!
source-interface vlan 4094
!