Sub topic 3
Channels and how they are numbered
This chapter assumes you know what a frequency in MHz or GHz is and can read short Python and shell snippets. It builds on the earlier chapters about bands and unlicensed spectrum.
What a channel is
A band is a large range of frequencies. A channel is a fixed slice of that band that an access point and its clients agree to use. Instead of quoting "2437 MHz", Wi-Fi gear says "channel 6". The number is a label for a center frequency, and the channel then extends a few MHz on each side of it (about 20 MHz in total at the default width).
The numbering rule
Channel numbers count in 5 MHz steps from a base frequency. Each band has its own base:
| Band | Formula for center frequency (MHz) | Example |
|---|---|---|
| 2.4 GHz | 2407 + 5 × channel (channels 1–13) | Channel 6 → 2437 |
| 2.4 GHz | Channel 14 is a special case: 2484 | Channel 14 → 2484 |
| 5 GHz | 5000 + 5 × channel | Channel 36 → 5180 |
| 6 GHz | 5950 + 5 × channel | Channel 1 → 5955 |
| 6 GHz | Channel 2 is a special case: 5935 | Channel 2 → 5935 |
Because the base differs per band, the same number means different frequencies in different bands. Channel 1 on 2.4 GHz is 2412 MHz, and channel 1 on 6 GHz is 5955 MHz. Always state the band along with the channel number.
def channel_center_mhz(band, channel):
"""Return the center frequency in MHz for a Wi-Fi channel number."""
if band == "2.4":
if channel == 14:
return 2484
if 1 <= channel <= 13:
return 2407 + 5 * channel
elif band == "5":
if 1 <= channel <= 196:
return 5000 + 5 * channel
elif band == "6":
if channel == 2:
return 5935
if 1 <= channel <= 233:
return 5950 + 5 * channel
raise ValueError(f"unknown channel {channel} in band {band}")
print(channel_center_mhz("2.4", 1)) # 2412
print(channel_center_mhz("2.4", 6)) # 2437
print(channel_center_mhz("5", 36)) # 5180
print(channel_center_mhz("6", 1)) # 5955The function rejects numbers that do not exist rather than guessing. Not every valid number is usable everywhere. Regulators decide which channels are allowed in each country, so channel 13 is common in Europe and not available in the United States.
Reading a real scan
On Linux, iw shows the frequency of your current link and of nearby networks. You can then reverse the formula to get the channel.
# Show the current connection (interface name may differ, for example wlp2s0)
iw dev wlan0 link
# List nearby networks with their frequency, signal level and SSID
sudo iw dev wlan0 scan | grep -E 'freq:|signal:|SSID:'If a line reads freq: 5180, then (5180 − 5000) / 5 = 36, so the network is on 5 GHz channel 36. A line reading freq: 2437 gives (2437 − 2407) / 5 = 6. Note that iw prints only the frequency, so the band comes from the value itself: 2400–2500 MHz is 2.4 GHz, and 5925–7125 MHz is 6 GHz.
Common errors
- Assuming a channel number identifies the band. It does not, because channel 1 exists in 2.4 and 6 GHz.
- Treating neighboring numbers in 2.4 GHz as independent. They are only 5 MHz apart.
- Forgetting the special cases, channel 14 and 6 GHz channel 2.
Exercise
A scan reports freq: 5955. Which band and channel is it? Is 2.4 GHz channel 1 the same frequency?
Show answer
5955 MHz is in the 6 GHz band, and (5955 − 5950) / 5 = channel 1. It is not the same as 2.4 GHz channel 1, which is 2407 + 5 = 2412 MHz.