Hi,
I'm a greenhorn and I'm not successful with my new OpenWRT. I've installed OpenWRT on my Raspi3b. I want to get an extra WLAN for some devices. So I set the WLAN interface to another network than my LAN interface. I activated DHCP only for WLAN. When I now try to connect with a cell phone I see the registration in OpenWRT. My cell phone is waiting for an IP address. After some seconds it stopped waiting.
In the system log I can see this:
Sat Apr 9 20:18:44 2022 daemon.info hostapd: wlan0: STA f0:c8:50:58:xx:xx IEEE 802.11: associated
Sat Apr 9 20:18:44 2022 daemon.notice hostapd: wlan0: AP-STA-CONNECTED f0:c8:50:58:xx:xx
Sat Apr 9 20:18:44 2022 daemon.info hostapd: wlan0: STA f0:c8:50:58:xx:xx WPA: pairwise key handshake completed (RSN)
Sat Apr 9 20:19:20 2022 daemon.info hostapd: wlan0: STA f0:c8:50:58:xx:xx IEEE 802.11: disassociated
Sat Apr 9 20:19:20 2022 daemon.notice hostapd: wlan0: AP-STA-DISCONNECTED f0:c8:50:58:bf:36
Sat Apr 9 20:19:20 2022 daemon.info hostapd: wlan0: STA f0:c8:50:58:xx:xx IEEE 802.11: disassociated
The Pi is a particularly bad choice for use as a wifi AP -- it has a basic 1x1 radio/antenna system and is not going to give good performance for both speed and physical range. AFAIK, the chipset does not support multiple concurrent SSIDs [EDIT: I could be wrong -- maybe it doesn't support concurrent AP and STA modes, but it might not support multiple SSIDs, either). Are you trying to use it for just one SSID, or multiple?
Let's see your complete config:
Please copy the output of the following commands and post it here using the "Preformatted text </> " button:
Remember to redact passwords, MAC addresses and any public IP addresses you may have:
There is no network assigned to this zone. It will not do anything.
This is very wrong.
First you need a consistent network name such as 'iot' or 'guest'. This name must match what you use in the new sections for dhcp and firewall. Use lowercase only for network names.
Do not declare a gateway in a lan-like network section. There are only a couple of times option gateway should ever be used, and this isn't one of them.
Do not reference wifi interfaces in /etc/config/network. If the only device on a network is wifi, there will be no option device line here. The wifi will be connected through option network in the wireless config.
option type bridge in a config interface section is deprecated. If you need a bridge (for dual APs one on each band for example), declare it separately following the example of br-lan above.
Hi Mike,
first thank you for your help!
Yes, there were some inconsistencies. I have already performed various tests, all of which have left their mark. So I deleted the entries in the config files, restarted the Raspi and started again. I have now taken your hints into account. Unfortunately it does not work in the end again. My cell phone tries to connect to "iot" but it gets no IP address. Here you can see the new settings:
root@OpenWrt:~# cat /etc/config/network
config interface 'loopback'
option device 'lo'
option proto 'static'
option ipaddr '127.0.0.1'
option netmask '255.0.0.0'
config globals 'globals'
option ula_prefix 'fdef:3a78:d901::/48'
config device
option name 'br-lan'
option type 'bridge'
list ports 'eth0'
config interface 'lan'
option proto 'static'
option ipaddr '192.168.100.41'
option netmask '255.255.255.0'
option ip6assign '60'
option gateway '192.168.100.254'
option device 'eth0'
list dns '192.168.100.254'
option type 'bridge'
config device
option name 'eth0'
option ipv6 '0'
config device
option name 'iot'
option mtu '1500'
config interface 'iot'
option proto 'static'
option device 'wlan0'
option ipaddr '192.168.10.1'
option netmask '255.255.255.0'