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
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:
option permits specific services, announcements and service-instances across
option restricts services, announcements and service-instances from being
transported across subnets.
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
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
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.
Sample scenario -
Consider a device is in a client segment. The goal is to allow the following on
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
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
is used twice—to filter queries and to filter printer services and
announcements. The filtering is done in the sequence given below:
The match statement
in Sequence 10 sets a filter for queries on the device, but does not specify
that queries be allowed
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
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
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
Filter Options section.
If neither the
deny option is
used, the default action is to disallow services from being transported to
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
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
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
creation can only be used globally and cannot be used at the interface level.
You can create
a new service-instance of a specific service-type using the
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 responds to queries.
sets filter options and specifies that certain services need to be filtered.
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
Filter Options section.