2

All the material I find on the internet, is about sharing PC's internet connection with Rpi using the ethernet cable, and setting RPi static address etc.

However, My RPi 3B already has it's own wifi connection to the Internet. I don't need to share any internet connection between my windows 10 PC (also has it's own WiFi connection).

All I want is to be able to communicate internally between the two machines using the ethernet cable, while they're both connected to their own internet.

Is it possible, to configure the eth0 independently without affecting the wlan0 connection? I'm not sure that if I go ahead with a static IP config, will the RPi lose the usual wifi connection to internet?

Can you please give me some pointers on how to configure such a pure internal p-2-p connection between PC and RPi3b?

2
  • There are many ways of connecting over Ethernet, and it is possible to independently configure interfaces. BUT why do you want to do this if both machines are connected to the same router? What do you want to "communicate"?
    – Milliways
    Jan 22, 2018 at 9:33
  • Well, not everything needs to be sent to the wifi signal (and made potentially public). Some internal communication can be securely done within the 2 machines. :-)
    – Mithun
    Jan 22, 2018 at 15:11

2 Answers 2

2

Ahh ok, I just did it :)

Instead of editing the /etc/dhcpcd.conf for setting the static IP, I edited the /etc/network/interfaces file, to set a static IP for the eth0 alone.

Now my PC can access the RPi with the static IP I see in ifconfig for eth0, without disturbing each other wifi internet connectivity.

Pure peer-to-peer connection achieved. Didn't know it was this easy!

2
  • This is something I'm interested in also. I have a question or two: From /etc/network/interfaces: # Please note that this file is written to be used with dhcpcd # For static IP, consult /etc/dhcpcd.conf and 'man dhcpcd.conf' So what entries did you make in this file - can you share them?
    – Seamus
    Apr 10, 2018 at 4:03
  • Added another answer below, for you.
    – Mithun
    Apr 11, 2018 at 11:54
1

@seamus The entries I added to the end of this file are:

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
address 169.254.1.10
netmask 255.255.0.0

However, later I commented these lines out, and just installed another utility called 'fping'. That simply made my work easier. And all I had to do in Windows was to "Enable" ping response, with a long series of steps detailed here.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.