Only one pc of my lan can reach rasp/Octoprint

I am replying to you on purpose this time :slight_smile:

He said he is using DHCP and then fixed the IP in his router. And then using IP address to address things with out using DNS (or Bonjour) based hostname resolution. So in theory (if the above is all true) if routing is correct and no firewalls the ping should work if directly using IP address.

edit: Except it appears it doesn't, so something not quite right somewhere, and one of the above is not ture

I wondering if there is something misconfigured on the network and due to windows netbios magic it sorts itself out, and only becomes obvious once the PI is on the network using more traditional TCP/IP.

(and I to you on purpose) :grin:

I believe there's more than one way to get a "fixed" or "static" IP address on the LAN.

One, is to just do it manually which requires that one configure not only the address, but the netmask, gateway, and DNS. If something changes in the network, it must be manually changed on each system.

Second, the DHCP server (usually) has the ability to assign an address "permanently" to a given device (I think this is called a static lease). One advantage to this approach is that if the DNS servers are changed, the DHCP server will change both its dynamic and its static leases automagically.

I don't believe we know which method @Anatoli used, he will have to tell us.

That is a fixed IP, i.e. a fixed lease to an IP in a DHCP servers allocation range. You will automatically be provided the same IP address on that dynamic network when the MAC address matches (assuming you dont spoof it).

A static IP address is when you manually set it up, and you can go crazy and put anything in, but if it doesnt match routing, broadcasting etc wont work.

So on my network I have a Linux firewall that use a range of IPs for DHCP, some of these I then fix, but I leave space in the network Ip range for static servers, although to be honest these days just easier to fixed a dynamic IP. All server use the firewall as both the gateway and the dns server, and then I can control what sites people (i.e. kids) can get to via either IP or DNS.

Either way there should be a broadcast IP address, usually 192.168.09.255 on a 192.168.0.0/24 network, and this is what should be used to make the ARP call, so that the machine can get the MAC address of the PC/Mac/PI it needs to talk to. This seems to be broken.

Edit: Anatoli said 'static' but he meant 'fixed/fixed lease' from his description, it was at the start of the thread somewhere.

Hi,
i reply to you @b-morgan even for @Elminster :slight_smile:

I really think there is something in my lan.
Anyway...

I believe there's more than one way to get a "fixed" or "static" IP address on the LAN.

I've assigned the IP's to each network card: IP, subnetmask, gateway (192.168.0.1) and DNS.

Second, the DHCP server (usually) has the ability to assign an address "permanently" to a given device (I think this is called a static lease).

The router has DHCP server enabled but, the PC's IPs (RASP as well) are marked as "permanently" so the DHCP can't use that ip for other devices.

That sounds like you have fixed the lease in the DHCP server, but then manually assigned the IP address to the machines?

If so that is not quite right, they should be reserved in the DHCP server and then it automatically issues the IP address to the PCs and only them (by using there MAC address). But that shouldn't actually stop things working, just not quite how it is meant to be done, and potentially leads to misconfiguration. i.e. it should be fixed (lease) IP or static IP, not combination of both.

they should be reserved in the DHCP server and then it automatically issues the IP address to the PCs and only them (by using there MAC address).

Ok, good to know, thanks. (even if unfortunally doesn't fix the problem).

The info above suggests PC1 is on gigabit ethernet and PI & PC2 is on wifi?

Yes it is. but i tried even with PC2 via ethernet and another PC, (PC3 same configuration of PC1) via ethernet as well and nothing.
Same results no one can ping RASP.

I really don't know...

Other info:

  • from PC2 i can ping all the PCs in my LAN, even IPAD o my lan's printer... i can't ping only RASP.

Maybe there is some Octoprint configuration?

Have you tried the PI on ethernet?

I would also remove all the static IPs and let the DHCP handle the fixed leases, it will also configured all the DNS, gateways etc. If you are manually doing it you may have missed something.

For instance what is the gateway and dns setup on the PI?

So from above info I think this is what we have, some gaps need filling.

Raspberry Pi
Hostname: Octopi
Domainname: N/a (Bonjour .local)
IP Addr: 192.168.0.33
MAC Address: dc:a2:31:5c:1s:fs
Static/DHCP Assign Fixed IP/DHCP Assign Dynamic IP: Static/Fixed IP Hybrid?
Subnet: 192.168.0.0
Mask: 255.255.255.0
Broadcast: 192.168.0.255
Gateway:
DNS:

PC1
Hostname: MYPC
Domainname:
IP Addr: 192.168.0.22
MAC Address: 1A-2B-5D-E1-13-Z9 (although in ARP Pi has 1c:1z:03:f4:14:d9)
Static/DHCP Assign Fixed IP/DHCP Assign Dynamic IP: Static/Fixed IP Hybrid?
Subnet: 192.168.0.0
Mask: 255.255.255.0
Broadcast:
Gateway: 192.168.0.1
DNS: 8.8.8.8
8.8.4.4
192.168.0.1

PC2
Hostname: Andrea
Domainname:
IP Addr: 192.168.0.128
MAC Address: 68-91-21-92-19-7s
Static/DHCP Assign Fixed IP/DHCP Assign Dynamic IP: Static/Fixed IP Hybrid?
Subnet: 192.168.0.0
Mask: 255.255.255.0
Broadcast:
Gateway: 192.168.0.1
DNS: 8.8.8.8

Router
Hostname:
IP Addr: 192.168.0.1
Mac Address: c3:da:13:5d:fd:a2
Subnet: 192.168.0.0
Mask: 255.255.255.0
Broadcast:
Gateway:
DNS: 8.8.8.8

Router Connections
Wired to PC1
Wifi to PI
Wifi to PC2

@Anatoli, please make the following changes:

On the router, make sure that it has a DNS server enabled and it is using 8.8.8.8 and 8.8.4.4 as forwarders (i.e. where it goes when it can't resolve a name). The router's DHCP server should be configured to distribute 192.168.0.1, (and optionally) 8.8.8.8, and 8.8.4.4 in that order.

Change the DNS server list on all systems to have 192.168.0.1 as the first entry. Add 8.8.8.8 and 8.8.4.4 as well if you like. Make sure the gateway is 192.168.0.1.

Either reboot each system after the changes or turn their network off and on.

Let us know if that makes things better (or worse) :sweat_smile:

For instance what is the gateway and dns setup on the PI?

Ok... that's what i've done inside file etc/dhcpd.conf

interface wlan0
static ip_address = 192.168.0.33
static routers = 192.168.0.1
static domain_name_server = 192.168.0.1

I agree I think the network needs to be sorted out so that everything is correctly using DHCP Fixed Leases so that the machines all configure themselves correctly and use the router as the source of all info. (Or go through all the static config with a fine tooth comb, and if possible use IPs completely outside the range of the DHCP server for true static)

I think the machines are getting confused. The PCs should certainly be doing DNS via 192.168.0.1 and not going directly externally.

The router use DNS from my internet provider so i'd like to keep them.

I could disable all the fixed IPs and DNS and let the router assign it to all devices... but i've just tried this way (before assing fixed IPs) without result.

That is correct. The router should do the DNS forwarding, not the PCs directly. Otherwise if for some reason you didn't want to use 8.8.8.8 any more you would have to manually change it everywhere, instead of just one place.

It is okay with a couple of devices, but once you get to 10s or 100s, that will get painful fast.

Ok, i'm gonna make a new try removing all fixed IPs and let the router assign them to devices.

That's fine, it doesn't matter what DNS your router uses. I think its doing its job (or you wouldn't be here :wink:). BTW, what brand / model is the router?

The important change is all the other systems on your LAN.

I have 40+ devices on my LAN which is both Gigabit Ethernet and WiFi. With the exception of my firewall (which is the router, DHCP server, DNS server, NTP server, etc.), network printers, and my WiFi access point, everything is DHCP configured. I don't have any static leases. Everybody can talk to everyone else using their names (maybe my smart plugs don't do names and my multiple Echo Dots all answer to "Alexa" :grinning:)

I forgot to mention, the IP address assignments in my LAN haven't changed (except additions) in years. The firewall hardware has been changed but DHCP protocol says that each system requesting an IP address (lease) can ask for a specific (usually the one they currently have) address and the DHCP server will grant that request unless there is a conflict.

Beating me I am around 35 devices active at the moment (according to network scanner) via a Linux Firewall/Gateway, hiding my network from the ISPs router. I use both DHCP Fixed and non fixed leases, and a few Static IPs that I setup decades ago. Mixtures of several meshed Wifi APs, Gigabit Cat5 and ethernet over power lines. With a mixture of Linux & Macs (and a windows laptop somewhere). And plugging in Octopi just worked without me doing anything networkwise but telling it wifi ssid and secret (at the last count I had 20 RPIs, not all switched on at the same time as the lights dim).

I suspect something on PCs (except PC1) is not configured correctly that hopefully DHCP will sort.

turn off ipv6 on the pi. I have had that hose up a lot of things because some routers don't support ipv6 completely. ssh in to the octoprint pi. then sudo nano /boot/cmdline.txt
add the following at the end of the command line ipv6.disable=1
then do Ctrl-X, Y and enter reboot the pi