Cannot connect from local name


I can connect Octopi from my global IP address but cannot connect from localname (octopi or octopi.local).
I am running on 0.15.0 on a RPI3 B+.

I think my routers config (I have 2 subnets at home) are ok because I can connect from a mobile phone or from the subnet that is not octopi one using IP address and I can see my router connected to octopi configured as (octopi local address is
octopi B8-27-EB-23-BE-7D

It is really annoying because if I run a print then it is cancelled as soon the global address is renewed.

If anybody can help that would be really appreciated.

I think your problem with canceled prints on renewal of IP address is completely separate from the issue of connecting with the local name.

Find the DHCP server that provided the IP address to your OctoPi. Are you using that server as your DNS provider? If not, that is the issue with using the local name. On that same server, you should be able to configure it to use the OctoPi mac address to assign a fixed IP address and then you can edit your local hosts file (there's one hiding on Windows) to provide name to address translation if you don't want to change your DNS settings.

DHCP servers are enabled on my both routers.
On the router with RPI is connected I have enabled primary DNS as the local address of the router (
IP address of Octopi is already static.

After modifying the host file then I could access by adding in host file the router address and by typing octopi:.

The only limit of this solution is I have to make the same change on each of my devices.
Not sure if it is possible but is there a way a DNS can share a name with another router or DNS server?

Thanks for the help.

Is it true that none of the machines requesting a DHCP address can see both DHCP servers? The IT guy in me wants to see a network diagram. Some cleverness with domain names and or stacking of DNS addresses might work, but it is impossible to tell without more information.

Is the RPi on the same subnet as the Mac? I'm betting it isn't. Your router probably isn't set up to relay zeroconf information between subnets (nor should it be, unless you explicitly set it up to do so).

Here is the schematics of the network. Sorry I am not an IT expert so this is not a professional one but I think it illustrate the config.
As said before on router 2 octopi name is seen as assigned to octopi MAC and address.

Now I can access by octopi: if I add the line " octopi" to my computer host file.

What would be better is to access octopi name from any device connected to router 1 (phone, tablet...)without having to modify host files on every devices.
Is it doable?

No it is not.
Not sure what you mean by "setup to relay zeroconf info" (DMZ???)
I configured the NAT and forwarding rules and I can access from IP addresses without any issue.
Issue is really accessing from local name.

The way this octopi.local stuff works is through a name resolution mechanism based on multicast addresses in your local network (called zeroconf/bonjour/avahi/mdns - for some reason it has a ton of names). In your case, your Pi will announce itself in your 192.168.0.x subnet. But unless your router2 is told to forward this kind of announcements into your 192.168.1.x subnet, no client from the subnet will be able to resolve that name.

That's what @supertaz meant with "setup to relay zeroconf info".

tldr: your network setup is preventing name resolution to work. It will probably be easiest if you define a special name resolution rule in your router1 (and have that as primary DNS for your clients on that subnet) that resolves octopi to your Pi's IP on the other subnet.

@foosel is correct. I think I assumed a little too much from your use of multiple routers and subnets and apparent understanding...I'm sorry about that. Your routers may be able to proxy or bridge your multicast traffic, but it's going to be something more advanced and it's not really something that you should be going into blindly.

Other things you could do would be to connect either the computer or the RPi to the other subnet instead of the one it is on (probably the RPi in this case) or turn router2 into a bridge if there isn't a particular reason why you have a second subnet.

If router1 doesn't have a mechanism for announcing custom DNS inside your network (some of them do, others only proxy DNS or pass on the DNS servers they receive from your ISP), your other option would be to use another server/RPi connected to Router1 as a DNS server for your entire network, and have both router1 and router2 specify it via DHCP and set it manually on any machines that don't use DHCP. Again, a bit more complicated than just doing it on your router, but still probably easier to figure out than multicast/zeroconf stuff, and I could probably dig up a guide for you somewhere on how to do it on a RPi if you have to go that route and don't know how. If one doesn't exist for the RPi and that's what you decide to use, I can figure out the steps and post the details for you (I've done it countless times, just not on a RPi).

There is a much easier way to configure this network if my guess is correct... Router 1 does not have WiFi, Router 2 does. If this is true, then Router 2 should be reconfigured to be an Access Point.

This is very easy to do as it just requires a couple of software changes and to move the ethernet wire connected to the WAN port on router 2 to one of the LAN ports.

The software changes are:

  1. Change the LAN network IP range from to and give Router 2 a fixed address not in use. I'd pick
  2. Turn off DHCP in Router 2
  3. (Optional) In Router 1, change the DHCP range so that it does not include the IP address assigned to Router 2. I usually change the starting address to or set the range to to which gives you plenty of reserved addresses while still allowing for 99 DHCP assigned addresses, more than enough for home networks (and most small business networks).

Some WiFi routers will have an option in their web interface to convert them to Access Points which essentially does the above changes by checking (or unchecking) one box.

With these changes, OctoPi can either get a DHCP address from Router 1 or can be assigned a fixed address in the range and all devices are in the same net block. The other advantage is that WiFi connected devices will not have to double NAT to get to the WAN / internet which is a performance improvement.

1 Like