Share wireless connection with ethernet device - Raspberry Pi 3 (Raspbian) - linux

I would like to share a internet connection to a computer which is connected to Raspberry Pi 3 via ethernet cable. I am using WIFI connection for my Raspberry.
I have already set the IP settings on other computer but it does not work like when you are connecting two computers.
I need static IP on Raspberry and on other computer. I have already set that Raspberry has static IP (wlan0), but when I set ethernet (eth0) to static IP, internet on Raspberry stops working.
That is how my network should be
ifconfig from Raspberry
Thank you for your help, BR Matevz

I suggest you need to use a network range for the network between the computer and the Raspberry pi. The network between the router and Raspberry is 192.168.50.0/24
The network between the computer should be something different, for example it could be: 192.168.51.0/24
The Raspberry pi could then be 192.168.51.1 and the computer could be 192.168.51.2
You would then have to use IP forwarding on the PI and possibly NAT as well.

Related

Port forwarding using Raspberry Pi

I installed a PPP (Point to Point Protocol) in my Raspberry pi in order to connect with another Linux based card using serial port (with USB-RS422 cable). The PPP is well installed and configured, so from the raspberry pi I can ping the Linux card, my goal is to access the Linux card through the raspberry pi, I active the port forwarding in my raspberry pi also I added a route in my PC (Windows based).
For information, my PC is under my company network, the raspberry is under an IoT device network managed also by my company. Please have a look at the below diagram to well understood the situation.
enter image description here
My Question is : Do you have any idea to how can I access the based Linux
Card through the raspberry pi? Should I use nftables for that? if yes how? any other suggestions?
To clarify more, I changed the design, which means I connect my raspberry pi to my pc using ethernet cable and tried to ping the based card through the raspberry pi, it works well, means that I could ping the based card from my pc. Please have a look at the below picture:
enter image description here

Connecting laptop to Raspberry Pi with Node server

I have a web app running on a Node.js server on a Raspberry Pi. I can use my MacBook to connect to the WiFi for the Raspberry Pi only if the MacBook is plugged into an internet connection through an ethernet cable as well.
If an ethernet cable is plugged into my MacBook and then the other end is connected to LAN, I can use my WiFi to connect to the RPi, but as soon as I disconnect my ethernet cable from the MacBook, I cannot connect to the RPi via WiFi. How can I start troubleshooting this issue?

Raspberry pi with DP 4.1 cannot get IP from switch

As far as I figured out, Raspberry pi 3 which runs DP 4.1 cannot get IP address from my switch. Other devices on switch like PC's running windows or Rasbian installed Rasberries can get IP address as it should and be able to communicate each other. I tested my pi with both WiFi and cable connected router and it was able to get IP address normally. So I'm nearly sure that there is no problem on my Ethernet cable, pi or switch.
As a last note, the switches is Cisco sg100d-05 and I cannot use a router instead of this switch.
Is there anything that I can do to join this closed network on switch?

use raspberry-pi zero & wifi dongle as access point

what I want to do :
use Raspi zero & wifi dongle to build a access point, so that other device like smart phone or PC can access to rasperry pi directly.
image in my mind is like this :
internet >> wifi router >> raspberry pi zero >> other device
what I used:
raspberry pi zero
WIFI dongle buffalo wli-uc-gnm2 (http://buffalo.jp/product/wireless-lan/client/wli-uc-gnm2)
I follow these processes:
use rasp-pi 3 as access point
use rasp-pi 2 and 2 wifi dongles as a router (http://qiita.com/mt08/items/4247894833bd4dcb27e2#_reference-27aa37c4be7f602667ff)
In the 2 instrument, with 2 dongles raspi can link to the wifi router, at the same time be an access point.
My question is can I use 1 wifi dongle to do the same thing, since buffalo wifi dongle has the ability to be AP and like to wifi router at the same time, but I cant find the instrument their site, the driver is only for windows PC.
any advice for linux environment todo that ??
I don't know if it's possible to achieve this with only 1 wifi dongle and I'm not even sure if it's possible with 2 since the only way I am aware of to set up a Pi as an AP is to connect it to your router via Ethernet and connect devices to your Pi via Wifi. But either way, isn't it possible to use a usb-hub on the Pi zero and then use 2 Wifi dongles or 1 Wifi dongle + Usb to Ethernet?
And to set up things I'd recommend: https://www.maketecheasier.com/set-up-raspberry-pi-as-wireless-access-point/

Implementing Trickle Algorithm with Raspberry Pis over WiFi

I have three Raspberry Pi 2 Model B with me and each of them have been hardcoded to IP addresses such as 192.168.50.x/24 and each of them run an avahi-daemon in order to provide the mDNS and easier to ping when using the .local suffix.
for instance
Raspberry Pi #1
IP Address 192.168.50.1 subnet 255.255.255.0
hostname: hydrogenPi
mDNS: hydrogenPi.local
Raspberry Pi #2
IP Address 192.168.50.2 subnet 255.255.255.0
hostname: heliumPi
mDNS: heliumPi.local
Raspberry Pi #3
IP Address 192.168.50.3 subnet 255.255.255.0
hostname: lithiumPi
mDNS: lithiumPi.local
All the Pis are working in Ad-hoc mode and are using the batman-adv version 2015 which is available on the Pis already.
I would like to send some files over the ad-hoc network using WiFi (Dongle used LogiLink Wireless Adapters with Ralink RT5370 driver) using the Trickle Algorithm RFC Standard 6206.
Are there any available code snippets or ideas where I can start the implementation of the Algorithm?
NOTE: I want to flood the ad-hoc network with data in an efficient manner and hence I was thinking of the Trickle Algorithm. SInce it is now an RFC standard does it already have implementations available in Raspberry Pis like 6LoWPAN et.al. which I came across in lib/modules/4.13.7+/kernel/net/ in Raspberry Pi directory ?
Thanks
I have found a Python programmed repository on GitHub
There is a RPL(Routing Protocol for Low-power & lossy networks) Repository which is called simpleRPL
In the /RPL folder there is a simple Trickle Timer implementation

Resources