My hardware setup is currently:
Router -> RPi (eth0) -> RPi (wlan0) -> subnet for my devices
My desired setup is:
Router -> RPi (eth0) -> RPi (wlan0 + eth1) -> subnet for my devices
The RPi access point creates a new subnet with hostapd and dnsmasq. It distributes new IP addresses over
wlan0, while getting its internet access over
eth0 is the interface of the dedicated ethernet port on my RPi.
I connected a USB-Ethernet dongle to my RPi to provide a wired connection to some devices. It is detected as
eth1. All devices connected to it (via a switch) need to live within the same new subnet and be able to find the devices connected over
I used RaspAP for my initial setup, but manual steps might be necessary now I think.
Creating a second hostapd config for
eth1 would just open a second subnet, as far I understand, so that's not what I want. I read something about installing a bridge for
eth1 (or "bonding" them together), and then choose the newly created interface as the AP interface via RaspAP but I didn't get it to work correctly.
What is the correct/best way to establish a subnet which can be accessed simultaneously via wifi (
wlan0) and the USB dongle (
eth1) of the RPi?
Edit: My dhcpcd.conf looks like this:
interface wlan0 static ip_address=10.3.141.1/24 static routers=10.3.141.1 static domain_name_servers=184.108.40.206 220.127.116.11 interface eth1 static ip_address=10.3.141.1/24 static routers=10.3.141.1 static domain_name_servers=18.104.22.168 22.214.171.124 interface eth0 static ip_address=10.168.57.151/24 static routers=10.168.57.1 static domain_name_servers=10.168.57.1 126.96.36.199
# to either the 4
wlan0 rules makes the other work, but having both entries uncommented, only the lower one works. Maybe it has something to do with conflicting static IP addresses or the router IP address, but doesn't they need to be the same, if I want them to be in the same subnet?
UPDATE with info from comment:
I am using a Raspberry Pi 2 Model B Rev 1.1 with Raspbian GNU/Linux 9 (stretch) and the TP-Link TL WN823N RTL8192EU WiFi Dongle.