# wmaster0 and wlan0 with iwlwifi... why both?

## zx2c4

Part of ifconfig:

```
wlan0     Link encap:Ethernet  HWaddr 00:19:D2:02:07:48

          inet addr:192.168.1.101  Bcast:192.168.1.255  Mask:255.255.255.0

          inet6 addr: fe80::219:d2ff:fe02:748/64 Scope:Link

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

          RX packets:11558 errors:0 dropped:0 overruns:0 frame:0

          TX packets:10249 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000

          RX bytes:10920937 (10.4 Mb)  TX bytes:2076765 (1.9 Mb)

wmaster0  Link encap:UNSPEC  HWaddr 00-19-D2-02-07-48-20-B1-00-00-00-00-00-00-00-00

          UP BROADCAST RUNNING 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)

```

Why do I have both wlan0 and wmaster0? wlan0 seems to be the one that is actually used. What is the purpose of each? Why have two of them? I use iwlwifi with the iwl3945 module.

----------

## didymos

wmaster0 is probably a control interface, like wifi0 is with madwifi.  With madwifi, you can have multiple virtual interfaces, typically named athX, but you only ever have the one wifi0 (w/ one card, that is. A second card would be called wifi1). Your driver may have similar capabilities.

----------

## RoundsToZero

Yup, see how wmaster0 is UP but not sending any packets.  :Smile: 

----------

## zx2c4

how can I use wmaster0? how does it work?

----------

## RoundsToZero

You don't.  wlan0 is all you care about unless you want to do something fancy (which you haven't indicated to be the case).  wlan0 appears to be working fine.  It has an IP and has sent and received packets.  What's the problem here?

----------

## zx2c4

Oh. There's no problem. I'm just very curious.

What are the fancy things you can do with w-masta

----------

## RoundsToZero

Unfortunately I don't know the specific details as I have a really old Intel wireless card that doesn't work with these newfangled iwlwifi drivers.  :Wink: 

But if they are like the madwifi drivers, the wmaster0 device would be used to create additional virtual network interfaces running on the same physical NIC.  If I remember correctly, in madwifi, you have one wifi# per physical Atheros card.  When you run the program to create virtual network interfaces, you pass the wifi# device so the driver knows which physical NIC the new network interface should be associated with.  You can use it to create unlimited access points (master mode) on a single card, each with a different SSID.  Other modes are more limited, for instance you can only have one infrastructure mode, ad-hoc mode, and whatever that mode is that lets you sniff wireless packets without joining a network (the name escapes me).  But I believe you can combine those with the unlimited master mode devices.  You could be a wifi client and an AP on the same card, maybe even a client of your own AP.  Being able to create multiple master mode network interfaces each with a different SSID is useful if you want to partition your wireless users.  Each interface could be on a different subnet, and with routing rules and iptables, you could give different access to different subnets.

I don't know if the iwlwifi driver and userspace tools are fancy enough to let you do all of that.  Maybe wmaster0 is only used internally by the driver.  But you can hope!

----------

