109

Wifi networks are often set up in dual-band mode, with the same SSID served on both 2.4 GHz and 5 GHz bands. I'd like to always use the 5 GHz band (due to interference with Bluetooth and other devices that degrades performance). How do I force Mac OS X to use the 5 GHz base station? (I do not have admin access to the network, so I can't just assign the 5 GHz network a different SSID.)

Note that this question is not asking how to force a particular flavor of 802.11, rather it is asking how to force a particular frequency band.

8
  • Forcing 5 Ghz implies you have to use the 802.11n or 802.11a or 802.11ac - they are synonyms for the same physical characteristic. It's be like saying asking for a black color and choosing another word for the same color (hex #000000), no...
    – bmike
    Jun 3, 2014 at 16:30
  • 9
    No. A router may already be configured to only provide 802.11n (or 802.11ac), and it may provide it on both 2.4 GHz and 5 GHz bands simultaneously. An 802.11 protocol is not synonymous with a frequency band.
    – lid
    Jun 3, 2014 at 16:33
  • then let's reopen this and just keep the link to the other question - apple.stackexchange.com/questions/23935/…
    – bmike
    Jun 3, 2014 at 17:02
  • Is changing the ssid of the 5GHz signal an option? The Asus router I connect to let me use a different ssid, and I just select that as the network I remember.
    – dwightk
    Jun 13, 2014 at 0:50
  • Nope. I don't have admin access to the router.
    – lid
    Jun 13, 2014 at 0:51

14 Answers 14

48
+50

In short: you can not force a frequency band in OS X 10.9 Mavericks. (On 10.5 you could...)

You want to connect to the device using Basic Service Set Identification (BSSID) instead of the regular Service Set Identification (SSID). Connecting to a BSSID will connect you to a specific device regardless of the connection strength. Connecting to SSID will only connect you to a specific network name and if similar network names are available, it would connect to the best signal/noise ratio. It must be noted that your OS X chooses the wlan, not your router, and OS X switches to the strongest signal available (2.4GHz or 5GHz).

To find a specific SSID and BSSID combination, you can run:

/System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport scan

Before OSX 10.6 you could connect to a specific BSSID using:

/System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport --associate=XXX --bssid=YYY

Where XXX is the SSID/network name and YYY the MAC address of the base station you want to talk to.

On OS X 10.6 and beyond it is no longer possible to connect to BSSID directly. There is no known API for this and no third party Software exists that can do this. So you need to change your 5GHz SSID to a unique name or you need to go back to OS X 10.5, or you can change the 2.4GHz channel from within the router. I think these options are non-valid in your case.

UPDATE As maxim points out, you can force a frequency band and use that to fix to 5GHz.

On linux you can use iwconfig, but this tool is not available for OS X.

4
  • 20
    Just as a side point - in case it wasn't already obvious, holding down Alt when clicking the wifi icon will show you which band you are on. "Wireless Diagnostics" is also pretty good for general information (Cmd-2 for diagnostics), and also "System Information" can yield some comparative data. Oct 20, 2014 at 4:34
  • Combining this with the answer from @maxim (specifically point 5) I was able to list all of the access points found, and then change to the 5GHz band by setting the channel. This worked in macOS Sierra. Dec 30, 2016 at 20:46
  • Link for the 10.5 fix please?
    – rogerdpack
    Aug 28, 2018 at 14:56
  • 2
    @rogerdpack have you read the post? The answer is in the post. No link needed. Aug 28, 2018 at 15:04
39

This is a partial-temporary solution. Basically, if the frequencies are on different channel numbers then it is possible to "set" the particular wifi band (worked on OSX Mavericks).

High-level overview:

  1. Find the channel numbers of 5 GHz and 2.4 Ghz. Are they different? if yes proceed to step 2.
  2. Set 5 GHz channel number using airport command.

Detailed instructions:

  1. Open Wireless Diagnostics.app (it is located in /System/Library/CoreServices/Applications).

  2. In the application menu select Window->Utilities (or press cmd+2).Utilities window should appear.

  3. Select WiFi Scan from Utilities window and press Scan Now button. This will show you all available networks, info about them and your active connection.

  4. Now, verify that BSSIDs of 2.4 and 5 Ghz with the same network name are on different channel numbers. If so, then most likely you can change the band by setting the channel number of the desired frequency band. Alternatively for steps 1-4, just type in the terminal

    sudo /System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport /usr/sbin/airport -s
    
  5. Turn Wifi off on your computer

  6. Open the Terminal.app and type:

    sudo /System/Library/PrivateFrameworks/Apple80211.framework/Resources/airport --channel=**num**
    

    where **num** is the channel number to set. This command will only work under administrator account (so make sure that you are log as an Administrator i.e. su YourAdministratorAccount)

  7. Turn Wifi On and connect to the network again

  8. You can check your active connection by Alt+Clicking on the WiFi icon on the OSX menu bar, re-scanning with Wireless Diagnostics or using the terminal :-).

That's all!

15
  • 6
    Thanks. I was unable to set the channel. Tried turning off wifi as well. Did anyone get this to work?
    – chainwork
    Oct 1, 2015 at 23:18
  • 4
    This didn't work for me either on Yosemite. Oct 28, 2015 at 11:11
  • 1
    System path wrong in first command, also remove the * from end.
    – malhal
    Dec 30, 2015 at 8:54
  • 4
    Did not work for me either on El Capitan.
    – George
    May 16, 2016 at 20:49
  • 1
    2 things: In Catalina, the path to the wifi scanner is Window-Scans or alt cmd 4, and also, I was not able to get it to work either in Catalina, even after pausing.
    – Rafael
    Dec 27, 2020 at 2:27
22

For 10.11.x, because the options for controlling the Broadcom driver are limited, you will want to first disable roaming,

sudo defaults write /Library/Preferences/com.apple.airport.opproam disabled -bool true

Then make a mesh out of maybe 1/2" chicken wire and stick it over your laptop to penalize the 2.4 GHz signal. Once you are able to connect to the 5 GHz AP,

sudo /System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport -I

you can remove the mesh and hopefully OSX will not switch BSSID.

http://www.compliance-club.com/archive/keitharmstrong/990810n.gif

3
  • 18
    up voted for the sheer ridiculousness of this answer, knowing full well that it might work.
    – Anna
    Sep 17, 2017 at 15:21
  • That second command with -I does nothing except show info for the currently connected network. How do you prevent it from switching back to the stronger 2.4GHz network after you remove the chicken wire?
    – Elliott
    Feb 28, 2018 at 22:15
  • Actually, this is pretty practical. If you're admin on the router, you can turn off the 2.4ghz radio, then do the above without the chicken mesh. And then you can turn your 2.4ghz radio when you finish the procedure.
    – Lance Kind
    Nov 18, 2019 at 16:44
13

I've spent some time on this issue and can attest that the only way to force a computer to the 5 GHz band is set up the 5 GHz band with a separate name.

Otherwise, the computer will auto connect to 5 GHz if it's close to the access point. At 15-20 feet away depending on obstructions, the computer will connect to 2.4 GHz if you use the same SSID for each band.

Apple tech support says that's the way it is, but you could certainly contact them to see if anything has changed recently...

Sorry.

11

My work need me to force my Macbook Air to link at specific channel of 5GHz and for some reason, I can't use airport utility achieve that.

My workaround is using Airtool to force my Macbook Air wireless interface to work at specific 5GHz channel or 2.4GHz channel and channel bandwidth (20Mhz/40Mhz).

It works as my expectation and maybe it can solve part of your situation.

My Macbook Air is running OS X 10.10.

1
4

The only other alternative to using different network names that I've heard of is using iStumbler to manually select the 5GHz signal to connect to.

1
  • 9
    I tried to use iStumbler (both v99 and v100), but double clicking the network name only brings up a signal strength graph. I saw no way to join a selected network.
    – lid
    May 26, 2014 at 17:38
4

Solution with 2.4ghz/5ghz network with same ssid.

If you are already connected to the 2.4 ghz network, you can set just the channel on your airport card, works in latest version of macOS Sierra 10.12.3 (2017-03-19)

sudo /System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport --channel=52

I've set the channel 52 which is used by my 5ghz network.

2
  • 3
    Unfortunately, does nothing for me (also on Sierra). The -I reports I'm on channel '11' both before and after issuing the command with a different channel.
    – davemyron
    May 19, 2017 at 20:07
  • 2
    This worked for me, I've just had to turn the Wifi off and on again. After that the connection was built with the specified channel.
    – Carlo
    Oct 7, 2018 at 12:22
1

Most devices choose the strongest signal. So set the 5GHz AP(s) to maximum power and then just diminish the broadcast power of the 2.4GHz AP(s) until 5GHz is seen to be preferable.

The price you pay is that any 2.4-only devices will have even more problems with congestion. But perhaps escaping congestion on most devices is worth that.

2
  • As indicated in the question, I don't have admin access to the network/APs.
    – lid
    Jul 12, 2015 at 22:21
  • 1
    Oh, good point. And I take it the network admins will not "break" the 2.4GHhz network in order to make devices migrate.
    – arnt
    Jul 14, 2015 at 12:03
1

http://www.adriangranados.com/apps/airtool

hey i got Airtool as recommended above, it works a treat as a tool for 'targeting' certain network channels, i now have my macs 'force' selecting the best channel in my household/neighbourhood zone, and the 'alt'+ airport icon shows the channels DL speeds so any necessary changes to set to different channels can be done easily in Airtool - highly recommended, free/donateware so i chipped them a few dollars as I've been annoyed by the lack of speeds at home, or rather the mac airport choosing inferior channels on a day to day basis - FWIW i logged the best and worst channels for a few weeks and assuming my neighbours don't keep switching channels nearby i should hope to get the best speeds

5
  • 2
    The developer of this tool is amazing and knows so much about WiFi technically. I’m so glad you mentioned this.
    – bmike
    Jun 18, 2020 at 17:05
  • Please don't use "thanks" as an answer. Instead, you can upvote questions and answers that you found helpful. Aug 8, 2020 at 0:41
  • 2
    Not working as network selector anymore, as it switches WiFi to monitor mode.
    – metalim
    Feb 18, 2023 at 8:54
  • Definitely no longer free. And definitely not just a few dollars
    – huyz
    Oct 12, 2023 at 23:54
  • One of the last free versions v1+ does work and is at macupdate.com/app/mac/56809/airtool/old-versions
    – huyz
    Oct 13, 2023 at 0:05
0

Why not use the same SSID, but give different password for 5GHz, vs 2.4GHz, that way you know what you are connecting to :D

0

Writing this as of August 2023 - Mac OS 14 Sonoma

Force 5 GHz WiFi Connection on macOS

If you're experiencing issues with your Mac connecting to the slower 2G band on routers that share SSID between 5G/2G (like the Google Wifi Nest), here's a guide to help you force a 5 GHz connection.

Identifying the 5G Channel

  1. Check Current Band: Hold option and click on the wifi icon on the macOS status bar. This will display the band you are currently connected to.
  2. Scan WiFi Channels: Use the following command to list all channels your WiFi is operating on:
    /System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport scan
    
    From the results, identify the channels corresponding to 5G and 2G. For instance, in my case, 5G was on channel 36 and 2G was on channel 11.

Switching to the 5G Channel

Once you've identified the 5G channel (e.g., channel 36), follow these steps:

  1. Turn off WiFi.
  2. Run the following command, replacing 36 with your 5G channel number:
    sudo /System/Library/PrivateFrameworks/Apple80211.framework/Resources/airport -c=36
    
  3. Turn WiFi back on.

Checking JoinMode Setting

It's also a good idea to check the `JoinMode` setting:

sudo /System/Library/PrivateFrameworks/Apple80211.framework/Versions/A/Resources/airport prefs

Ensure it's set to Preferred. If not, you can set it using:

sudo /System/Library/PrivateFrameworks/Apple80211.framework/Versions/A/Resources/airport prefs JoinMode=Preferred

Conclusion

With these steps, you should be able to enjoy a faster 5 GHz connection on your Mac.

Note: Always exercise caution when using sudo commands. Ensure you understand the command's purpose and potential impact.

Additional Notes

macOS (like many operating systems) has its own algorithms for choosing which WiFi band to connect to, based on a variety of factors including signal strength, interference, and past connection history. The instructions provided are a way to manually force the connection to a specific channel, but it's not a permanent solution.

Here are a few additional suggestions to help ensure a more consistent 5 GHz connection:

  • Separate SSIDs: If possible, configure your router to broadcast separate SSIDs for the 2.4 GHz and 5 GHz bands. This way, you can choose to connect to the 5 GHz band explicitly.
  • Router Placement: Ensure your router is placed in an optimal location. 5 GHz signals don't penetrate walls and other obstacles as well as 2.4 GHz signals. If you're closer to the router, your device is more likely to choose the 5 GHz band.
  • Update Firmware: Ensure your router's firmware is up to date. Manufacturers often release updates that improve performance and connection stability.
  • Network Prioritization: In the Network settings on your Mac, you can prioritize which networks to connect to first. If you have separate SSIDs for 2.4 GHz and 5 GHz, make sure the 5 GHz network is at the top of the list.
  • Forget Network: If you've previously connected to both the 2.4 GHz and 5 GHz bands, forget the 2.4 GHz network in your WiFi settings to prevent your Mac from connecting to it.
  • Third-Party Tools: There are third-party applications available that can give you more control over your WiFi connection on macOS. One such tool is "WiFi Explorer," which provides detailed information about networks and can help diagnose issues. Remember, while the 5 GHz band offers faster speeds, its range is shorter than the 2.4 GHz band. If you're far from the router or there are many obstacles in the way, your Mac might choose the 2.4 GHz band because it provides a more stable connection, even if it's slower.
-1

There are some apps (like WiFi Scanner) that will let you join the 5GHz band in case Mac OS chose the 2.4GHz one.

1
  • 6
    Could you provide links to the 'some apps'?
    – grg
    Sep 2, 2014 at 20:13
-2

Simple, get a router with support for band-steering. It will take care of moving your 5Ghz devices (if advertised in capability) to 5Ghz bands.

1
  • 1
    erm, unless you are connecting to someone else's router...
    – Jack Wasey
    May 1, 2018 at 13:18
-2

Lets say you want to use the same SSID on both radios (bands). This is important if you want your devices to communicate (say a printer is being shared on the 2.4 GHz via Bonjour). On the router management software, you may have the option to control how devices associate with the radios (bands). On DD-WRT for instance, you can enable MAC level filtering (allow/permit a MAC(s) or block/prevent MAC(s) from associating). In my setup, I have only allowed (Permit mode) one old legacy Apple airport to connect to my 2.4 GHz SSID. This forces the newer clients to connect to the 5 GHz radio even if the 2.4 looks tastier (better signal). Elegant enough for me. Here's a nice link on how to only permit certain devices (note, you will see both interfaces on your router): https://snaz.com/adding-security-to-your-wifi-network-with-a-mac-white-list/

3
  • The question explicitly indicates that I do not have admin access to the network. Also, tangentially, it is not necessary to use the same SSID on both radios as long as both radios serve up access to the same subnet (which is the case for most consumer routers).
    – lid
    Oct 6, 2015 at 13:40
  • Can you ask for this to be done for you (by someone with Admin rights)? I only posted this answer because others may be wondering how to setup their home routers to achieve your end desire. I'm using my Macbook like this at home (it has no access to the 2.4 GHz radio because it is in deny all unless in the filter).
    – Alex
    Oct 6, 2015 at 13:50
  • I also suspect you checked on the Apple support forum and found no solution. The base OS X software will probably not allow this modification easily. Tangentially, good luck.
    – Alex
    Oct 6, 2015 at 13:54

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .