What's new

Isolating an AirPrinter in Vlan

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

Snouto

Occasional Visitor
Hi

Total network noob here looking for some expert advice. I require a small network consisting of an iPad with cellular and connected to a local WiFi access point, an air printer connected to the same access point, and one or more mobile phones from joe public connecting periodically to the same access point.
I require the iPad to be able to print to the air printer, however the public devices should not be able to see it.
After discussing with several people I was initially led to believe an L2 managed switch like those supplied by TP-Link would do the job, such that I’d create three VLANS where the iPad would be in one, the printer in another, and all the public devices to the third. The only hardwired device to the switch would be the AP. Then by magic I’d allow vlans 1&2 and 1&3 to communicate, but not 2&3 thereby preventing public device access to the printer. FYI if it matters, the public devices would be connecting to an embedded web server in a custom app running on the iPad via an IP address and port 8080 (the port number might be changeable though). At this point I’m assuming they’re all on the same subnet until I’m told otherwise.

Today I was advised by someone unconnected to tp-link that this was crap and wouldn’t work without an L3 switch because L2 switches can’t route between VLANS, and additionally I’d need the switch to handle DHCP. I was told to look at Cisco and Ubiquiti gear and give tp-link the big swerve, and thus I’ve arrived at the Cisco SG300-10.

I’d also apparently only need two VLANS - one for the iPad and printer, the other for public devices.

I’m about to buy this switch in a few hours and fumble my way through the config as a test of the network but I have questions:

1) is this a crazy plan or might it just succeed?
2) do I really need an L3 switch for my requirements?
3) will I need a VLAN aware access point to provide WiFi to the devices or will any old AP do? Maybe something like Tp-Link TL-WA801ND which can do multi SSID with VLAN tagging?
4) two or three VLANS? I can see the logic of binding the iPad and printer to the same VLAN but if I allow vlan2 to see the iPad in VLAN 1 wouldn’t that effectively open up the printer too?
5) Apple Bonjour is apparently a tricky beast. Is there anything in my plan that might be foiled by Bonjour, with the end result being the printer is visible to public devices?
6) the sg300-10 has ten ports and I need 1. Any other smaller, cheaper but just as useful switches out there?

I hope someone can hit me with some knowledge, because if isn’t clear enough already, I don’t know what the hell I’m doing.

Cheers!
 
Last edited:
dis-allow Bonjour or block it in the router
turn off NFC and wireless servers in the printer.
put the printer on the same subnet as the ipad. use MAC filtering as a start.
control with vlans
 
If you only need a couple of ports you should take a look at the Ubiquiti ER-X. It can do what you need. Also an AP that can handle multiple VLANs and SSID's would be good. Ubiquiti has some decent AP's also.
 
If you only need a couple of ports you should take a look at the Ubiquiti ER-X. It can do what you need. Also an AP that can handle multiple VLANs and SSID's would be good. Ubiquiti has some decent AP's also.

The er-x appears to provide layer 2 only, so are you saying I don’t need a layer 3 device? How would I allow two VLANS to talk to each other in that scenario, or is that not even a problem for my needs?

If I used the er-x and say, an ap-ac lite, that would be a cheap and effective solution to my needs. I just need to understand how two VLANS could talk to each other without exposing the air printer on one of those VLANS. Could I use an ACL in the router maybe, to selectively block the Bonjour service (which is a multicast)? Actually...maybe go back to three VLANS?
 
Last edited:
dis-allow Bonjour or block it in the router
turn off NFC and wireless servers in the printer.
put the printer on the same subnet as the ipad. use MAC filtering as a start.
control with vlans
If I disallow Bonjour and / or turn off wireless, won’t I then effectively disable Air printing altogether?
 
Last edited:
The er-x appears to provide layer 2 only, so are you saying I don’t need a layer 3 device? How would I allow two VLANS to talk to each other in that scenario, or is that not even a problem for my needs?

The ER-X is a router (Layer3) first, that can switch (Layer2) also. As opposed to the SG300 which is a switch first, that can route. Either would work for your purposes but if you don't need many ports the ER-X is much less expensive. The catch with either of them is you will have a steep learning curve, especially if your not real familiar with routing and VLANs.
 
The ER-X is a router (Layer3) first, that can switch (Layer2) also. As opposed to the SG300 which is a switch first, that can route. Either would work for your purposes but if you don't need many ports the ER-X is much less expensive. The catch with either of them is you will have a steep learning curve, especially if your not real familiar with routing and VLANs.
I don’t mind the learning curve, although I’m saying that before many hours pulling my hair out! But you might just have saved me a lot of money and it’ll therefore be a better proposition for my client, so thanks a ton!
 
Purchased an er-x and a Ap-AC Lite. Can't even connect to the ap-ac wifi hotspot :D I can see the wifi SSID in the list but my mac just wont connect.

this is going to be fun...


one question about this. I've decided to remove the internet router part of the topology because, when i thought about it, only the iPad requires internet access therefore why not just get an iPad with cellular. So now i have the er-x, the ap-ac connected to it, and everything else is going to connect to the ap-ac over wifi. I'll set up the er-x as a dhcp server so all the bits can get IPs but... is there going to a problem now that there is no internet router connected? Seems like a daft question I know but is my assumption correct that once I have everything set up properly it'll run just fine without an internet connected router on the network? I'm only asking because I can't connect when i remove the cable connecting the er-x to my router, but this might simply be due to the configuration (I did actually run the basic wizard, which i think sets up the er-x to get DHCP from the router rather than dishing them out itself, so that's probably it).
 
If I read you correctly, you are saying that you want the network working without access to the internet? That is possible. When you say you can't connect, what is the error? what device are you trying to connect to? Is it wireless or wired? Does anything respond like pings, etc?
 
If I read you correctly, you are saying that you want the network working without access to the internet? That is possible. When you say you can't connect, what is the error? what device are you trying to connect to? Is it wireless or wired? Does anything respond like pings, etc?
Yeah the idea is it’ll just be it’s own network with no internet. The only internet connection will exist on the iPad over cellular.
When I updated the settings of the switch using the basic wizard it warned me I’d have to connect my laptop to it to receive an ip and then I’d be able to access the management software, but my laptop doesn’t have Ethernet. I presumed it wouldn’t be a problem because I have the AP plugged in to the switch and that would get me an IP once I connected to its WiFi, however I just can’t connect. My laptop tries but then gives up after a while. I’ll probably reset the AP and try again, maybe I made a mistake with the config somehow
 
So when you say you can't connect, are you receiving an IP at all? Does it say you are connected to the SSID?

Do you have another device you can plug in directly so you can troubleshoot? Seems like a difficulty thing to be able to fix if you can't look at what is happening on the router or AP.
 
Well the switch is still plugged in to my router via eth0, and the ap-ac is plugged in to eth1, and I was expecting the ap-ac to provide me a connection to the box over wifi and then i'd be able to access the switch management console, but the wifi just wont connect and I appear unable to connect to the switch directly even though I'm using the IP address my router has given it.
I'm going to spend today going through this again so will be resetting everything and starting from scratch.

Thanks for your continued interest.
 
Just as an FYI - AirPrint, like other Bonjour Services, is restricted to the subnet that the device is on...

Edit - see below - Bonjour does have an implementation that allows things to extend past the local subnet
 
Last edited:
Just as an FYI - AirPrint, like other Bonjour Services, is restricted to the subnet that the device is on...
I thought that too, but the other day I hooked up another router to my base router via ethernet, allowed it to DHCP out IPs over a different subnet to that of the base station, connected to it over wifi and yet I was still able to see the airprinter connected to my basestation. I realise the job of routers is to "route" so maybe the router was enabling this behaviour? Either way, I still need to stop it happening and I'm praying the er-x will do the task
 
I thought that too, but the other day I hooked up another router to my base router via ethernet, allowed it to DHCP out IPs over a different subnet to that of the base station, connected to it over wifi and yet I was still able to see the airprinter connected to my basestation. I realise the job of routers is to "route" so maybe the router was enabling this behaviour? Either way, I still need to stop it happening and I'm praying the er-x will do the task

just thinking - what is the Printer/Vendor?

Bonjour has a wider scope -- Wide Area Bonjour - and this is dependent on router/client implementation - corner case perhaps, but might be something to dig into...

https://developer.apple.com/library...ocoa/Conceptual/NetServices/Articles/faq.html

Direct from Apple...

Does Bonjour work between multiple subnets?

Yes. The first release of DNS Service Discovery (DNS-SD) for OS X concentrated on Multicast DNS (mDNS) for single-link networks because this was the environment worst served by IP software. Bonjour uses Dynamic DNS Update (RFC 2316) and unicast DNS queries to enable wide-area service discovery.​
 
just thinking - what is the Printer/Vendor?

Bonjour has a wider scope -- Wide Area Bonjour - and this is dependent on router/client implementation - corner case perhaps, but might be something to dig into...

https://developer.apple.com/library...ocoa/Conceptual/NetServices/Articles/faq.html

Direct from Apple...

Does Bonjour work between multiple subnets?

Yes. The first release of DNS Service Discovery (DNS-SD) for OS X concentrated on Multicast DNS (mDNS) for single-link networks because this was the environment worst served by IP software. Bonjour uses Dynamic DNS Update (RFC 2316) and unicast DNS queries to enable wide-area service discovery.​
Well that's interesting / terrifying. Will a VLAN be able to block this behaviour? Man I wish I knew what I was doing
 
What brand/model is the the printer?
For my test I’m using my Samsung M2020W but for the installation it’ll be something else (exact brand/model hasn’t been decided yet). I’m expecting them all to work the same way though over AirPrint
 
Similar threads
Thread starter Title Forum Replies Date
D VLAN Config Query using pfSense and Unifi Switches, NICs and cabling 18

Similar threads

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top