Smartphone und Tablet finden CUPS Drucker nicht?

3 Antworten

Falls es noch jemanden interessiert, ich habe das Problem gelöst, indem ich einen Raspberry als CUPS Relay im anderen Subnetz eingerichtet habe. Man kann auch den Multicast routen, das ist aber unnötig umständlich, die folgende Antwort von stackexchange funktioniert aber.:

cups 1.6 used dnssd. This multicast to 224.0.0.251 port 5353. As router are not allowed to forward 224.0.0.251 the packets are stuck on the gateway border.

You could use avahi-daemon mDNS reflector feature on the gateway .

NB: If you nat at the gateway you will need to set NONAT for packets incoming from the parent network. In shorewall/masq file:

<external_interface> <parent_net_ip_range>    NONAT
<external_interface> 224.0.0.0/4     NONAT
<external_interface>:!<parent_net_ip_range>,224.0.0.0/4 <subnet_ip_range> detect

avahi-daemon.conf on the router

[reflector]
enable-reflector=yes

avahi-daemon will reflect incoming mDNS requests to all local network interfaces,  effectively allowing clients to browse mDNS/DNS-SD services on all networks connected to the      gateway. 
Make sure to not run multiple reflectors between the same networks, this might cause them to play  Ping  Pong with mDNS packets.

PS: One could need to mangle the packets to increase Time To Live. This is a topic that needs more investigations though here are the shorewall/start, raw iptables tweaks:

/sbin/iptables -t mangle -A PREROUTING -p all -s 224.0.0.0/4 -j TTL --ttl-inc <ttl_inc>
/sbin/iptables -t mangle -A PREROUTING -p all -d 224.0.0.0/4 -j TTL --ttl-inc <ttl_inc>
/sbin/iptables -t mangle -A PREROUTING -p all -s <parent_net_ip_range> -j TTL --ttl-inc <ttl_inc>
/sbin/iptables -t mangle -A PREROUTING -p all -d <parent_net_ip_range> -j TTL --ttl-inc <ttl_inc>

ttl_inc: any number starting from one. I use twenty locally though it is not set in stone. Mostly depends on the number of routers crossed in between printer and client station. Gnome control center "printers" here send a ttl f 255 (the maximum) so it is not required.

Was für ein Gerät verbindet denn die beiden Netze? Je nachdem, wie der Cups Server den Drucker publiziert läuft das über Broadcast(Samba z.b.) oder Multicast(Bonjour). Ersteres funktioniert nur im selben Subnetz. Multicast kann auch geroutet werden, wenn der Router das unterstützt und auch erlaubt.

Woher ich das weiß:Berufserfahrung – Seit langer Zeit als Systemadministrator tätig
Trmbl 
Fragesteller
 12.05.2021, 21:00

Ein etwas älterer Lancom Router, müsste eigtl. über Multicast laufen. Bin grade am schauen, wie ich da eine Route einrichten kann/muss

0

Meine Vermutung: iPadOS und Android haben keinen CUPS-Treiber.

Trmbl 
Fragesteller
 12.05.2021, 14:38

Es hat definitiv schonmal problemlos funktioniert, deswegen denke ich es hängt irgendwie damit zusammen, dass der PI in einem anderen Subnetz ist.

0
julihan41  12.05.2021, 14:39
@Trmbl

Okay, dann liegt das an dem Subnetz. Parke doch alle ins selbe oder erstelle eine Route in dem Gerät, dass die Netze trennt.

0