NOTE: this page is for archival only, see the note at the end of the page.

About iw

iw is a new nl80211 based CLI configuration utility for wireless devices. Currently you can only use this utility to configure devices which use a mac80211 driver as these are the new drivers being written – only because most new wireless devices being sold are now SoftMAC. Please see our list of mac80211 drivers.

iw is still under development. Features are added 'as we go'. The only documentation that exists for iw is this page. Please help expand it ;)

Getting iw

Release tarballs of iw are available from

Alternatively, you can download iw from git:, the web interface can also create tarballs for arbitrary revisions.

Using iw requires you to have libnl, the first working version is 1.0 pre8 as this release introduced genl, Generic Netlink, which nl80211 relies on; version 1.2 or higher do not currently work. Most distributions are shipping 1.1 these days. If your distribution's libnl is a wrong version then you'll have to download and compile libnl yourself for now.

Libnl homepage:


Just enter

iw help

on your command line and it will print out the commands it supports.

Adding interfaces with iw

The command line is:

iw phy phy0 interface add moni0 type monitor

where you can replace monitor by anything else and moni0 by the interface name, and need to replace phy0 by the PHY name for your hardware (usually phy0 will be correct unless you hotplugged or reloaded any modules.) If your udev is configured incorrectly, the newly created virtual interface may be renamed by it right away, use ip link to list all interfaces.

Modifying monitor interface flags

You can customize the type of monitor interface you create. This can be very useful for debugging purposes on end user systems. For example suppose you want to help a user you can take advantage of the fact that a monitor interface in mac80211 uses radiotap to pass up to userspace additional data. Say we want to help a user fish out data without affecting the device's performance by setting it it to a full monitor interface an monitor interface with no additional monitor flags can be created as follows:

iw dev wlan0 interface add fish0 type monitor flags none

You can then request the user to use tcpdump on a session:

tcpdump -i fish0 -s 65000 -p -U -w  /tmp/fishing.dump

The nice thing about these type of alternative monitor interfaces is you can further extend radiotap even with vendor extensions to add more data to radiotap to help debug device specific features.

Keep in mind this requires drivers to honor mac80211's flag requests strictly, so drivers like ath5k and ath9k which still enable flags based on operation mode need to be fixed to take advantage of this.

Monitor flags possible

The following are flags you can specify:

  • none
  • fcsfail
  • plcpfail
  • control
  • otherbss
  • cook

Deleting interfaces with iw

The command line is:

iw dev moni0 del

Where "moni0" was the virtual interface interface that was created with the first command

Updating your regulatory domain

The command line is:

iw reg set alpha2

Where "alpha2" is the ISO/IEC 3166 alpha2 country code. The information used and set comes from our regulatory infrastructure.

You can also use the latest wpa_supplicant (from the git tree) now to change your regulatory domain, to do so just add a "COUNTRY=US" entry into your configuration for example.

Creating and inspecting Mesh Point interfaces with iw

You may add a mesh interface to drivers that support Mesh Point operation. Mesh Point interfaces have a mesh_id parameter which is similar to an SSID on an infrastructure network. For example, to add an interface "mesh0" to device phy0 with mesh_id "mymesh",

iw phy phy0 interface add mesh0 type mp mesh_id mymesh

Mesh Point interfaces, by default, are configured on Channel 1. Mesh Point operation begins when the interface is brought up. In the default configuration, Mesh Point interfaces will automatically attempt to create Peer Links with other Mesh Points having the same mesh ID. To see a list of such peer links, issue a station dump:

iw dev mesh0 station dump

After sending traffic (ex: pinging another mesh node), you may wish to see a list of mpaths:

iw dev mesh0 mpath dump

Please see the HOWTO for further details on Mesh Point related commands and their output, as well as more examples. iw also provides commands for advanced Mesh Point configuration. These are documented in the Advanced Tinkering section of the open80211s HOWTO.

This is a static dump of the wiki, taken after locking it in January 2015. The new wiki is at
versions of this page: last, v77, v76, v75, v74, v73, v72, v71, v70, v69, v68, v67, v66, v65, v64, v63, v62, v61, v60, v59, v58, v57, v56, v55, v54, v53, v52, v51, v50, v49, v48, v47, v46, v45, v44, v43, v42, v41, v40, v39, v38, v37, v36, v35, v34, v33, v32, v31, v30, v29, v28, v27, v26, v25, v24, v23, v22, v21, v20, v19, v18, v17, v16, v15, v14, v13, v12, v11, v10, v9, v8, v7, v6, v5, v4, v3, v2, v1