YSoft SafeQ Mobile Integration Gateway - print across multiple subnets
Document description
This document describes the configuration of DNS Service discovery (DNS-SD) on Microsoft DNS servers to advertise the YSoft SafeQ Mobile Integration Gateway service across multiple subnets. This configuration enables clients connected to different subnet from the one where the Mobile Integration Gateway is installed to discover the printing service.
Without configuring DNS-SD the printing service provided by the Mobile Integration Gateway is advertised by the mDNS (multicast traffic) which is not allowed to be transferred through the routers. (Please note that this is not entirely true, because some routers implement special proxy for specific multicast services including AirPrint.)
DNS-SD configuration uses standard (unicast) DNS protocol messages to advertise the services therefore there is no limitation connected to the multicast traffic (see the DNS-SD RFC here).
Please note that following configuration examples are performed on Windows Server 2012 R2 DNS server role and may differ on other Windows Server OS versions. Configuration for other DNS servers (e.g. BIND) is not covered by this document.
Following guide is applicable only for iOS/OS X. Discovery across multiple subnets is not possible on Android devices due to 3rd party limitations on Android side.
Configuration
General description of the solution
Authoritative DNS server in the domain is configured to answer for DNS-SD queries from the clients.
In the DNS answer there is a specification of the YSoft SafeQ Mobile Integration Gateway service which from client's point of view is the IPP(S) printer.
AirPrint clients such as iOS devices are able to query DNS server for the network services. Based on the answer the client connect to the Mobile Integration Gateway and user is able to send the print job to YSoft SafeQ system.
DNS search domain which is queried by the client for available services is contained in the DHCP response packet "domain" field (can be configured in Option 15 DNS Domain Name on the DHCP server).
The testing domain used in this document is called mydomain.test the FQDN of Mobile Integration Gateway server is autofsp .mydomain.test and the advertised IPPS printer is called ysqmig .
Making DNS Search domain DNS-SD ready
This setting will make the DNS search domain ready accept DNS service records and enable clients to search the domain.
On the Windows server open Server Manager > Tools > DNS.
In the right pane expand the domain you want to use for advertising of the AirPrint service(s) (in our case it is mydomain.test domain).
Right click the _udp folder and in the context menu select Other new records...
In the window select Service Location (SRV) record type and click Create record... Fill following values in the New Resource Record window:
Protocol: _dns-sd
Service: Fill in any string. The service will anyway be deleted in the next step. We just need to create a folder for the service definition.
Highlight the _dns-sd folder in the left pane, right click created service in the right pane and select Delete from the context menu. Confirm the delete.
Right click the _dns-sd folder in the left pane and form the context menu select Other New Records...
In the window select Pointer (PTR ) record type and click Create record... Fill following values in the New Resource Record window:
Host IP Address: b
Host name: mydomain.test . Adjust this based on the name of your domain.
Click OK to crate a PTR record.
Repeat the steps 6 to 8 with Host IP Addresses: db, dr, lb, r.
These records tell Wide Area Bonjour clients how to browse your zone for services (‘b’ for browse, ‘lb’ for legacy browse, and ‘db’ for default browse) and register their own services (‘r’ for register and ‘dr’ for default register).
On the screenshot below you see how the result should look like in the DNS Manager console window:
Add service(s) to be discovered
In this section, add DNS records that describe the service offered to the AirPrint clients. The result in the DNS manager after the procedure described below is finished should look like this:
Add printers to be discovered by the iOS/MAC OS X devices
In the previous chapter we have defined the service which will be advertised by the DNS-SD. The service already describes the IPPS printer, however to make it all work we need to add few more records.
On the Windows server open Server Manager > Tools > DNS.
In the right pane expand the domain you want to use for advertising of the AirPrint service(s) (in our case it is mydomain.test domain).
Right click the _ipps folder and in the context menu select Other new records...
In the window select Service Location (SRV) record type and click Create record... Fill following values in the New Resource Record window:
Protocol: _sub
Service: Fill in any string. The service will anyway be deleted in the next step. We just need to create a folder for the service definition.
Highlight the _sub folder in the left pane, right click created service in the right pane and select Delete from the context menu. Confirm the delete.
Right click the _sub folder in the left pane and form the context menu select Other New Records...
In the window select Service Location ( SRV) record type and click Create record... Fill following values in the New Resource Record window:
Protocol: _universal
Service: Fill in any string. The service will anyway be deleted in the next step. We just need to create a folder for the service definition.
Highlight the _universal folder in the left pane, right click created service in the right pane and select Delete from the context menu. Confirm the delete.
Right click the _universal folder in the left pane and form the context menu select Other New Records...
In the window select Pointer (PTR ) record type and click Create record... Fill following values in the New Resource Record window:
Host IP Address:leave the field blank.
Host name: ysqmig._ipps._tcp.mydomain.test. Adjust this based on the name of your domain and printer.
Click OK to crate a PTR record.
On the screenshot below you see how the result should look like in the DNS Manager console window:
Configuring search domain for the iOS/MAC OS X devices
The above configuration allows DNS server to correctly answer DNS-SD queries for the AirPrint ready services. Now we need to tell the clients which domain they should search for such services. This can either be done manually or via DHCP protocol. We will not cover the manual options as they can differ based on the OS (iOS/MAC OS X) or version of the systems.
Configuring DHCP server to distribute search domain to the clients
This chapter will describe configuration of Windows DHCP server. The search domain is defined by the DHCP option 15.
On the Windows server open Server Manager > Tools > DHCP.
In the right pane expand the scope for which you want to configure the search domain distribution.
Right-click the Scope Options and in the context menu click on Configure Options...
In the list of options select 015 DNS Domain Name and write domain name into the String value field.
Confirm the configuration by clicking OK button.
That is it. The iOS/MAC OS X clients which are obtaining IP addresses from this DHCP will know that they should query defined domain for the AirPrint services.
How to flush DNS on iOS device
To test the configuration it can be useful to flush cashed DNS entries from the device. To flush DNS on the iOS device it is enough to intentionally enter wrong DNS server entry, confirm it by going back to the network listing and configure correct DNS again.