[solved] Two SSIDs for the same OpenWrt network: How to achieve it? -- two linux network interfaces are created, only one gets an IP, connection to the other fails at DHCP with `dnsmasq` printing `DHCP packet received on phy0-ap1 which has no address`

Ahoj,

I have configured two WiFi networks with different SSIDs (named wlan-<censored-06>-internal and <censored-07>-internal in the examples below) which are associated with the same OpenWrt-network-interface (network interface as seen in LuCi in the "Network" → "Interfaces" tab; named internal in the examples below) (reason for different SSIDs: One generic SSID that stays the same across different rouers I might use, and one specific SSID that allows connecting specifically to this router, also with client devices that do not support manual BSSID entry).

This results in twp separate linux-network-interfaces (network interface as seen by ifconfig; named phy0-ap1 and phy0-ap2 in the examples below) created for each SSID, but only one of them (phy0-ap2) getting the IP (IPv4; 192.168.99.254 in the examples below) adress from the OpenWrt-network-interface assigned, the other (phy0-ap1) staying without IP.

When I then connect with a WiFi client to the SSID (wlan-<censored-06>-internal) that is associated with the linux-network-interface (phy0-ap1) that got no IP, and the client requests an IP adress via DHCP, it does not get any IP and dnsmasq prints to the log

daemon.warn dnsmasq-dhcp[1]: DHCP packet received on phy0-ap1 which has no address.

Any idea how both SSIDs, connected to the same OpenWrt-network-interface, can provide working networking with DHCP?

Here are some of my configs:

ifconfig:

[...]
phy0-ap1  Link encap:Ethernet  HWaddr <censored-01>  
          inet6 addr: <censored-03>/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:274 errors:0 dropped:0 overruns:0 frame:0
          TX packets:291 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:129830 (126.7 KiB)  TX bytes:139498 (136.2 KiB)

phy0-ap2  Link encap:Ethernet  HWaddr <censored-02>  
          inet addr:192.168.99.254  Bcast:192.168.99.255  Mask:255.255.255.0
          inet6 addr: <censored-04>/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:82 errors:0 dropped:0 overruns:0 frame:0
          TX packets:140 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:7129 (6.9 KiB)  TX bytes:23705 (23.1 KiB)

cat /etc/config/wireless:

[...]
config wifi-iface 'wifinet2'
	option device 'radio0'
	option mode 'ap'
	option ssid 'wlan-<censored-06>-internal'
	option encryption 'psk-mixed'
	option disassoc_low_ack '0'
	option key '<censored-05>'
	option wpa_disable_eapol_key_retries '1'
	option network 'internal'
	option macaddr '<censored-01>'

config wifi-iface 'wifinet3'
	option device 'radio0'
	option mode 'ap'
	option ssid '<censored-07>-internal'
	option encryption 'psk-mixed'
	option disassoc_low_ack '0'
	option key '<censored-05>'
	option wpa_disable_eapol_key_retries '1'
	option network 'internal'
	option macaddr '<censored-02>'
[...]

cat /etc/config/network:

[...]
config interface 'internal'
	option proto 'static'
	option ipaddr '192.168.99.254'
	option netmask '255.255.255.0'
	option defaultroute '0'
[...]

Regards!

Network has to be bridge with "bring up empty" option set.

Thanks, yes, that solves it.

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.