lucas.rocha
Posts: 2
Joined: Thu Nov 08, 2018 2:57 pm
Location: BR / UK

Wlan0 - Eth0 Bridge WITH DHCP AP

Tue Nov 20, 2018 12:10 pm

Hello,

I have some devices connected via eth0 to my Raspberry Pi 3 B+ with the up to date Raspbian.
I would like to:
1. Make my RPi a wi-fi hotspot (DHCP) in order to be able to connect to the devices at Eth0 from my laptop via wi-fi... of course I can use a bridge however this is my problem. :x

The devices have IP addresses eg 192.168.1.XX so my network has to be (Wlan)192.168.0.X.

Its works with brigde, but without DHPC, I would like to connect at device with DHCP.
like this:

Laptop (DHCP) -----> wifi ------> RaspPi AP (Wlan0 192.168.0.1) ----> Device(Eth0 192.168.1.10)

Some idea?

SurferTim
Posts: 1769
Joined: Sat Sep 14, 2013 9:27 am
Location: Miramar Beach, Florida

Re: Wlan0 - Eth0 Bridge WITH DHCP AP

Tue Nov 20, 2018 12:29 pm

lucas.rocha wrote: 1. Make my RPi a wi-fi hotspot (DHCP) in order to be able to connect to the devices at Eth0 from my laptop via wi-fi... of course I can use a bridge however this is my problem. :x

The devices have IP addresses eg 192.168.1.XX so my network has to be (Wlan)192.168.0.X.
A bridge will have the same networks on both eth0 and wlan0. Do you want to use a bridge or a NAT AP? A bridge normally does not have a DHCP server on the RPi, but it can be set up as a DHCP server if your laptop doesn't have one.
https://www.raspberrypi.org/documentati ... s-point.md

lucas.rocha
Posts: 2
Joined: Thu Nov 08, 2018 2:57 pm
Location: BR / UK

Re: Wlan0 - Eth0 Bridge WITH DHCP AP

Wed Nov 21, 2018 2:40 pm

So, this is my problem, I can't connect in the device (this device have a internal webserver) if the rasppi or the device are not in the same network.
I would like to connect in my device from my Laptop...I really confused with this.

See the img bellow to understand.
Capture.PNG
Capture.PNG (52.33 KiB) Viewed 1234 times

SurferTim
Posts: 1769
Joined: Sat Sep 14, 2013 9:27 am
Location: Miramar Beach, Florida

Re: Wlan0 - Eth0 Bridge WITH DHCP AP

Wed Nov 21, 2018 2:56 pm

You should have set up the RPi as a bridge, and used one subnet on both interfaces. Like 192.168.1.x/24.

Ernst
Posts: 1246
Joined: Sat Feb 04, 2017 9:39 am
Location: Germany

Re: Wlan0 - Eth0 Bridge WITH DHCP AP

Wed Nov 21, 2018 2:58 pm

lucas.rocha wrote:
Wed Nov 21, 2018 2:40 pm
So, this is my problem, I can't connect in the device (this device have a internal webserver) if the rasppi or the device are not in the same network.
I would like to connect in my device from my Laptop...I really confused with this.

See the img bellow to understand.

Capture.PNG
No problem if you are using a bridge with a 192.168.1.x address on the bridge interface.
Important to remember, the AP does not have an IP address.
The Ethernet port does not have an IP address, it is the bridge address which is needed to connect to your raspberry.
Set your laptop IP address to 192.168.1.x, connect to the AP, and then talk to 192.168.1.10.
The road to insanity is paved with static ip addresses

andr3wz
Posts: 8
Joined: Wed Jan 16, 2019 12:54 am

Re: Wlan0 - Eth0 Bridge WITH DHCP AP

Thu Jan 31, 2019 7:15 pm

SurferTim wrote:
Wed Nov 21, 2018 2:56 pm
You should have set up the RPi as a bridge, and used one subnet on both interfaces. Like 192.168.1.x/24.
Hi SurferTim, I followed your procedure for creating the bridge.
I have configured a static IP for the interface but even if it tells me that the link is up I can not access the internet.
I'm connected to the wifi network radiated by the 4g router and I want to share this connection via eth.
The pi3 is connected to a router via cable.
Please help me.

Thanks

Return to “Troubleshooting”