Printer in different subnet of the same LAN

No dice just yet. I am able to ping the printer from my PC but I get a failure to connect error from Bambu Studio.

Stupid question - did you set your printer to LAN only mode first? :thinking:

I did. I also put an old laptop in the same subnet with the printer and that worked. I’m just not able to get to the printer from my main PC. The old laptop is really old and is barely functional so I’d really like to get the main PC working with the printer.

I did also check to make sure that Bambu Studio had “private” set in the Windows firewall. Firewall rules are set to allow my main PC to access any device on the printer’s subnet.

“Firewall rules are set to allow my main PC to access any device on the printer’s subnet.” I meant pfSense firewall rules here.

Maybe try to temporarily disable your Windows Firewall to rule out that it might be blocking your traffic?

No joy. Good call, though. At least now I’m pretty sure it is at the pfSense level.

If I have a rule allowing the main PC into the printer’s subnet, I don’t need one allowing the printer into the main PC’s subnet, do I? That seems like it would defeat the purpose of creating VLANs.

Can you post sshot of your rules for both VLANs? You are correct, allowing the printer VLAN onto your PC subnet would defeat the purpose of keeping them on separate subnets to begin with.

I think my account is too new as I’m not able to upload images.

When I think about it, though… I shouldn’t be able to ping the printer if the rules are blocking the connection, right?

Not necessarily, ping uses ICMP whereas Bambu Studio ‘speaks’ with the printers via TCP (MQTT if I recall correctly) - if something is blocking TCP traffic but allows ICMP/ARP to go through you can still have perfectly valid ping but without any chance of an actual connection.

If you can’t upload pictures here, you ought to be able to upload sshots on something like imgurl and post links to them.

I see.

Here’s the imgur link. BambuNet49 is the wireless VLAN for the printer. SecureLAN is the alias for the subnet with my main PC.

imgur /a/1bc1R8v (I had to split this as I’m not able to post links.)

Hey guys this is my first Post in this Forum and i hope i can help you out quick and dirty. I have my X1C in use for over a year in an AVM FritzBox network and switched just this week to Unifi with a DreamMachine Special Edition.

My WLans, now multiple, and my LAN have now different VLans with different rights to connect to each other. That results into a not responding X1C via BambuStudio.

I havent looked quit into the details because i have a lot of other configurations to work first, but here is as said earlier quick and dirty way to get it function.

My PC is connected to a LAN in VLAN 5 with an adress out of 192.168.5.0/24
My X1C is connected to a WLAN which is using VLAN 21 with an adress in 192.168.21.0/24

At first i created both networks under settings → network → create new virtual network

There i created said LAN and WLAN mit their individuell VLANs and Subnetrange. No network isolation, no filter, everything bone stock on both networks except → activat MDNS.

Next Step is to create the WLAN under settings → WLAN → create
Thats where you set your ssid, wpa2 or higher AND choose the network just created for your wlan. everything else can be untouched for now.

i think this is where most of you are too with you basic setup. with this settings the X1C is connected to the WLAN and the PC via LAN. Both have internet connection but the BambuStudio cant find the X1C in your network.

What worked for me was, and please remember, this is by far not the optimal solution but it works and i can continue configure my other setup. I will have a more detailed look on what is really necessary to be set if everything else is completed. in germany we call it “provisorium”.

Go to settings → Security → Traffic- and Firewallrules
There you create 4 Rules. On all rules you change you sourcetype to network. for the source aswell as for the destination.

Rule 1 LAN In:
Source → Network → Pick your created LAN
Destination → Network → Pick your created WLAN
Rule 2 LAN In:
Source → Network → Pick your created WLAN
Destination → Network → Pick your created LAN
Rule 3 LAN Out:
Source → Network → Pick your created LAN
Destination → Network → Pick your created WLAN
Rule 4 LAN Out:
Source → Network → Pick your created WLAN
Destination → Network → Pick your created LAN

With that my BambuStudio have found and connected to my X1C without complications. If i got the time i wall play a little bit with the rules and look for an try and error on which rules really are needed but for now it works and i can focus on my other network setups and configurations.

I hope this will help some of you too so you dont have to use some scripts everytime before starting the Studio.

If you have a Linux box (like a Raspberry PI) that can talk to both VLANs you can use socat to forward the broadcast using this command:

socat -u  UDP4-RECVFROM:2021,fork,so-bindtodevice=eth0.2,broadcast  UDP4-SENDTO:192.168.178.255:2021,broadcast

Replace eth0.2 with the interface name for the VLAN which contains your printer and 192.168.178.255 with the broadcast address of the VLAN in which your computer is.

I put this in a small systemd service file in /etc/systemd/system/bambu-broadcast.service:

[Unit]
Description=Forward Bambulab Broadcast
After=network.target

[Service]
Type=exec
ExecStart=/usr/bin/socat -u  UDP4-RECVFROM:2021,fork,so-bindtodevice=eth0.2,broadcast  UDP4-SENDTO:192.168.178.255:2021,broadcast
Restart=on-failure

[Install]
WantedBy=default.target
RequiredBy=network.target
2 Likes

Hello, I found this trying to troubleshoot connectivity to my A1 printer.

I have a PFsense box with multiple VLANs, there is a UNIFI switch and an couple of UNIFI access points. I placed the bambu A1 printer on a VLAN where the 2.4Ghz is enabled. My clients PC are on another VLAN where only the 5Ghz is enabled, no 2.4.

I have created the proper firewall rules with aliases and ports for the PC to access/connect to the printer on the other VLAN. When I try to connect to the printer from a PC that is using an ethernet cable, it works and I can see that port 8883 is used. When I try to connect to the printer from another PC on the same network as the PC using the ethernet cable but this time using a wireless connection, then the PC cannot connect to the printer. I can see on my PFsense logs that port 3002 is used and it seems to be able to see the printer but in the Bambu studio application, I get a message about “cannot connect to the printer”.

So then I tried wireshark to capture some traffic. Traffic from the VLAN where the PC is to the VLAN where the printer is, gets through no problem. But traffic from the printer back to the PC that’s using the wireless connection is not working. The printer tries random ports like 49925, 49926 and 49927, so I thought opening those would work and I did that in PFSense. Then I tried connecting to the printer again but this time the printer tried to use ports 50218, 50230 and 50231. It’s different ports every time, so opening specific ones, is out of the question.

Is there a way to set a specific port in the software? I am also wondering why when using the Ethernet connection, it uses the ports that it shows on the Bambu wiki but when using wireless it doesn’t…

The printer is set on LAN mode only, I printed something yesterday and even used the video feature and all is good. What would be the difference when trying to connect to the printer via a wireless connection?

I seriously doubt there’s a way to change how the printer itself behaves.

I’ve been fighting a similar problem myself. In the process of researching that I read something about UDP broadcast requiring some extra effort to work for wireless devices (the 1990/2021 ports the printer is supposed to advertise itself on, I guess). Which sounds similar to the headache* I’m putting on myself in an attempt at getting an extra layer of security… maybe I should just rely on blocking the printer’s mac at the main router and be done with it…

*(No VLANs, just a second LAN/subnet blocked from getting to the Internet, but I can’t get the stupid printer discovery thing to work on the “main” LAN. Connecting by an IP and just forwarding ports would’ve been too easy, I guess.)

And you know, I found one really stupid problem for those of us who want to keep these printers totally offline.

Connecting to your own wifi and locking your network down, LAN mode, etc etc that’s all fine. But you still need to have the printer’s WIFI on to get to it. So what happens when you have a neighbor with a friggin unsecured WIFI, and you accidentally tap that thing when you’re scrolling to find your locked down WIFI network in the X1C console? :face_with_symbols_over_mouth:

One more reason to get that wired connection hardware addon done, once the warranty period is over.

This works!! I too have pfSense and multiple VLAN’s. I have been struggling to get the LAN mode to work and this got it going. THANK YOU!!!

I had done the steps listed in this post but the slicer could not see the printers. Adding a firewall rule to my Windows 11 workstation did the trick.

Both the A1 and P1S are now visible to the slicer (Orca and Bambu Studio)