Information About Service Discovery Gateway
Service Announcement Redistribution and Service Extension
Redistribution of announcements is the actual forwarding of announcements and query responses while service extension is the capability of proxying services between subnets. The actual replication of the service announcement can help to speed up the visibility of newly announced services and also a service's withdrawal if a service or device is turned off.
Note |
Extension of services such as printers or Apple TV works fine without actual replication of service announcements. The Service Discovery Gateway will cache announcements, queries and their responses in the cache. If another device queries for a service, the Service Discovery Gateway will be able to provide an answer from its cache. |
Enable the redistribution mdns-sd command only on a per-interface basis, and only if it is actually required. You must ensure that there are no loops in the network topology corresponding to the interface for which service announcement redistribution is being enabled. A loop can lead to a broadcast storm.
Redistribution of service announcement information cannot be done globally. You can enable redistribution of service information only at the interface level.
Extending Services Across Subnets—An Overview
You need to enable a multicast Domain Name System (mDNS) gateway to extend services across subnet boundaries. You can enable an mDNS gateway for a device or for an interface. You must enable routing of services for the device before enabling it at the interface level. After the mDNS gateway is enabled on a device or interface, you can extend services across subnet boundaries.
To extend services across subnets, you must do the following:
-
Set filter options—You can allow services such as printer services to be accessed across subnets. If printer x is available on interface 1, users on interface 2 can use printer x without configuring the printer on their local systems.
-
Extend services across subnets—The filter created in Step 1 should be applied on the interfaces 1 and 2. Only then can users on other interfaces access the printer service.
For the sample scenario where a printer service is accessible by clients on other interfaces, you must apply these filters:
-
On the interface where the printer service is available (IN filter) —You want to allow the printer service into the mDNS cache, so that it can be accessed by users on other subnets.
-
On the interface where the printer service is available (OUT filter)—Since clients on other interfaces will access the service (printer x, for example), you should allow queries coming from the device (OUT filter, from the device's point of view).
-
On each interface where clients reside (IN filter)—For clients on other interfaces (subnets) wanting to access the printer service, you must allow queries from users into the mDNS cache (IN filter).
Remember |
Applying the IN filter means that you are allowing the printer service into the device mDNS cache, and other interfaces can access it. Applying the OUT filter means that you are allowing the queries out of the cache so that queries from clients on other interfaces can reach the printer interface. On other client-facing interfaces, the IN filter is applied to allow queries in. |
Note |
|
Set Filter Options to Extend Services Across Subnets
You can set filter options to allow services such as printer services into or out of a device or interface. You can also permit or prohibit queries, announcements, services learnt from an interface, specific service–instances, and locations. Use the service-list mdns-sd command to create a service-list and set filter options.
You need to create a service-list and use filter options within it. While creating a service-list, use one of the following options:
-
The permit option permits specific services, announcements and service-instances across subnets.
-
The deny option restricts services, announcements and service-instances from being transported across subnets.
-
The query option is provided to browse services. For example, if you want to browse printer services periodically, then you can create a service-list with the query option, and add the printer service to the query. When you set a period for the query, the service entries are refreshed in the cache memory.
You must mention a sequence number when using the permit or deny option. The filtering is done sequentially, in the ascending order. The same service-list can be associated with multiple sequence numbers. Within a sequence, match statements (commands) must be used to specify what needs to be filtered. Generally, match statements are used to filter queries (for example, queries from clients to find printer and fax services), announcements (new service is added, and so on), specific service–instances, types of service such as printer services (so that the service is allowed into the cache for use), services available for a specific interface (printers and Apple TVs associated with a VLAN), and locations.
Note |
A service-list by itself does not contain any services. You must specify a service type in the match statement when setting filter options to allow or prohibit services. (For example, '_ipp._tcp' is the service type for an IPP printing service running over TCP). |
-
All queries from clients to the device.
-
Printer services to clients on other subnets.
The following example explains how to achieve the goal:
!
service-list mdns-sd mixed permit 10
match message-type query
!
service-list mdns-sd mixed permit 20
match message-type announcement
match service-type _ipps._tcp.local
!
In the above example, a service-list called 'mixed' is created and the permit option is used twice—to filter queries and to filter printer services and announcements. The filtering is done in the sequence given below:
-
Sequence 10 - A match statement is used to filter queries.
-
Sequence 20 - Match statements are used to filter announcements and printer services.
The match statement in Sequence 10 sets a filter for queries on the device, but does not specify that queries be allowed into the device. To allow queries from clients, the filter needs to be applied on the interface in the IN direction. The example is displayed in the Using Filter Options section.
Similarly, the match statements in Sequence 20 sets a filter for announcements and printer services on the device, but does not specify that they be allowed into the device. To allow announcements and printer services into the device, the filter needs to be applied on the required interfaces in the IN direction. The example is displayed in the Using Filter Options section.
If neither the permit option nor the deny option is used, the default action is to disallow services from being transported to other subnets.
Browsing services periodically—Service-lists of the type query can be used to browse services. Such queries are called active queries. Active queries periodically send out requests for the services specified within the query on all interfaces. As services have a specific Time to Live (TTL) duration, active queries can help to keep services fresh in the cache memory.
In the following example, a service-list named 'active-query' is created and the service-list is of the type query. Services such as printer services are specified within the query, and these are the services that we want to extend. Typically, these services would match the services that have been configured as 'permitted' services in the IN filter.
!
service-list mdns-sd active-query query
service-type _universal._sub._ipp._tcp
service-type _ipp._tcp.local
service-type _ipps._tcp.local
service-type _raop._tcp.local
!
The purpose of an active query and a query associated with a match statement is different. When you enable an active query, services are browsed periodically. A query is used in a match statement to permit or prohibit queries (not active queries) on the interface.
Note |
|
Remember |
Filtering only sets filter options and specifies that certain services need to be filtered. You must apply the filters on an interface for the services, queries, or announcements to actually be permitted or prohibited on the interface. To know about applying filters and the other available service discovery configuration options, refer the Using Filter Options section. |
Extend Services Across Subnets
You must have set filter options for the device before extending services across subnets. If you have set filter options for specific services and other service discovery information to be allowed, prohibited or queried periodically, you can apply the filters for an interface.
Before applying filters, note the following:
-
You must enable multicast Domain Name System (mDNS) on a device to apply filter options. You can enable mDNS using the command service-routing mdns-sd
-
Since you might want to allow services into the device or prohibit services from being learnt on an interface, you must apply the filter in the needed direction. The options IN and OUT perform the desired actions on the interface.
-
Typically, a service-policy is applied on an interface. Global service-policies are optional and affect all L3 interfaces.
-
All queries from clients to the device.
-
Printer services.
A note about filter options - Filter options have been set for the above scenario by creating a service-list called 'mixed' and adding filter options to it. (see Set filter options for more details). The following example explains how to apply the filters:
!
interface Ethernet0/0
description *** (wireless) Clients here plus some printers
ip address 172.16.33.7 255.255.255.0
service-routing mdns-sd
service-policy mixed IN
!
interface Ethernet0/3
description *** (wireless) Clients here plus some printers
ip address 172.16.57.1 255.255.255.0
service-routing mdns-sd
service-policy mixed IN
!
In the above example, service-routing is enabled on the interface and the filter options in the service-policy 'mixed' are applied in the IN direction. In other words, all queries and printer services will be allowed into the device, from the interfaces Ethernet 0/0 and Ethernet 0/3.
Sample scenario for browsing specific services - A service-list of the type query (called active query) has been created. It contains services that we want to browse periodically, such as printer services (see Set filter options for more details about creating an active query). To enable browsing of the services in the query, you must apply the active query for the device.
!
service-routing mdns-sd
service-policy-query active-query 90
!
In the above example, the period is set to 90 seconds. The services within the active query are queried on all interfaces of the device after an interval of 90 seconds.
Note |
|
You can use the following options after enabling mDNS on a device or interface.
Purpose |
|
Global and Interface Configuration Options |
||
For a service-list, apply a filter to allow or prohibit services. |
service-policy |
Global and interface levels. |
||
Set some part of the system memory for cache. |
cache-memory-max |
Global level. |
||
Configure an active query and the query period so that specified services are queried periodically. |
service-policy-query | |||
Designate a specific device or interface in a domain for routing mDNS announcement and query information. |
designated-gateway |
Global and interface levels. |
||
Access services in the proximity of the device.
|
service-policy-proximity |
Global and interface levels. |
||
Configure service-type enumeration period for the device. |
service-type-enumeration period |
Global level. |
||
Specify an alternate source interface for outgoing mDNS packets on a device. |
source-interface |
Global level. |
||
Configure the maximum rate limit of incoming mDNS packets for a device. |
rate-limit |
Global level. |
||
Speed up visibility of newly announced services and withdrawal of services when a service or device is turned off. |
redistribute |
Interface level. |