In /etc/network/interfaces (on Debian Linux 7.6 with wpa_supplicant), wireless-ap forces a specific access point for wireless-essid connections.

Is there an equivalent option for wpa-ssid/wpa-psk connections to force a specific access point?

I'm looking for a hypothetical option like:

wpa-ap 01:23:34:56:78:9A

that would commit me to a particular access point out of a number of access points that all use the same wpa-ssid. The closest option like this is wireless-ap but it doesn't work for wpa connections.

2 Answers 2


In order to configure wpa_supplicant to connect to a specific network:

sudo nano /etc/wpa_supplicant/wpa_supplicant.conf

Have the file content look something like:

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev

    pairwise=CCMP TKIP
    group=CCMP TKIP

Now you should be able to bring down / up the interface using

sudo ifdown wlan0
sudo ifup wlan0

Hope that helps!


I think that the option that you are looking for is wpa-bssid.

From (the surprisingly well hidden) /usr/share/doc/wpasupplicant/README.Debian.gz:

Table of Common Options

A brief summary of common 'wpa-' options that may be used in the
/etc/network/interfaces stanza for a wireless device. See the
'Important Notes About Managed Mode' section for information about
valid and invalid 'wpa-' values.

NOTE: ALL values are CASE SeNsItVe

Element        Example Value            Description
=======        =============            ===========
wpa-ssid       plaintextstring          sets the ssid of your network

wpa-bssid      00:1a:2b:3c:4d:5e        the bssid of your AP

wpa-psk        0123456789......         your preshared wpa key. Use
                                        wpa_passphrase(8) to generate your psk
                                        from a passphrase and ssid pair
wpa-key-mgmt   NONE, WPA-PSK, WPA-EAP,  list of accepted authenticated key
               IEEE8021X                management protocols

(The list continues.)

Hope this helps.

You must log in to answer this question.

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