#775420 airmon-ng/airodump-ng: ioctl(SIOCSIFFLAGS) failed: Name not unique on network

Package:
aircrack-ng
Source:
aircrack-ng
Description:
wireless WEP/WPA cracking utilities
Submitter:
Viktor
Date:
2015-04-25 22:21:05 UTC
Severity:
important
#775420#5
Date:
2015-01-15 13:37:19 UTC
From:
To:
Dear maintainer,

When I use airmon-ng I get the following error:


viktor@jessie$ sudo airmon-ng start wlan1


Found 5 processes that could cause trouble.
If airodump-ng, aireplay-ng or airtun-ng stops working after
a short period of time, you may want to kill (some of) them!

PID     Name
693     NetworkManager
705     avahi-daemon
736     avahi-daemon
782     wpa_supplicant
794     dhclient
Process with PID 794 (dhclient) is running on interface wlan0


Interface       Chipset         Driver

wlan0           Broadcom        wl - [phy0]
wlan1           Atheros AR9271  ath9k - [phy2]SIOCSIFFLAGS: Name not unique on
network

                                (monitor mode enabled on mon0)
**************************************************************************

Then when I want to do airodump-ng this happens:


viktor@jessie:~$ sudo airodump-ng mon0
ioctl(SIOCSIFFLAGS) failed: Name not unique on network
**************************************************************************

I have found a workaround here:
https://bbs.archlinux.org/viewtopic.php?id=188374

First, you have to bring the interface down
sudo ifconfig wlan1 down

Then put it into monitor mode:
sudo iwconfig wlan1 mode monitor

Then bring it up:
sudo ifconfig wlan1 up

You can use airodump-ng now:
sudo airodump-ng start wlan1

*****************************************************************************

The usb adapter is OK, i tested it on another computer which has Kali Linux
installed
and it worked without problems.

#775420#10
Date:
2015-01-15 17:35:27 UTC
From:
To:

Hi,


I'm not sure if this is a bug on aircrack-ng, on your kernel or driver of your wireless card,
or on your specific network or system configurations.

After grepping the kernel, it seems to me that the error ENOTUNIQ ("Name not unique on network")
happens when you try to create some interface with a duplicate MAC address and
one of this interfaces is not in monitor mode.

The interface mon0 is going to have the same MAC than the parent (wlan1), so
either one of mon0 or wlan1 has to be in monitor mode.

The interface that airmon-ng enables on mon0 should be a interface of type
NL80211_IFTYPE_MONITOR, so it shouldn't give ENOTUNIQ error.

You say that it works if you manually first put wlan1 in monitor mode.
So that matchs my understanding of the situation.
Seems that for some reason (read:bug) the interface mon0 is not beeing
created in monitor mode mode by default.


Can you try the following:


1) First stop NetworkManager

$ service network-manager stop

And retry creating mon0 with airmon-ng.

If it still fails with the same error.

2) Try using airmon-zc instead of airmon-ng to bring the interface up:

$ sudo airmon-zc start wlan0

3) If it still fails, try creating the mon0 interface manually:

sudo iw dev wlan1 interface add mon0 type monitor

4) You are running a propietary driver (wl) for the interface wlan0.
This may cause problems. Can you try to temporally remove this driver
from your kenel and booting without it, to check if that makes a difference ?

5)

If all the above fails, can you please paste here the output
of the following commands (after the error has happened):

/sbin/iw list
/sbin/iw dev
/sbin/ip addr
/sbin/ifconfig -a


Regards!

#775420#17
Date:
2015-01-15 18:13:30 UTC
From:
To:
Hi,

thank you for quick answer! :)

*1) "service network-manager stop"* makes network manager stop, but it
starts back again as if it was restart
 so I wasn't able to test it without nm running

*2) airmon-zc*

 viktor@jessie:~$ sudo airmon-zc start wlan1


Found 5 processes that could cause trouble.
If airodump-ng, aireplay-ng or airtun-ng stops working after
a short period of time, you may want to kill (some of) them!

PID Name
665 avahi-daemon
700 avahi-daemon
742 wpa_supplicant
5441 NetworkManager
5488 dhclient
Process with PID 5488 (dhclient) is running on interface wlan0
PHY Interface Driver Chipset

phy0 wlan0 wl Broadcom Corporation BCM43142 802.11b/g/n (rev 01)
phy4 wlan1 ath9k_htc Atheros Communications, Inc. AR9271 802.11ncommand
failed: Device or resource busy (-16)

(mac80211 monitor mode vif enabled for [phy4]wlan1 on [phy4]wlan1mon)
(mac80211 station mode vif disabled for [phy4]wlan1)


This creates new interface: wlan1mon
When I try to start airodump-ng:

viktor@jessie:~$ sudo airodump-ng wlan1mon
ioctl(SIOCSIWMODE) failed: Device or resource busy

ARP linktype is set to 1 (Ethernet) - expected ARPHRD_IEEE80211,
ARPHRD_IEEE80211_FULL or ARPHRD_IEEE80211_PRISM instead.  Make
sure RFMON is enabled: run 'airmon-ng start wlan1mon <#>'
Sysfs injection support was not found either.


*3) adding device manually*
viktor@jessie:~$ sudo iw dev wlan1 interface add mon0 type monitor
viktor@jessie:~$ sudo airodump-ng start mon0
"airodump-ng --help" for help.

While adding device works, airodump-ng behaves strangely. Also, even though
there is no output besides what is pasted here, after the command my cpu
goes to 80% as if it was doing something very difficult.

*4) proprietary driver*
Yes it is a proprietary driver. It is from packge firmware-realtek.
Unfortunately, I am a kind of a noob, so I don't know how to remove it from
the kernel.

*5) outputs*
/sbin/iw list:
viktor@jessie:~$ sudo /sbin/iw list
Wiphy phy7
max # scan SSIDs: 4
max scan IEs length: 2257 bytes
Retry short limit: 7
Retry long limit: 4
Coverage class: 0 (up to 0m)
Device supports RSN-IBSS.
Supported Ciphers:
* WEP40 (00-0f-ac:1)
* WEP104 (00-0f-ac:5)
* TKIP (00-0f-ac:2)
* CCMP (00-0f-ac:4)
* CMAC (00-0f-ac:6)
Available Antennas: TX 0x1 RX 0x1
Configured Antennas: TX 0x1 RX 0x1
Supported interface modes:
 * IBSS
 * managed
 * AP
 * AP/VLAN
 * monitor
 * mesh point
 * P2P-client
 * P2P-GO
Band 1:
Capabilities: 0x116e
HT20/HT40
SM Power Save disabled
RX HT20 SGI
RX HT40 SGI
RX STBC 1-stream
Max AMSDU length: 3839 bytes
DSSS/CCK HT40
Maximum RX AMPDU length 65535 bytes (exponent: 0x003)
Minimum RX AMPDU time spacing: 8 usec (0x06)
HT TX/RX MCS rate indexes supported: 0-7
Bitrates (non-HT):
* 1.0 Mbps
* 2.0 Mbps (short preamble supported)
* 5.5 Mbps (short preamble supported)
* 11.0 Mbps (short preamble supported)
* 6.0 Mbps
* 9.0 Mbps
* 12.0 Mbps
* 18.0 Mbps
* 24.0 Mbps
* 36.0 Mbps
* 48.0 Mbps
* 54.0 Mbps
Frequencies:
* 2412 MHz [1] (20.0 dBm)
* 2417 MHz [2] (20.0 dBm)
* 2422 MHz [3] (20.0 dBm)
* 2427 MHz [4] (20.0 dBm)
* 2432 MHz [5] (20.0 dBm)
* 2437 MHz [6] (20.0 dBm)
* 2442 MHz [7] (20.0 dBm)
* 2447 MHz [8] (20.0 dBm)
* 2452 MHz [9] (20.0 dBm)
* 2457 MHz [10] (20.0 dBm)
* 2462 MHz [11] (20.0 dBm)
* 2467 MHz [12] (20.0 dBm)
* 2472 MHz [13] (20.0 dBm)
* 2484 MHz [14] (disabled)
Supported commands:
 * new_interface
 * set_interface
 * new_key
 * start_ap
 * new_station
 * new_mpath
 * set_mesh_config
 * set_bss
 * authenticate
 * associate
 * deauthenticate
 * disassociate
 * join_ibss
 * join_mesh
 * remain_on_channel
 * set_tx_bitrate_mask
 * frame
 * frame_wait_cancel
 * set_wiphy_netns
 * set_channel
 * set_wds_peer
 * probe_client
 * set_noack_map
 * register_beacons
 * start_p2p_device
 * set_mcast_rate
 * Unknown command (104)
 * connect
 * disconnect
Supported TX frame types:
 * IBSS: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0
0xd0 0xe0 0xf0
 * managed: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0
0xc0 0xd0 0xe0 0xf0
 * AP: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0
0xd0 0xe0 0xf0
 * AP/VLAN: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0
0xc0 0xd0 0xe0 0xf0
 * mesh point: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0
0xc0 0xd0 0xe0 0xf0
 * P2P-client: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0
0xc0 0xd0 0xe0 0xf0
 * P2P-GO: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0
0xd0 0xe0 0xf0
 * P2P-device: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0
0xc0 0xd0 0xe0 0xf0
Supported RX frame types:
 * IBSS: 0x40 0xb0 0xc0 0xd0
 * managed: 0x40 0xd0
 * AP: 0x00 0x20 0x40 0xa0 0xb0 0xc0 0xd0
 * AP/VLAN: 0x00 0x20 0x40 0xa0 0xb0 0xc0 0xd0
 * mesh point: 0xb0 0xc0 0xd0
 * P2P-client: 0x40 0xd0
 * P2P-GO: 0x00 0x20 0x40 0xa0 0xb0 0xc0 0xd0
 * P2P-device: 0x40 0xd0
software interface modes (can always be added):
 * AP/VLAN
 * monitor
valid interface combinations:
 * #{ managed, P2P-client } <= 2, #{ AP, mesh point, P2P-GO } <= 2,
   total <= 2, #channels <= 1
HT Capability overrides:
 * MCS: ff ff ff ff ff ff ff ff ff ff
 * maximum A-MSDU length
 * supported channel width
 * short GI for 40 MHz
 * max A-MPDU length exponent
 * min MPDU start spacing
Device supports TX status socket option.
Device supports HT-IBSS.
Device supports SAE with AUTHENTICATE command
Device supports low priority scan.
Device supports scan flush.
Device supports AP scan.
Device supports per-vif TX power setting
Driver supports a userspace MPM
Wiphy phy0
max # scan SSIDs: 1
max scan IEs length: 0 bytes
Retry short limit: 7
Retry long limit: 4
Coverage class: 0 (up to 0m)
Supported Ciphers:
* WEP40 (00-0f-ac:1)
* WEP104 (00-0f-ac:5)
* TKIP (00-0f-ac:2)
* CCMP (00-0f-ac:4)
* CMAC (00-0f-ac:6)
Available Antennas: TX 0 RX 0
Supported interface modes:
 * IBSS
 * managed
Band 1:
Bitrates (non-HT):
* 1.0 Mbps
* 2.0 Mbps (short preamble supported)
* 5.5 Mbps (short preamble supported)
* 11.0 Mbps (short preamble supported)
* 6.0 Mbps
* 9.0 Mbps
* 12.0 Mbps
* 18.0 Mbps
* 24.0 Mbps
* 36.0 Mbps
* 48.0 Mbps
* 54.0 Mbps
Frequencies:
* 2412 MHz [1] (20.0 dBm)
* 2417 MHz [2] (20.0 dBm)
* 2422 MHz [3] (20.0 dBm)
* 2427 MHz [4] (20.0 dBm)
* 2432 MHz [5] (20.0 dBm)
* 2437 MHz [6] (20.0 dBm)
* 2442 MHz [7] (20.0 dBm)
* 2447 MHz [8] (20.0 dBm)
* 2452 MHz [9] (20.0 dBm)
* 2457 MHz [10] (20.0 dBm)
* 2462 MHz [11] (20.0 dBm)
* 2467 MHz [12] (20.0 dBm)
* 2472 MHz [13] (20.0 dBm)
* 2484 MHz [14] (disabled)
Band 2:
Bitrates (non-HT):
* 6.0 Mbps
* 9.0 Mbps
* 12.0 Mbps
* 18.0 Mbps
* 24.0 Mbps
* 36.0 Mbps
* 48.0 Mbps
* 54.0 Mbps
Frequencies:
* 5170 MHz [34] (disabled)
* 5180 MHz [36] (20.0 dBm)
* 5190 MHz [38] (20.0 dBm)
* 5200 MHz [40] (20.0 dBm)
* 5210 MHz [42] (20.0 dBm)
* 5220 MHz [44] (20.0 dBm)
* 5230 MHz [46] (20.0 dBm)
* 5240 MHz [48] (20.0 dBm)
* 5260 MHz [52] (20.0 dBm) (radar detection)
  DFS state: usable (for 71 sec)
  DFS CAC time: 60000 ms
* 5280 MHz [56] (20.0 dBm) (radar detection)
  DFS state: usable (for 71 sec)
  DFS CAC time: 60000 ms
* 5300 MHz [60] (20.0 dBm) (radar detection)
  DFS state: usable (for 71 sec)
  DFS CAC time: 60000 ms
* 5320 MHz [64] (20.0 dBm) (radar detection)
  DFS state: usable (for 71 sec)
  DFS CAC time: 60000 ms
* 5500 MHz [100] (disabled)
* 5520 MHz [104] (disabled)
* 5540 MHz [108] (disabled)
* 5560 MHz [112] (disabled)
* 5580 MHz [116] (disabled)
* 5600 MHz [120] (disabled)
* 5620 MHz [124] (disabled)
* 5640 MHz [128] (disabled)
* 5660 MHz [132] (disabled)
* 5680 MHz [136] (disabled)
* 5700 MHz [140] (disabled)
* 5745 MHz [149] (disabled)
* 5765 MHz [153] (disabled)
* 5785 MHz [157] (disabled)
* 5805 MHz [161] (disabled)
* 5825 MHz [165] (disabled)
* 5920 MHz [184] (disabled)
* 5940 MHz [188] (disabled)
* 5960 MHz [192] (disabled)
* 5980 MHz [196] (disabled)
* 6000 MHz [200] (disabled)
* 6020 MHz [204] (disabled)
* 6040 MHz [208] (disabled)
* 6060 MHz [212] (disabled)
* 6080 MHz [216] (disabled)
Supported commands:
 * set_interface
 * new_key
 * join_ibss
 * set_pmksa
 * del_pmksa
 * flush_pmksa
 * connect
 * disconnect
software interface modes (can always be added):
interface combinations are not supported
Device supports scan flush.





/sbin/iw dev:
viktor@jessie:~$ sudo /sbin/iw dev
phy#7
Interface wlan1
ifindex 18
wdev 0x700000001
addr c4:6e:1f:10:1b:0b
type managed
phy#0
Interface wlan0
ifindex 3
wdev 0x1
addr 24:fd:52:f4:66:49
ssid TDC-1009
type managed
viktor@jessie:~$




/sbin/ip addr:
viktor@jessie:~$ sudo /sbin/ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group
default
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: eth1: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast
state DOWN group default qlen 1000
    link/ether 3c:97:0e:ba:fc:34 brd ff:ff:ff:ff:ff:ff
3: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state
UP group default qlen 1000
    link/ether 24:fd:52:f4:66:49 brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.8/24 brd 192.168.1.255 scope global dynamic wlan0
       valid_lft 2840sec preferred_lft 2840sec
    inet6 fe80::26fd:52ff:fef4:6649/64 scope link
       valid_lft forever preferred_lft forever
18: wlan1: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN
group default qlen 1000
    link/ether c4:6e:1f:10:1b:0b brd ff:ff:ff:ff:ff:ff




/sbin/ifconfig -a:
viktor@jessie:~$ sudo /sbin/ifconfig -a
eth1      Link encap:Ethernet  HWaddr 3c:97:0e:ba:fc:34
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:800 errors:0 dropped:0 overruns:0 frame:0
          TX packets:800 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:62798 (61.3 KiB)  TX bytes:62798 (61.3 KiB)

wlan0     Link encap:Ethernet  HWaddr 24:fd:52:f4:66:49
          inet addr:192.168.1.8  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::26fd:52ff:fef4:6649/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:276879 errors:0 dropped:0 overruns:0 frame:76031
          TX packets:219592 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:226924973 (216.4 MiB)  TX bytes:162435687 (154.9 MiB)
          Interrupt:17

wlan1     Link encap:Ethernet  HWaddr c4:6e:1f:10:1b:0b
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)



By the way, there is really easy workaround.
I just did
ifconfig wlan1 down
iwconfig wlan1 mode monitor
ifconfig wlan1 up
airodump-ng wlan1

From there it was working fine.

So 3 commands instead of airmon-ng start wlan1 - that isn't so bad :)





2015-01-15 18:35 GMT+01:00 Carlos Alberto Lopez Perez <clopez@igalia.com>:

#775420#22
Date:
2015-01-15 18:25:50 UTC
From:
To:
NetworkManager can cause lot of interference with aircrack-ng.
I recommend you to find a way to kill it. And then retry the tests.
If you are using systemd as init (the Default in Jessie), look at how to
stop services with it.

Also, try with airmon-zc (instead of airmon-ng) after a fresh reboot and
after killing network manager.

Try removing it with this:

sudo rmmod wl

To add it back:

sudo modprobe wl


(No need to reboot, this adds or removes the driver only temporally)

#775420#27
Date:
2015-01-16 12:07:31 UTC
From:
To:
Hey,

I tried the rmmod wl & modprobe wl. It just removes my PCI wifi, but the
USB adapter remains visible
After that I still get the same error when running airmon-ng

I didn't find a way to kill the network-manager. When I run sudo services
network-manager stop, it just restarts

Viktor

#775420#32
Date:
2015-01-16 12:21:49 UTC
From:
To:
Try with this:

sudo systemctl stop NetworkManager.service

#775420#37
Date:
2015-01-16 12:26:41 UTC
From:
To:
The same thing happens,

it starts back again

2015-01-16 13:21 GMT+01:00 Carlos Alberto Lopez Perez <clopez@igalia.com>:

#775420#42
Date:
2015-04-25 22:11:19 UTC
From:
To:
Hi,

The advice from clopez@igailia.com worked for me:

1) First stop NetworkManager

$ service network-manager stop

And retry creating mon0 with airmon-ng.

Thanks!