Find printers and speakers across VLANs#
You will end up with discovery announcements repeated between two or more networks, so a phone on the client VLAN can find a printer on the infrastructure VLAN. Chromecasts, AirPlay speakers, network printers and most devices that "just appear" rely on mDNS, and mDNS does not cross a router.
Before you start#
- The operator role and a licence.
- At least two interfaces with addresses. The repeater needs somewhere to repeat between.
- A decision about what this costs, below.
Step 1 — Turn on the repeater#
Services → DNS, mDNS tab, Turn on the mDNS repeater.
- Tick the interfaces to repeat between — the LAN and the VLAN, say. VLANs are listed like any other interface.
- Choose the Address family. Every ticked interface needs an address of each family repeated; the form names one that has none. IPv4 only is the usual choice on a network without IPv6.
- Under Services, list only what needs to cross —
_ipp._tcpfor printers,_airplay._tcpand_raop._tcpfor AirPlay,_googlecast._tcpfor casting — or leave it empty to repeat everything. - Save changes, and apply.
Step 2 — Let the discovered thing be reachable#
Discovery and access are separate. A phone that can now see the printer still needs a firewall rule to reach it: allow the client network to the printer's address and port, and nothing wider — see a default-drop ruleset. Scoping the rule to one address is the difference between "guests can print" and "guests are on the infrastructure VLAN".
Check it worked#
From a client on the far network:
avahi-browse -at
dns-sd -B _services._dns-sd._udpThe device should appear. If it appears and does not work, that is the firewall rule, not the repeater.
When it does not help#
Not every "it just appears" protocol is mDNS. SSDP, WS-Discovery and several vendors' own
discovery are other protocols, and this repeater does not carry them. If the device is still
not found and avahi-browse shows nothing, it probably does not use mDNS — give the client
the device's address directly.
Undoing it#
Edit → Remove on the mDNS tab, or Disabled to keep the settings and stop repeating.
See also#
- Add a VLAN — the reason this problem exists
- A default-drop ruleset that admits what you meant
- mDNS repeater