I am trying to connect a wifi interface directly to an ethernet switch port independent of and isolated from the rest of the OpenWrt hardware/functionality. The aim is to connect wifi devices into this network completely isolated from other connections and the "internet router" functionality of the OpenWrt device. The switch port is connected to a separate network with its own DHCP server, etc.
The OpenWrt device is a BT Home Hub 5A running LEDE Reboot (17.01.4, r3560-79f57e422d).
I have a bridge interface on vlan 5 (interface option ifname eth0.5) and I have attached the wifi interface (wifi-iface option network) to it. I have configured a switch_vlan entry to connect switch port 2 to the vlan 5 bridge.
Note the "CPU" port is not connected to the switch. I presume this means the firewall config doesn't apply but I created a firewall rule for the bridge network that accepts all (just in case).
The basic topology is this:
|<--------- OpenWRT -------->|
|Client|--->|Wifi|--->|Bridge|--->|Switch|--->|Switch|--->|Server|
|port 2|
When I connect a wifi device I can see it making DHCP requests and I can see the DHCP server responding to those requests with an offer. I can follow (with Wireshark) the offer right through the network to the network's switch port that is connected to switch port 2 of the OpenWRT device.
But the client never receives the offer.
When I tcpdump port 2 I can see the DHCP Discover packets but there are no DHCP offer packets. When I do similarly on the network's switch I can see both.
I also tried static configuration, just in case it was a DHCP problem. I can see ARP requests and replies on the network's switch but I can only see the requests on port 2.
I tried connecting two wifi devices with static ip addresses and they cannot see each other. Again, only outbound ARPs are visible. Both devices' outbound ARPs are visible on the network's switch.
It's like traffic is only able to flow one way, outbound.
OpenWrt shows the ethernet connection is established at 1000baseT full-duplex. I've done cable tests and tried everything else I can think of. Note otherwise, the OpenWrt has been installed for ages and works great.
If I replace the OpenWrt's connection to the network's switch with a laptop (so it's on the same port), that works fine.
Here is a config extract:
wifi-iface 'dmz_radio1'
option device 'radio1'
option mode 'ap'
option ssid 'XXXX'
option encryption 'psk2'
option key 'XXXX'
option isolate '1'
option network 'testnet'
config interface 'testnet'
option type 'bridge'
option ifname 'eth0.5'
option _orig_ifname 'eth0.5'
option _orig_bridge 'true'
option proto 'none'
config switch_vlan
option device 'switch0'
option vlan '5'
option vid '5'
option ports '2'
config zone
option input 'ACCEPT'
option output 'ACCEPT'
option name 'untrusted'
option forward 'ACCEPT'
option network 'testnet'
I've been struggling with this for days. Can anyone shed some light? Where am I going wrong?