User avatar
Botspot
Posts: 1262
Joined: Thu Jan 17, 2019 9:47 pm
Location: Texas
Contact: Website

Connecting 2 Pies together using Ethernet cord?

Fri Jan 10, 2020 2:23 pm

What would this setup do?
piconnected-min.png
piconnected-min.png (125.89 KiB) Viewed 396 times
Would the Pies be able to see each other on a local network, or would absolutely nothing happen? If they could see each other, could one connect to the other using VNC or SSH?
I've developed the most intuitive RaspiOS img editor on the planet.
With a GUI similar to Gparted, managing imgs and sd cards is a breeze!
Boot it in a VM, Flash from the Internet at top speed, Mount (to drop in files), Shrink/Expand, Repair, and more.
https://github.com/Botspot/Pi-Power-Tools
> 400 users! 8-)

trejan
Posts: 2118
Joined: Tue Jul 02, 2019 2:28 pm

Re: Connecting 2 Pies together using Ethernet cord?

Fri Jan 10, 2020 2:29 pm

The Ethernet link should come up as the LAN7515 Ethernet chip on the Pi 3B+ supports auto MDI/MDI-X so a special crossover isn't needed. Just plugging in a regular network patch cable should work.

If you configure both with a static IP address then they should be able to communicate with each other as well. Otherwise you'd need to setup a DHCP server on one of the Pi boards.

User avatar
DougieLawson
Posts: 39121
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Connecting 2 Pies together using Ethernet cord?

Fri Jan 10, 2020 2:46 pm

Easiest way to get the RPis to see each other is make one the master.

Assign a fixed IP address in /etc/dhcpcd.conf on that master machine.
Run dnsmasq as a DHCP server on that master machine.

The other Raspberry will get a DHCP address from the range you've got in dnsmasq.conf.

/etc/dhcpcd.conf

Code: Select all

option rapid_commit
option domain_name_servers, domain_name, domain_search, host_name
option classless_static_routes
option ntp_servers
require dhcp_server_identifier
slaac hardware
nohook lookup-hostname
interface eth0
static ip_address=192.168.3.14/24
static routers=192.168.3.14
static domain_name_servers=192.168.3.14 8.8.8.8
/etc/dnsmasq.conf

Code: Select all

interface=eth0
dhcp-range=192.168.3.141,192.168.3.142,255.255.255.0,24h
So the master RPi will have an address 192.168.3.14 and the other RPi will either be 192.168.3.141 or 192.168.3.142.
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

LTolledo
Posts: 3424
Joined: Sat Mar 17, 2018 7:29 am
Location: Anime Heartland

Re: Connecting 2 Pies together using Ethernet cord?

Sat Jan 11, 2020 3:19 am

one other way, as I did in my previous test, is to assign each RPi with static IP address
RPi1: 192.168.3.141
RPi2: 192.168.3.142

if RPi2: 192.168.4.142, both RPis may mot be able to communicate with each other.
"Don't come to me with 'issues' for I don't know how to deal with those
Come to me with 'problems' and I'll help you find solutions"

Some people be like:
"Help me! Am drowning! But dont you dare touch me nor come near me!"

User avatar
DougieLawson
Posts: 39121
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Connecting 2 Pies together using Ethernet cord?

Sun Jan 12, 2020 6:57 am

My way has an advantage. If you connect a small switch (five port in my case) between the two raspberries and connect your laptop to the switch it will also get a DHCP IP address. You can then use it to ssh into either of the raspberries.

https://www.amazon.co.uk/NETGEAR-GS205- ... B00AYRZYG4
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

Return to “Beginners”