What will be the IP of the following bridge interface?

Solution 1:

if I create a bridge interface of br0, in order to add wlan0 and eth0 together

This actually works in this case because wlan0 is an access point (AP), and you can bridge APs. You cannot bridge a client WLAN (which is a FAQ).

what the final IP of the br0 will be

It will get whatever it gets assigned. As you bridge eth0 and wlan0, that means they will span a single subnet. There is a DHCP server behind eth0, so this server will react to any DHCP request in either LAN or WLAN. So if you configure your br0 with DHCP, it will get whatever the DHCP server assigns to it (a 192.168.1.x address).

This also means you can no longer run the DHCP server on this machine, because then you will have two competing DHCP servers for the same subnet. That it turn makes it difficult to provide DNS, as you'll have to configure the DHCP server behind eth0 for that.

If that's not what you want, then route, and don't bridge. This means you also need a route to the WLAN subnet on the gateway behind eth0 (most likely your home router), and that box should also handle NAT in this second subnet. So you may need an open firmware (like OpenWRT) on the home router to configure this.

If your home router doesn't allow this, it will get difficult - avoiding double NAT with off-the-shelf home routers is a PITA.


I don't really understand "[main router] acts as a DHCP server from pi-hole itself for this subnet." - usually the main router is part of the the WLAN subnet and then acts a DHCP server via its own WLAN interface. It cannot really act "from the Pi-hole" as a DHCP Server. Also, in that case usually the WLAN interface of the home router is the AP, and you cannot have a second AP on the Pi-hole.

Anyhow, if the router is configured as a DHCP server both on the LAN 192.168.1.x and the WLAN 192.168.2.x, and you bridge them, no matter if on the Pi-hole or somewhere else, no matter where the APs are, then you have two subnet ranges with competing DHCP servers on the same broadcast domain, both of which (two subnet ranges, and competing DHCP servers) is a recipe for chaos. Don't do that.

Also note that you don't "merge subnets as br0". You are making a (software) bridge, and that bridge has ports to both subnets, as well as a third internal port called br0 towards the OS of the box where the bridge runs.