Cannot get interface up


I've created an interface called "testing" with the following command:

iw phy phy1 interface add testing type managed

But when I perform the command ifconfig testing up, I get this message:

ifconfig: SIOCSIFFLAGS: Name not unique on network

How can I fix this?
Thanks in advance.

Rita Florêncio

This message usually indicates that your wireless driver does not support multiple virtual interfaces or the specific combination of virtual interface types (e.g. ap + sta).

Thanks @jow. Here are the valid combinations:

valid interface combinations:
* #{ AP } <= 16, #{ managed } <= 1,
total <= 16, #channels <= 1, radar detect widths: { 20 MHz (no HT), 20 MHz, 40 MHz, 80 MHz, 160 MHz }

The objective of creating this interface is to convert it into an AP with hostapd that is supported according to the hardware capabilities (up to 16 AP's). Do you know how can I fix this?

Best is to let hostapd deal with this, it would destroy and recreate the vif anyway to put it into access point mode.

There is a hidden type value to iw, called __ap which will create an interface suitable for ap mode: iw phy phy1 interface add testing type __ap

According to the interface combination list, your driver supports either 16 concurrent AP interfaces or one sole managed interface. It neither supports multiple managed ones, nor a managed one in conjunction with existing AP ones.

Some drivers will also spawn a wlan0 default managed interface on boot, you might need to destroy that first before creating further vifs.

I've create the ap interface with iw phy phy1 interface add testing type __ap but I can't get it up.. Same error message:

ifconfig: SIOCSIFFLAGS: Name not unique on network

As I wrote, maybe there's a preexisting wlan0 / wlan1 interface which you need to remove first. Best is to purge all interfaces on phy1 before trying to setup a new one.

The interfaces are only AP :confused:

root@OpenWrt:~# iw dev
Interface testing
ifindex 61
wdev 0x100000018
addr 00:25:9c:14:5d:72
type AP
txpower 20.00 dBm
Interface wlan1
ifindex 59
wdev 0x100000016
addr 00:25:9c:14:5d:72
ssid OpenWrt_2.4GHz
type AP
channel 11 (2462 MHz), width: 20 MHz, center1: 2462 MHz
txpower 20.00 dBm
Interface wlan0
ifindex 58
wdev 0x1e
addr 00:25:9c:14:5d:73
ssid OpenWrt_5GHz
type AP
channel 36 (5180 MHz), width: 80 MHz, center1: 5210 MHz
txpower 20.00 dBm

Try setting up another network through /etc/config/wireless first and see if that works. If it does, your command sequence is likely wrong and you need to do further steps. If it does not work, the driver capabilities might be wrong and it isn't actually able to run multiple AP mode interfaces at once.

It is not working through /etc/config/wireless. The thing is: I can add a third SSID on web GUI, but I want to do it from the command line and using hostapd. It is supposed to work.