0

The reason "bridge" is on quotes is because I don't know if that is what I really need or if it is possible to do.

I have a device with an Ethernet port, a Siemens PLC, s7-300.

I want to plug it to my Raspberry 3b+, and connect the Raspberry to an existing Wifi on my network, so I can communicate with the PLC.

Or plug it, and then create a "dumb" AP with the Raspberry and connect another device on the same network via Wifi to the rasp, so everything is connected and networking.

What I mean by dumb is that I don't want the Raspberry to act as a DHCP server, I already have a router that deals with that and I do not want it to interfere.

I have tried a lot of guides i found on google but nothing works, the best i could get was creating the AP so if i plug the pi to the router by LAN, it gets internet connection and the Wifi of its AP give internet to the devices connected to it, but i can only ping devices from Wifi to LAN, I can't ping from a device connected by LAN to one by Wifi.

So....

PLC----Rasp via cable.     Rasp------Existing SSID.
                       or
           Rasp AP----- Some computer on the same network 
                                    receives it

Is any of this possible?

  • I don't believe bridging is possible when the pi is in station mode. You could instead use routing? – Torin Apr 25 '18 at 10:44
  • My knowledge about networks are quite limited, i dont really know the difference between bridging and routing... D: – nacho7592 Apr 25 '18 at 12:15
  • Bridging forwards ethernet frames without considering IP addresses, whereas routing forwards IP packets based on IP addresses. The latter is probably what you'd want if you're doing it over WiFi – Torin Apr 25 '18 at 12:27
  • that sound good, is the procedure similar to bridging? – nacho7592 Apr 25 '18 at 13:07
  • Depends on how you want to do it. If you just want internet accessibility for the PLC, then you could use an iptables SNAT rule to make that traffic look like it's originating from the pi. Alternatively you could have your main router route a specific subnet to the pi, which would contain the PLC. Then the pi just needs to route packets. One main downside of routing is that you may have to setup things like DHCP (if the PLC requires it). It's a fairly straight forward process but you may benefit from getting a grasp on the Internet Protocol first. – Torin Apr 25 '18 at 16:27
0

OK so finally i think i have it, i followed this steps:

Linux internet sharing (I) - Wifi to LAN (NAT)

But i think i still need to do one more step, set static routing on the network router so i can access the eth0 subnet of the pi from any device on the main network.

Tomorrow i will try it at work.

  • If this works, please import the relevant details from the link. – Jeff Schaller Apr 29 '18 at 13:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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