Contents

mDNS CLI Configuration

Below is a list of commands to enable Bonjour Gateway solution on the Converged access products through CLI.

To enable mDNS gateway, issue the following CLI in global-config mode:
Service-routing mdns-sd

Creating Service Lists and Filters

Service filters are available to control the mDNS messages coming into and going out from the cache. Service filters can contain several permit or deny statements matching a certain part of the mDNS record which make up the filter. Service filters use regular expressions for string matching (e.g. service type matching or instance name matching).


Note


Service filters must be specified to allow records into and out of the cache since there is a ‘deny any’ policy installed by default. In other words, if no explicit filter policy is installed either globally or per interface, no records will make it into the cache and the cache will not answer to any queries.

Elements of a service filter are numbered and either deny or permit the service record based on a match. There is an implicit ‘deny anything’ at the end of the list.

To apply a filter for incoming and outgoing mDNS messages, issue the following CLI in global-config or interface-config mode:
service-list mdns-sd <name>{permit|deny} <sequence_number> ( from 0-100)
     match message-type {query|announcement|any}
     match service-instance <instance-name>
     match service-type <DNS service type string>
Below is an example of Service Filter, which denies service type AirPlay and allows service type AirPrint.
service-list mdns-sd Deny-AirPlay deny 10    
   match service-type _airplay._tcp.local

service-list mdns-sd Deny-AirPlay permit 20
   match service-type _ipp._tcp.local

Applying Service Policy on Interface

The service policy can be applied per interface as shown below:

Example:
interface Vlan30
 ip address 10.10.30.2 255.255.255.0
 ip helper-address 10.10.30.1
 service-routing mdns-sd
  service-policy gui-permit-all IN
  service-policy gui-permit-all OUT

To redistribute service announcements received on one interface over all the interfaces or over a specific interface, issue the following CLI on the respective interface on which you want to enable redistribution.

Example:
interface Vlan30
 ip address 10.10.30.2 255.255.255.0
 ip helper-address 10.10.30.1
 service-routing mdns-sd
  service-policy gui-permit-all IN
  service-policy gui-permit-all OUT
 redistribute mdns-sd

Enabling Active Queries

Because there are devices that do not send unsolicited announcements, and to force learning of services and keeping them refreshed in the cache, the active query feature is added which ensures that services listed in the active query list will be queried.
service-list mdns-sd <name> query
 service-type <service type string>
The service list of queries thus created can be applied under global service routing mdns-sd to start active browsing of the services as shown below:
Service-routing mdns-sd
service-policy-query <service-list name> periodicity <in seconds>

Maintenance and Troubleshooting

This section primarily consists of the various show commands and the ability to clear the cache or associated counters as outlined above. In addition, a ‘debug mdns’ command is available to debug various aspects of the SDG subsystem as shown here:
mdns-iol#debug mdns ?
  all      MDNS all debugs
  api      MDNS api enter/exit log
  error    MDNS error debugs
  event    MDNS event debugs
  packet   MDNS packet dumps debug
  verbose  MDNS Verbose debug

Show Commands

Router#show mdns cache
Shows mDNS cache records

Router#show mdns cache ?
  interface  Enter the Interface
  name       Record Name
  type       Record Type

Router#show mdns requests 
 Shows mDNS Requests Pending
  
Router#show mdns statistics all  
 Shows all mDNS stats

Router#show mdns statistics ?
  all             Displays Statistics of all
  service-list    Entire Service list details in cache
  service-policy  Show service-policy statistics

mDNS Clear Commands

Router#clear mdns ?
  cache        Clear MDNS feature
  statistics   MDNS stats

mDNS CLI Configuration

mDNS CLI Configuration

Below is a list of commands to enable Bonjour Gateway solution on the Converged access products through CLI.

To enable mDNS gateway, issue the following CLI in global-config mode:
Service-routing mdns-sd

Creating Service Lists and Filters

Service filters are available to control the mDNS messages coming into and going out from the cache. Service filters can contain several permit or deny statements matching a certain part of the mDNS record which make up the filter. Service filters use regular expressions for string matching (e.g. service type matching or instance name matching).


Note


Service filters must be specified to allow records into and out of the cache since there is a ‘deny any’ policy installed by default. In other words, if no explicit filter policy is installed either globally or per interface, no records will make it into the cache and the cache will not answer to any queries.

Elements of a service filter are numbered and either deny or permit the service record based on a match. There is an implicit ‘deny anything’ at the end of the list.

To apply a filter for incoming and outgoing mDNS messages, issue the following CLI in global-config or interface-config mode:
service-list mdns-sd <name>{permit|deny} <sequence_number> ( from 0-100)
     match message-type {query|announcement|any}
     match service-instance <instance-name>
     match service-type <DNS service type string>
Below is an example of Service Filter, which denies service type AirPlay and allows service type AirPrint.
service-list mdns-sd Deny-AirPlay deny 10    
   match service-type _airplay._tcp.local

service-list mdns-sd Deny-AirPlay permit 20
   match service-type _ipp._tcp.local

Applying Service Policy on Interface

The service policy can be applied per interface as shown below:

Example:
interface Vlan30
 ip address 10.10.30.2 255.255.255.0
 ip helper-address 10.10.30.1
 service-routing mdns-sd
  service-policy gui-permit-all IN
  service-policy gui-permit-all OUT

To redistribute service announcements received on one interface over all the interfaces or over a specific interface, issue the following CLI on the respective interface on which you want to enable redistribution.

Example:
interface Vlan30
 ip address 10.10.30.2 255.255.255.0
 ip helper-address 10.10.30.1
 service-routing mdns-sd
  service-policy gui-permit-all IN
  service-policy gui-permit-all OUT
 redistribute mdns-sd

Enabling Active Queries

Because there are devices that do not send unsolicited announcements, and to force learning of services and keeping them refreshed in the cache, the active query feature is added which ensures that services listed in the active query list will be queried.
service-list mdns-sd <name> query
 service-type <service type string>
The service list of queries thus created can be applied under global service routing mdns-sd to start active browsing of the services as shown below:
Service-routing mdns-sd
service-policy-query <service-list name> periodicity <in seconds>

Maintenance and Troubleshooting

This section primarily consists of the various show commands and the ability to clear the cache or associated counters as outlined above. In addition, a ‘debug mdns’ command is available to debug various aspects of the SDG subsystem as shown here:
mdns-iol#debug mdns ?
  all      MDNS all debugs
  api      MDNS api enter/exit log
  error    MDNS error debugs
  event    MDNS event debugs
  packet   MDNS packet dumps debug
  verbose  MDNS Verbose debug

Show Commands

Router#show mdns cache
Shows mDNS cache records

Router#show mdns cache ?
  interface  Enter the Interface
  name       Record Name
  type       Record Type

Router#show mdns requests 
 Shows mDNS Requests Pending
  
Router#show mdns statistics all  
 Shows all mDNS stats

Router#show mdns statistics ?
  all             Displays Statistics of all
  service-list    Entire Service list details in cache
  service-policy  Show service-policy statistics

mDNS Clear Commands

Router#clear mdns ?
  cache        Clear MDNS feature
  statistics   MDNS stats