Pi2 LAN

October 25, 2023, 23:25

999techhead

I'd like to get my Pi2 LAN up and running. I have zero experience with networking and raspberry pi's. Right now I have four RIP2's plugged into an unmanaged dell 2848 powerconnect switch. I would like to be able to transfer files between them. Where do I start? The Pi's have all been updated and are running rasperian.

oops.se

You can do it two ways: 1. Set Static IP Addresses for each Raspberry Pi. 2. Set one Raspberry Pi to be a DHCP server and the rest to be DHCP Clients The DHCP Server can assign IP addresses to the other 3. A Raspberry Pi is by default a DHCP client. And a correction, raspbian has changed name to "Raspberry Pi OS" since a year or two.

oops.se

oops.se

And are you planning to add a connection to internet?

999techhead

Right now I'm just happy that they have running OS's. I'd be happy just to start with them being able to pass a file around.

oops.se

To share files between them can be done with SSH/SCP or Samba (Windows file sharing). There is a nifty little tool that I use from time to time called sshfs and that stands for SSH File System. So you uses SSH to mount a filesystem on a remote computer as a local disk.

oops.se

So I suggest this IP plan: RPi 1:
interface eth0
static ip_address=192.168.1.10/24
RPi 2:
interface eth0
static ip_address=192.168.1.20/24
RPi 3:
interface eth0
static ip_address=192.168.1.30/24
RPi 4:
interface eth0
static ip_address=192.168.1.40/24
And assign to each RPi:
static routers=192.168.1.1
static domain_name_servers=192.168.1.1

999techhead

My issue is a lack of ability to download anything. I might have to just take my setup closer to an actual ethernet cord. These don't have wifi.

999techhead

My theory was that I'd be able to somehow share the internet over an ethernet cable to the switch.

999techhead

My desktop has a wireless adapter to receive the internet and I'd like to extend that to the pi's and also network the desktop into the sharing. The desktop can be booted in Windows 10 (free version) or Ubuntu.

999techhead

So that's my challenge and I'm not sure how to get the first part done, which I guess now will be the last part. I have to get some internet to the little guys.

999techhead

I'm typing these commands into a terminal but the OS doesn't recognize with "bash: static: command not found"