I have a RaspberryPi set-up through wifi to work as a samba server (external harddrive). It works great and all my devices can connect to it. I also have an old laptop I'm setting up as an Ubuntu Kodi media client that is currently accessing the files through samba via wifi too.
So 2 devices, both on wifi, and one accessing the files from the other through samba and it works fine. But the 2 devices are literally next to each other, and I'm wondering if it's possible to connect them with an ethernet cable and instead of file sharing via wifi and samba, if I can do the filesharing via the cable. The tricky part is to still have both devices get the internet through wifi individually.
I added the following to /etc/dhcpcd.conf but once I connect the ethernet, I still lose connection and can't even ping the static ip address.
interface eth0 static ip_address=192.168.1.24/24 static routers=192.168.1.1 static domain_name_servers=127.0.0.1 nogateway interface wlan0 static ip_address=192.168.1.15/24 static routers=192.168.1.1 static domain_name_servers=127.0.0.1
Pi-4 Without the cable plugged in:
default via 192.168.1.1 dev wlan0 proto dhcp src 192.168.1.15 metric 303 172.17.0.0/16 dev docker0 proto kernel scope link src 172.17.0.1 linkdown 192.168.1.0/24 dev wlan0 proto dhcp scope link src 192.168.1.15 metric 303
Pi-4 With the cable plugged in:
default via 192.168.1.1 dev wlan0 proto dhcp src 192.168.1.15 metric 303 169.254.0.0/16 dev eth0 scope link src 169.254.89.13 metric 202 172.17.0.0/16 dev docker0 proto kernel scope link src 172.17.0.1 linkdown 192.168.1.0/24 dev wlan0 proto dhcp scope link src 192.168.1.15 metric 303
The other Ubuntu laptop with the cable plugged in:
default via 192.168.1.1 dev wlp2s0 proto dhcp metric 600 169.254.0.0/16 dev wlp2s0 scope link metric 1000 192.168.1.0/24 dev wlp2s0 proto kernel scope link src 192.168.1.16 metric 600