Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 3466

Networking and servers • Pi 4B Cluster DHCP Server Help

$
0
0
Hello! I'm trying to build a pi cluster using this raspberry pi tutorial: https://www.raspberrypi.com/tutorials/c ... -tutorial/ however, my setup is slightly different and the tutorial may be outdated?

What I have is 8 raspberry pis, 8 SD cards with each having Ubuntu Server 24.04.1 LTS (64-bit) loaded on them with names starting at pi0 to pi7. I also have an 'unmanaged' switch board and each raspberry pi's ethernet port is plugged into the switch board. The head node (pi0) has a USB to ethernet plugged into it that is connected to the router.

Unlike the tutorial, I do not have PoE+ HAT boards for the pis, I do not have a PoE enabled switch I believe? Not using PoE at all since each pi has it's own power cord. I also do not have an external drive since each SD card is 128GB and I do not want to do network booting.

With that out of the way, on to the tutorial. I was able to ssh into any of the pis perfectly fine but the first issue I had was with the very first command, `nmcli`. After installing the package needed for the command, my output was somewhat different from the tutorial so that was confusing, but I assume it is because I am using ubuntu rather than raspberry pi OS.
WindowsTerminal_tdD21QuWGe.png
The next part of the tutorial gives the command `sudo nmcli con mod "Wired connection 1" ipv4.addresses 192.168.50.1/24 ipv4.method manual` to run, however I then again encounter an issue that has to do with Ubuntu I assume:
WindowsTerminal_soV5eg5bdG.png
Ignoring those for now, I move on to the next step of turning the head pi (pi0) into a dhcp server so the other pis on the switch board can get an IP address from the head pi's dhcp server.
I edit my `/etc/dhcp/dhcpd.conf` and copy-paste the tutorial's file at the bottom, changing the heaad node's MAC address to my own and changing all the 192.168.50.XX to use 192.168.1.7.XX since 7 is my lucky number, and I edit my `/etc/default/isc-dhcp-server` and `/etc/hosts` files just like the tutorial shows.

The next issue is that the tutorial uses a 'managed' switch box, so it automatically requested it's own IP from the head node's dhcp server, however mine is 'unmanaged' it would appear, and therefore does not, so I'm not certain of it's MAC address to edit into the `/etc/dhcp/dhcpd.conf` file.

Skipping over the "Add an external disk" and "Make the disk available to the cluster" sections, the tutorial says to boot up one of the pis and it should request and get an IP address from the head node's dhcp server but mine do not. Nothing shows up when I run `dhcp-lease-list` unlike the tutorial, leaving me stumped.

If I flash the second pi with wifi passwords already set, I can ssh into it fine but if I run `ip link set eth0 up` to turn on the ethernet and then use the same command to turn the wlan0 off, it still doesn't show up. Normally I had the second pi without wifi set up and it still wouldn't connect to ethernet.
---

So, I'm not sure where to continue. I've tried googling lots and trying different things that I haven't listed, but none have worked yet.
If anyone has any cluster tutorials that fit what I'm using and are up-to-date, that would be much appreciated.
Otherwise if anyone notices any errors I've made or things for me to try out, please let me know!

Statistics: Posted by CMDR-JohnAlex — Mon Oct 28, 2024 9:41 pm — Replies 1 — Views 18



Viewing all articles
Browse latest Browse all 3466

Trending Articles