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.