billrv
Posts: 25
Joined: Sat Mar 12, 2016 2:32 pm

Re: RaspberryPi 4 as access point BRIDGE not working

Tue Aug 06, 2019 5:57 am

I tried the original instructions for setting up a bridge and it didn't work and when it did it wasn't reliable.

I tried the newer instructions for setting up the bridge from 7/31 and they work, at least for now.

But I need the bridge to have a static IP address in my network. How do I specify that?

EDIT: added...
I need the bridge to have static IP address 192.168.2.39/16 and gateway 192.168.0.1. I also need DHCP to hand out addresses 192.168.2.37-38 to devices that connect to this AP. There will be other AP's on the network that will hand out different address ranges and other static IP addresses but all the same gateway.

Thanks,
Last edited by billrv on Tue Aug 06, 2019 12:32 pm, edited 1 time in total.

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

Re: RaspberryPi 4 as access point BRIDGE not working

Tue Aug 06, 2019 6:16 am

billrv wrote:
Tue Aug 06, 2019 5:57 am
I tried the original instructions for setting up a bridge and it didn't work and when it did it wasn't reliable.

I tried the newer instructions for setting up the bridge from 7/31 and they work, at least for now.

But I need the bridge to have a static IP address in my network. How do I specify that?

Thanks,
I do not have the means to test at the moment but you could try for yourself to follow the instructions (see below) in /etc/dhcpcd.conf to specify a fixed address for the interface br0.

Code: Select all

# Example static IP configuration:
#interface eth0
#static ip_address=192.168.0.10/24
#static ip6_address=fd51:42f8:caae:d92e::ff/64
#static routers=192.168.0.1
#static domain_name_servers=192.168.0.1 8.8.8.8 fd51:42f8:caae:d92e::1
What I would try is to include the following (example) at the end of the file:

Code: Select all

interface br0
static ip_address=192.168.0.10/24
static routers=192.168.0.1
static domain_name_servers=192.168.0.1 8.8.8.8
Update: the above configuration works, tested on a Pi 4.
The road to insanity is paved with static ip addresses

billrv
Posts: 25
Joined: Sat Mar 12, 2016 2:32 pm

Re: RaspberryPi 4 as access point BRIDGE not working

Tue Aug 06, 2019 12:43 pm

Ernst wrote:
Tue Aug 06, 2019 6:16 am
billrv wrote:
Tue Aug 06, 2019 5:57 am
I tried the original instructions for setting up a bridge and it didn't work and when it did it wasn't reliable.

I tried the newer instructions for setting up the bridge from 7/31 and they work, at least for now.

But I need the bridge to have a static IP address in my network. How do I specify that?

Thanks,
I do not have the means to test at the moment but you could try for yourself to follow the instructions (see below) in /etc/dhcpcd.conf to specify a fixed address for the interface br0.

Code: Select all

# Example static IP configuration:
#interface eth0
#static ip_address=192.168.0.10/24
#static ip6_address=fd51:42f8:caae:d92e::ff/64
#static routers=192.168.0.1
#static domain_name_servers=192.168.0.1 8.8.8.8 fd51:42f8:caae:d92e::1
What I would try is to include the following (example) at the end of the file:

Code: Select all

interface br0
static ip_address=192.168.0.10/24
static routers=192.168.0.1
static domain_name_servers=192.168.0.1 8.8.8.8
Update: the above configuration works, tested on a Pi 4.
OK. That worked. Thanks.

The gateway is supplying DHCP. I need this AP to hand out DHCP addresses 192.168.2.37-38 only on this AP. There will be other AP's on the network with different static IP's and need to hand our different DHCP address ranges. Is that something I need to configure on the router or can/must it be done on each AP? And how to specify?
Thanks

epoch1970
Posts: 3801
Joined: Thu May 05, 2016 9:33 am
Location: Paris, France

Re: RaspberryPi 4 as access point BRIDGE not working

Tue Aug 06, 2019 1:16 pm

A bridge only applies within a given network. A bridge is exactly like a physical network switch device.
Contrast that with a router, placed at the border between 2 networks.
You seem to want to use 2 networks, you don't need a bridge, you need to setup your Pi as a router.

EDIT
I need the bridge to have static IP address 192.168.2.39/16 and gateway 192.168.0.1
Nope. The term "Gateway" is exchangeable with "Router". So if you want a 192.168.2.0/24 network, the router/gateway needs to be somewhere on that same network, e.g. 192.168.2.1.
If the router at 192.168.2.1 has another interface, say at 192.168.0.10, it can allow traffic to cross over to the 192.168.0.0/24 network.
And from there to the internet I guess, via the router at 192.168.0.1.
"S'il n'y a pas de solution, c'est qu'il n'y a pas de problème." Les Shadoks, J. Rouxel

Return to “Troubleshooting”