Many 802.11b/g/n WiFi base stations like Apple’s AirPort range of products offer identical SSIDs (wireless network names) on both the 2.4GHz and 5GHz bands. Normally, the macOS WiFi interface then selects the Base SSID (connection) with the highest signal to noise ratio. However it might happen, in particular to avoid interference with Bluetooth devices, that connecting to a 5GHz BSSID is the better choice.
To force macOS to use a particular BSSID, do the following:
Open /Applications/Utilities/Terminal.app
and run
/System/Library/PrivateFrameworks/Apple80211.framework/Resources/airport -s
which after a short while returns the list of wireless networks found.
If you prefer a graphical user interface, ⌥-click onto the WiFi
symbol in the menu bar and choose Open Wireless Diagnostics ...
, then
choose Window -> Scan (or press ⌥⌘4) to open a new window with a similar list.
Choose a channel number you would like to connect to and run
sudo /System/Library/PrivateFrameworks/Apple80211.framework/Resources/airport --channel=?channelNumber?
(replace ?channelNumber?
with the one chosen). It will take a few seconds and your Macintosh will connect to the BSSID with that particular channel number.
I am not aware of a possibility to disable 2.4GHz BSSIDs completely.