IP Addressing: DNS Configuration Guide, Cisco IOS Release 15SY
Service Discovery Gateway
Downloads: This chapterpdf (PDF - 1.2MB) The complete bookPDF (PDF - 2.82MB) | The complete bookePub (ePub - 309.0KB) | Feedback

Service Discovery Gateway

Service Discovery Gateway

The Service Discovery Gateway feature enables multicast Domain Name System (mDNS) to operate across Layer 3 (L3) boundaries (different subnets). An mDNS gateway is able to provide transport for service discovery across Layer 3 boundaries by filtering, caching and redistributing services from one L3 domain (subnet) to another.

Prior to implementation of this feature, mDNS was limited in scope to within a subnet due to the use of link-local scoped multicast addresses. This feature enhances Bring Your Own Device (BYOD).

Information About Service Discovery Gateway

Sample scenario

Consider the scenario in the above image. If the mDNS gateway functionality is enabled on the router, then service information can be sent from one subnet to another and vice-versa. For example, the printer and fax service information being advertised in the network with IP address 192.0.2.6 are redistributed to the network with IP address 198.51.100.4. Ultimately, the printer and fax service information in the in the network with IP address 192.0.2.6 is learnt by mDNS-enabled hosts and devices in the other network.

Filtering

You can filter services that you want to redistribute. While creating a service–list, the permit or deny option must be used. The permit option allows you to permit/transport specific service–list information. The deny option allows you to deny service–list information that is available to be transported to other subnets. You need to mention a sequence number when using the permit or deny option. The same service–list name can be associated with multiple sequence numbers and each sequence number will be mapped to a rule.


Note


If no filters are configured, the default action is to deny service–list information to be transported through the device or interface.


Query is another option provided while creating service–lists. You can create queries using a service–list. If you want to browse for a service, then active queries can be used. This helps to keep the records refreshed in the cache.


Note


Active queries can only be used globally and cannot be used at the interface level.


A service end–point (such as, a printer, fax, and so on) sends unsolicited announcements when a service starts up. After that, it sends unsolicited announcements whenever a network change event occurs (such as, an interface coming up or going down, and so on). The device always respond to queries.

After creating a service–list and using the permit or deny option, you can filter by using match statements (commands) based on service–instance, service–type, or message–type (announcement or query).

How to Configure Service Discovery Gateway

Creating a Service-list, Applying a Filter for the Service-List and Configuring Parameters for the Service-List Name

SUMMARY STEPS

    1.    enable

    2.    configure terminal

    3.    service-list mdns-sd service-list-name {deny sequence-number | permit sequence-number | query}

    4.    match message-type {announcement | any | query } OR match service-instance {instance-name | any | query} OR match service-type mDNS-service-type-string

    5.    exit


DETAILED STEPS
      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 service-list mdns-sd service-list-name {deny sequence-number | permit sequence-number | query}


    Example:
    Device(config)# service-list mdns-sd sl1 permit 3
                    
                  Or
    
    Device(config)# service-list mdns-sd sl4 query
     
    Enters mdns service discovery service-list mode.
    • Creates a service-list and applies a filter on the service-list according to the permit or deny option applied to the sequence number.

    Or

    • Creates a service-list and associates a query for the service-list name if the query option is used.
     
    Step 4 match message-type {announcement | any | query } OR match service-instance {instance-name | any | query} OR match service-type mDNS-service-type-string


    Example:
    Do one of the following:
    Device(config-mdns-sd-sl)# match message-type announcement
    
                             OR
    
    Device(config-mdns-sd-sl)# match service-instance servInst 1
    
                             OR
    
    Device(config-mdns-sd-sl)# match service-type _ipp._tcp
     

    Use one (or more) of the following commands.

    Configures parameters for a service-list name that is created using step 3.

    Note   

    You cannot use the match command if you have used the query option in the previous step. The match command can be used only for the permit or deny option.

     
    Step 5 exit


    Example:
    Device(config-mdns-sd-sl)# exit
     

    Returns to global configuration mode.

     

    Enabling mDNS Gateway for a Device and Redistributing Services

    After enabling mDNS gateway for a device, you can apply filters (apply IN-bound filtering or OUT-bound filtering) and active queries by using service-policy and service-policy-query commands respectively. You can redistribute services and service announcements using the redistribute mdns-sd command, and set some part of the system memory for cache using the cache-memory-max command.


    Note


    Steps 4 to 7 are optional and not meant to be used in any specific order.


    SUMMARY STEPS

      1.    enable

      2.    configure terminal

      3.    service-routing mdns-sd

      4.    match service-instance service-policy-name {IN | OUT}

      5.    redistribute mdns-sd

      6.    cache-memory-max cache-config-percentage

      7.    service-policy-query service-list-query-name service-list-query-periodicity

      8.    exit


    DETAILED STEPS
        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 service-routing mdns-sd


      Example:
      Device(config)# service-routing mdns-sd
       

      Enables mDNS gateway functionality for a device and enters multicast DNS configuration (config-mdns) mode.

       
      Step 4 match service-instance service-policy-name {IN | OUT}


      Example:
      Device(config-mdns)# service-policy serv-pol1 IN
       

      For a service-list, applies a filter on incoming service discovery information (IN-bound filtering) or outgoing service discovery information (OUT-bound filtering).

       
      Step 5 redistribute mdns-sd


      Example:
      Device(config-mdns-sd-sl)# exit
       

      Returns to global configuration mode.

      Note   

      If redistribution is enabled globally, global configuration is given higher priority than interface configuration.

       
      Step 6 cache-memory-max cache-config-percentage


      Example:
      Device(config-mdns)# cache-memory-max 20
       

      Sets some part of the system memory (in percentage) for cache.

      Note   

      By default, 10% of the system memory is set aside for cache. You can override the default value by using this command.

       
      Step 7 service-policy-query service-list-query-name service-list-query-periodicity


      Example:
      Device(config-mdns)# service-policy-query sl-query1 100
       

      Configures service-list-query periodicity.

       
      Step 8 exit


      Example:
      Device(config-mdns)# exit
       

      Returns to global configuration mode.

       

      Verifying and troubleshooting Service Discovery Gateway


      Note


      The show and debug commands mentioned below are not in any specific order.


      SUMMARY STEPS

        1.    show mdns requests [detail | name record-name | type record-type [name record-name]]

        2.    show mdns cache [interface type number | name record-name[type record-type] | type recod-type]

        3.    show mdns statistics {all | service-listlist-name | service-policy {all | interface type number}}

        4.    debug mdns {all error event packet verbose}


      DETAILED STEPS
        Step 1   show mdns requests [detail | name record-name | type record-type [name record-name]]


        Example:
        Device# show mdns requests detail
        
        MDNS Outstanding Requests
        ======================================================
        Request name  :   _ipp._tcp.local
        Request type  :   PTR
        Request class :   IN
        

        This command displays information for outstanding mDNS requests, including record name and record type information.

        Step 2   show mdns cache [interface type number | name record-name[type record-type] | type recod-type]


        Example:
        Device# show mdns cache  
        
        mDNS CACHE
        =================================================================================================================================
        [<NAME>]                                             [<TYPE>][<CLASS>] [<TTL>/Remaining] [Accessed] [If-index] [<RR Record Data>]
        
        
        _services._dns-sd._udp.local                            PTR     IN      4500/4496               0       3       _ipp._tcp.local
        
        _ipp._tcp.local                                         PTR     IN      4500/4496               1       3       printer1._ipp._tcp.local
        
        printer1._ipp._tcp.local                                SRV     IN      120/116         1       3       0       0       5678    smuchala-WS.local
        
        printer1._ipp._tcp.local                                TXT     IN      4500/4496               1       3       (1)''
        
        smuchala-WS.local                                       A       IN      120/116         1       3       192.168.183.1
        

        This command displays mDNS cache information.

        Step 3   show mdns statistics {all | service-listlist-name | service-policy {all | interface type number}}


        Example:
        Device# show mdns statistics all
        
        mDNS Statistics
         mDNS packets sent       : 0
         mDNS packets received   : 31
         mDNS packets dropped    : 8
         mDNS cache memory in use: 64264(bytes)
        

        This command displays mDNS statistics.

        Step 4   debug mdns {all error event packet verbose}


        Example:
        Device# debug mdns
        

        This command enables all mDNS debugging flows.


        Configuration Examples for Service Discovery Gateway

        Example: Creating a Service-List, Applying a Filter for the Service-List and Configuring Parameters for the Service-List Name

        The following example shows creation of a service-list sl1. The permit option is being applied on sequence number 3 and all services with message-type announcement are filtered and available for transport across various subnets associated with the device.

        Device(config)# service-list mdns-sd sl1 permit 3
        Device(config-mdns-sd-sl)# match message-type announcement
        Device(config-mdns)# exit
        

        Example: Enabling Mdns Gateway for a Device and Redistributing Services

        The following example shows how to enable an mDNS gateway for a device and enable redistribution of services across subnets. IN-bound filtering is applied on the service-list serv-pol1. 20% of system memory is made available for cache and service-list-query periodicity is configured at 100 seconds.

        Device(config)# service-routing mdns-sd
        Device(config-mdns)# service-policy serv-pol1 IN
        Device(config-mdns)# redistribute mdns-sd
        Device(config-mdns)# cache-memory-max 20
        Device(config-mdns)# service-policy-query sl-query1 100
        Device(config-mdns)# exit
        
        

        Additional References for Service Discovery Gateway

        Related Documents

        Related Topic Document Title

        Master Command List

        Cisco IOS Master Command List

        IP Addressing Services Command Reference

        Cisco IOS IP Addressing Services Command Reference

        Configuring DNS

        IP Addressing: DNS Configuration Guide

        DNS conceptual information

        “Information About DNS” section in IP Addressing: DNS Configuration Guide

        Standards and RFCs

        Standard/RFC Title

        RFC 6763

        DNS-Based Service Discovery

        Multicast DNS Internet-Draft

        Multicast DNS

        MIBs

        MIB MIBs Link

        No new or modified MIBs are supported by this feature, and support for existing MIBs has not been modified by this feature.

        To locate and download MIBs for selected platforms, Cisco IOS releases, and feature sets, use Cisco MIB Locator found at the following URL:

        http:/​/​www.cisco.com/​go/​mibs

        Technical Assistance

        Description Link

        The Cisco Support website provides extensive online resources, including documentation and tools for troubleshooting and resolving technical issues with Cisco products and technologies.

        To receive security and technical information about your products, you can subscribe to various services, such as the Product Alert Tool (accessed from Field Notices), the Cisco Technical Services Newsletter, and Really Simple Syndication (RSS) Feeds.

        Access to most tools on the Cisco Support website requires a Cisco.com user ID and password.

        http:/​/​www.cisco.com/​support

        Feature Information for Service Discovery Gateway

        The following table provides release information about the feature or features described in this module. This table lists only the software release that introduced support for a given feature in a given software release train. Unless noted otherwise, subsequent releases of that software release train also support that feature.

        Use Cisco Feature Navigator to find information about platform support and Cisco software image support. To access Cisco Feature Navigator, go to www.cisco.com/​go/​cfn. An account on Cisco.com is not required.

        Table 1 Feature Information for Service Discovery Gateway

        Feature Name

        Releases

        Feature Information

        Service Discovery Gateway

        Cisco IOS Release 15.2(1)E

        15.1(2)SY

        The Service Discovery Gateway feature enables multicast Domain Name System (mDNS) to operate across L3 boundaries (different subnets).

        The following commands were introduced or modified: cache-memory-max, clear mdns cache, clear mdns statistics, debug mdns, match message-type, match service-instance, match service-type, redistribute mdns-sd, service-list mdns-sd, service-policy, service-policy-query, service-routing mdns-sd, show mdns cache, show mdns requests, show mdns statistics