Umdns, Airprint, Cups, vlans trouble

Hello. I have a server running cups and hosting a printer which I can print to from an iphone via airplay...provided they are on the same lan. The tricky thing is that I have the server on a restricted vlan (one with out internet) and the iphone on another vlan (main lan). My network config is below, its a bit complicated as I have 3 zones and a wireless AP.

I can access the cups interface from the phone, so I know the access is there. But I do not see the printers via airplay unless I switch the wifi hotspot. I did a little research and suspect that maybe I need umdns-repeater? I installed this on the router, rebooted, but unfortunately am still out of luck. Any ideas?

config interface 'loopback'
        option device 'lo'
        option proto 'static'
        option ipaddr '127.0.0.1'
        option netmask '255.0.0.0'

config globals 'globals'
        option ula_prefix 'XXXXXXXX'
        option packet_steering '1'

config device
        option name 'br-lan'
        option type 'bridge'
        list ports 'lan1'
        list ports 'lan2'
        list ports 'lan3'
        list ports 'lan4'
        list ports 'lan5'

config interface 'lan'
        option device 'br-lan.1'
        option proto 'static'
        option ipaddr '192.168.11.1'
        option netmask '255.255.255.0'
        option ip6assign '60'

config interface 'wan'
        option device 'eth1'
        option proto 'dhcp'

config interface 'wan6'
        option device 'eth1'
        option proto 'dhcpv6'

config interface 'guest'
        option proto 'static'
        option ipaddr '192.168.3.1'
        option netmask '255.255.255.0'
        option device 'br-lan.3'

config interface 'iot'
        option proto 'static'
        option ipaddr '192.168.2.1'
        option netmask '255.255.255.0'
        option device 'br-lan.2'

config bridge-vlan
        option device 'br-lan'
        option vlan '1'
        list ports 'lan2:u*'
        list ports 'lan3:u*'
        list ports 'lan4:u*'
        list ports 'lan5:u*'

config bridge-vlan
        option device 'br-lan'
        option vlan '2'
        list ports 'lan1:u*'
        list ports 'lan5:t'

config bridge-vlan
        option device 'br-lan'
        option vlan '3'
        list ports 'lan5:t'

Do you have BT beacon for airprint?

AirPrint doesn't like to cross broadcast domains because of the nature of the zero-conf mdns based discovery that it uses.

The solution may be to add an mdns repeater/reflector. Install and configure avahi for this purpose and then try again.

I dont know what that is, but I think no? I have an old printer that is connected by ethernet.

Thanks, thats what I read. I installed the umdns-repeater:
opkg install mdns-repeater

I tried to configure it by editing the config file to the following:
config umdns
option enabled '1'
list network 'lan'
list network 'iot'

Unfortunately it did not help.

How "old"? Does the printer actually have AirPrint capabilities?

Its about 18 years old. Brother HL-2070N
I forgot to mention, I have avachi running on the server which allows me to use airprint (via the server and cups). I can confirm that when I connect to the same vlan, I can use airprint.

Based on what I can see, the printer does not support AirPrint.

So you have a print server that allows AirPrint capability?
Have you confirmed that that the print server will accept connections from other subnets?

Just enter CUPS url into your computer....

Ok, I think I've caused some confusion. Let me try to clarify:

  1. The printer alone absolutely does not support airprint
  2. The printer is wired to the router and has an IP
  3. I followed this guide to install cups and host and airprint services on my server (printer was added via its IP address):
    https://www.linuxbabe.com/ubuntu/set-up-cups-print-server-ubuntu-bonjour-ipp-samba-airprint
  4. If I connect my iOS device to the same iot vlan (via wifi) I am able to print via airprint...just like a modern printer, no issues.
  5. If I connect my iOS back to the lan vlan, I do not see the printer.
  6. I can access CUPS from my iOS device while on the lan vlan

Connect a computer to the IoT VLAN and then try to print using the CUPS server IP address.

Hummm...why would this be different than what I am able to do?

Currently this works:
iphone(airplay)[192.168.2.xx]->wireless SSID(IOT)->vlan(iot)->Server/printer[192.168.2.xx]

This does not:
iphone(airplay)[192.168.11.xx]->wireless SSID(LAN)->vlan(lan)->Server[192.168.2.xx]

The purpose of the test is to see if the server accepts connections in general. AirPrint is a slightly different animal than standard printing, so we need to know if the problem is related to the cross-VLAN AirPrint functionality, or if it is more fundamental (i.e. the print server isn't getting any traffic from the IoT VLAN -- this could be a router based firewall config, or it could be a local/host-level firewall on your print server).

Please run the test as requested using a computer instead of a phone and using IP printing rather than AirPrint.

Try installing avahi-dbus-daemon In the config file make sure that

[reflector]
enable-reflector=yes

Make sure you have firewall rules to allow access as well

Well I had cups working, but wtf it is flakey and I am beginning to think complete garbage. One minute I can access the webinterface, print test pages, see the printer in my "add devices" option under windows. Then randomly the webinterface is unavailable.

For the record (Today) I was able to change to the iot network with a windows computer and see the printer...but windows failed to add it and suddenly its no longer available. I've looked at the cups service, samba, and avahi, all are running with no issues.

My patience is thinning....grrrr linux.

Get all that sorted out first AirPrint won’t work if your server or its configuration is not working correctly.

Make sure your local host firewall allows the non-local-subnet connections and that your router firewall allows routing between the two networks for this service.

idevices are not linux, take your grrr to apple store.....

At the moment, my issue is solely with Linux, cups, and the printer (which is now connected via USB). So I am mostly frustrated by cups randomly becoming unaccessible and unavailable.

Though, I am not an apply fanboy either they are their own special poison. I am working on this printer server for someone else.

You need only 631/udp for cups. Nothing disappears once you connect the printer.

Well, CUPS development has been bought by Apple, so your gripes are still with them.
But given that CUPS isn't even available on OpenWrt, it's not an OpenWrt issue either.

Yes, mDNS does not like crossing subnet barriers, that's a pretty major part of its intentions - you can fool that by reflecting/ proxying though. Fortunately neither OpenWrt nor CUPS depend on mDNS to be present, only your iOS (and other 'smart') devices might.

1 Like