How to check what Wifi Standard is being used in Linux

By | September 15, 2023

Lets say you upgraded your home or office network with new wifi routers and devices then you should see if your devices are using the new wifi standards like Wifi5 or Wifi6, to ensure high speed data transfer.

On Windows it is easy to check, but on linux we need to run a few commands to check the same detail.

The iw command can be used to fetch exact details about the wifi connection parameters which would indicate the wifi standard currently being used.

There are 2 specific commands.

iw interface_name info
iw interface_name link

The info option will tell the channel number, frequency, channel width and transmission power. The link option will tell the signal strength, bitrate, mcs standard and generation being used.

I tested the commands with different kinds of wifi setup. Below are the output.

Wifi 4 (HT)

So if you are connected to the access point or router using the wifi4 (802.11n) standard the frequency band would likely be 2.4Ghz and the channel width would be 20Mhz.

In this example I connected my Acer Swift 3 laptop (Intel Wi-Fi 6 AX201) laptop to my router which supports both Wifi4/5.

Check it with the iw command

$ iw wlp0s20f3 link
Connected to 98:35:ed:d4:e1:48 (on wlp0s20f3)
        SSID: AirtelFiber
        freq: 2427
        RX: 2426672 bytes (3905 packets)
        TX: 948489 bytes (2954 packets)
        signal: -24 dBm
        rx bitrate: 144.4 MBit/s MCS 15 short GI
        tx bitrate: 144.4 MBit/s MCS 15 short GI

        bss flags:      short-slot-time
        dtim period:    1
        beacon int:     100
$

In the above output we can see bitrate of 144.4 mbps and MCS 15 scheme being used with short GI (guard interval). If none of VHT or HE is mentioned, then its HT (High Throughput) indicating Wifi4.

The details of mcs15 scheme can be verified at https://mcsindex.com/ or https://mcsindex.net/.

BY looking at the mcs table we can tell the following details:

  • Spatial Streams: 2
  • Modulation: 64-QAM
  • Coding: 5/6
  • Bitrate: 144.4 mbps

Channel details can be found using the info option of iw command.

$ iw wlp0s20f3 info
Interface wlp0s20f3
        ifindex 17
        wdev 0xb00000001
        addr 90:cc:df:fd:97:c4
        type managed
        wiphy 11
        channel 4 (2427 MHz), width: 20 MHz, center1: 2427 MHz
        txpower 21.00 dBm
        multicast TXQ:
                qsz-byt qsz-pkt flows   drops   marks   overlmt hashcol tx-bytes        tx-packets
                0       0       0       0       0       0       0       0               0
$

In the above output we can see the

  • channel number = 4
  • channel width = 20 Mhz
  • channel center frequency = 2427 Mhz (means 2.4 Ghz band)

Wifi 5 (VHT)

If you are connected using Wifi5 (802.11ac), the iw command would include "VHT" in the output and channel width can be 40 or 80Mhz. To test wifi5 features i connected the same acer swift 3 laptop to router on 5ghz wifi5 802.11ac standard.

$ iw wlp0s20f3 link
Connected to 98:35:ed:d4:e1:4c (on wlp0s20f3)
        SSID: AirtelFiber_5GHz
        freq: 5745
        RX: 21139777 bytes (222876 packets)
        TX: 706666857 bytes (14107 packets)
        signal: -39 dBm
        rx bitrate: 866.7 MBit/s VHT-MCS 9 80MHz short GI VHT-NSS 2
        tx bitrate: 866.7 MBit/s VHT-MCS 9 80MHz short GI VHT-NSS 2

        bss flags:      short-preamble short-slot-time
        dtim period:    1
        beacon int:     100
acerlight@acerlight-laptop:~$

VHT (Very High Throughput) implies Wifi5. We can note the following:

  • Standard: VHT - Wifi 5
  • MCS Index: 9
  • Channel Width: 80Mhz
  • GI: Short
  • Bitrate: 866.7 mbps
  • NSS: 2 (Number of Spatial Streams)

Now we can tally the above details with the mcs index website and verify that we are getting the correct 866.7 mbps bitrate.

Exact channel details can be found with the info option of iw command.

$ iw wlp0s20f3 info
Interface wlp0s20f3
        ifindex 17
        wdev 0xb00000001
        addr 90:cc:df:fd:97:c4
        type managed
        wiphy 11
        channel 149 (5745 MHz), width: 80 MHz, center1: 5775 MHz
        txpower 21.00 dBm
        multicast TXQ:
                qsz-byt qsz-pkt flows   drops   marks   overlmt hashcol tx-bytes        tx-packets
                0       0       0       0       0       0       0       0               0
acerlight@acerlight-laptop:~$

Channel No.: 149
Frequency: 5745 Mhz (5 Ghz Band)
Channel Width: 80 Mhz

Wifi 6 (HE)

If you are connected over Wifi6 (802.11ax), the name "HE" (High Efficiency) will show up along with mcs details in the iw command output.

For the purpose of this test, I configured my acer aspire 5 laptop (Intel Wi-Fi 6 AX200 160MHz) as a wifi6 hotspot (access point) and connected the acer swift 3 to it as a client.

$ iw wlp0s20f3 link
Connected to 22:1e:88:d6:8a:fd (on wlp0s20f3)
        SSID: LAPTOP-3F4JSB0T 0055
        freq: 5785
        RX: 48318641 bytes (32351 packets)
        TX: 1535551 bytes (14848 packets)
        signal: -48 dBm
        rx bitrate: 1080.6 MBit/s 80MHz HE-MCS 10 HE-NSS 2 HE-GI 0 HE-DCM 0
        tx bitrate: 1200.9 MBit/s 80MHz HE-MCS 11 HE-NSS 2 HE-GI 0 HE-DCM 0

        bss flags:      short-preamble short-slot-time
        dtim period:    3
        beacon int:     100


$ iw wlp0s20f3 link
Connected to 22:1e:88:d6:8a:fd (on wlp0s20f3)
        SSID: LAPTOP-3F4JSB0T 0055
        freq: 5785
        RX: 48481363 bytes (32996 packets)
        TX: 1691515 bytes (15250 packets)
        signal: -46 dBm
        rx bitrate: 1200.9 MBit/s 80MHz HE-MCS 11 HE-NSS 2 HE-GI 0 HE-DCM 0
        tx bitrate: 1200.9 MBit/s 80MHz HE-MCS 11 HE-NSS 2 HE-GI 0 HE-DCM 0

        bss flags:      short-preamble short-slot-time
        dtim period:    3
        beacon int:     100
$

The bitrate is higher than wifi5. With mcs11 in HE standard, it can achieve 1200.9 mbps throughput.

Bitrate: 1200.9 mbps
Channel width: 80 mhz
MCS Index: 11
Signal Strength: -46 dBm
Freq: 5785 Mhz ( Wifi 6 on 5 Ghz band)
NSS: 2 (Number of Spatial Streams)

The above data can be compared with details at mcsindex.com and verified to be correct.

$ iw wlp0s20f3 info
Interface wlp0s20f3
        ifindex 17
        wdev 0xb00000001
        addr 90:cc:df:fd:97:c4
        type managed
        wiphy 11
        channel 157 (5785 MHz), width: 80 MHz, center1: 5775 MHz
        txpower 22.00 dBm
        multicast TXQ:
                qsz-byt qsz-pkt flows   drops   marks   overlmt hashcol tx-bytes        tx-packets
                0       0       0       0       0       0       0       0               0
$

Wifi6 on 2.4Ghz

On 2.4ghz band wifi6 will not use 80/160mhz wide channels. Most of the time it will just use 20mhz wide channel only.

$ iw wlp0s20f3 link
Connected to 22:1e:88:d6:8a:fd (on wlp0s20f3)
        SSID: LAPTOP-3F4JSB0T 0055
        freq: 2427
        RX: 29510648 bytes (19488 packets)
        TX: 482404 bytes (4224 packets)
        signal: -36 dBm
        rx bitrate: 286.7 MBit/s HE-MCS 11 HE-NSS 2 HE-GI 0 HE-DCM 0
        tx bitrate: 286.7 MBit/s HE-MCS 11 HE-NSS 2 HE-GI 0 HE-DCM 0

        bss flags:      short-preamble short-slot-time
        dtim period:    3
        beacon int:     100

According to mcsindex table, at 2.4ghz 20mhz wide channel, 802.11ax standard can deliver 286.8 mbps bitrate using mcs-11 scheme with the following parameters:

  • Spatial Streams: 2
  • Modulation: 1024-QAM
  • Coding: 5/6
  • MCS Index: 11
  • Bitrate: 286.8 mbps
  • GI: 0.8 us
  • Channel width: 20Mhz

Overall at 2.4ghz band the speed of wifi6 (20mhz / .8us GI) is going to be twice that of wifi4 (20mhz / .4us GI)

$ iw wlp0s20f3 info
Interface wlp0s20f3
        ifindex 17
        wdev 0xb00000001
        addr 90:cc:df:fd:97:c4
        type managed
        wiphy 11
        channel 4 (2427 MHz), width: 20 MHz, center1: 2427 MHz
        txpower 22.00 dBm
        multicast TXQ:
                qsz-byt qsz-pkt flows   drops   marks   overlmt hashcol tx-bytes        tx-packets
                0       0       0       0       0       0       0       0               0
$

What about Wifi 7 (EHT) ?

If you are on a Wifi 7 connection, it would show the name "EHT" (Extremely High Throughput). At the time of writing this article Wifi 7 capable devices are not available in the consumer market segment.

When such devices are available in future, I will update this article, or you can remind me :D.

MCS Switching

Note that a device can switch between different mcs schemes depending on signal strength and network load and select different mcs schemes for transmit and receive separately as well. There is nothing to worry about it.

$ iw wlp0s20f3 link
Connected to 98:35:ed:d4:e1:4c (on wlp0s20f3)
        SSID: AirtelFiber_5GHz
        freq: 5745
        RX: 111198 bytes (355 packets)
        TX: 128166 bytes (422 packets)
        signal: -46 dBm
        rx bitrate: 780.0 MBit/s VHT-MCS 9 80MHz VHT-NSS 2
        tx bitrate: 585.0 MBit/s VHT-MCS 7 80MHz VHT-NSS 2

        bss flags:      short-preamble short-slot-time
        dtim period:    1
        beacon int:     100
acerlight@acerlight-laptop:~$

The MCS index varies based on many factors like:

1. Signal strength - If you are further away from the access point with weak signal strength, the wifi adapter will switch to a lower speed mcs index for better stability.

2. Network Load - If you are transferring large amount of data, the adapter will switch to a higher speed mcs if possible with the current signal strength. When network load is low, it will switch based to a lower mcs to save power.

Conclusion

The presence of name VHT indicates Wifi5, and HE indicates Wifi6. The absence of either would likely mean Wifi4, but you should better confirm it using the mcsindex tables.

A lot of times client devices like smartphones and laptops automatically connect to the 2.4Ghz band. If your wifi router supports only Wifi4+Wifi5, the 2.4Ghz would mean wifi4 which would be slower.

You have to specifically select the 5ghz/wifi5 ssid to make your device get higher speeds of wifi5.

Wifi has a lot of technical parameters that need to configured properly to get the maximum speed. Let us know if you have any questions in the comments below.

About Silver Moon

A Tech Enthusiast, Blogger, Linux Fan and a Software Developer. Writes about Computer hardware, Linux and Open Source software and coding in Python, Php and Javascript. He can be reached at [email protected].

Leave a Reply

Your email address will not be published. Required fields are marked *