Difference between essid, bssid and ssid in commands?

If I am correct, ESS is the union of a set of BSS's. ESSID and BSSID are just their IDs respectively.

How can I tell if a wireless network has essid, bssid or ssid? What differences are between usages of essid, bssid and ssid? When to use which?

Which one should apply to the wireless network created by my router in my apartment: ESSID, BSSID, or SSID?

Some examples of commands that use ESSID, BSSID or SSID as their arguments. But I am not sure why they use one not the others.

  1. The manpage of iwconfig says

    NAME
           iwconfig - configure a wireless network interface
    
    SYNOPSIS
           iwconfig [interface]
           iwconfig interface [essid X] [nwid N] [mode M] [freq F]
                              [channel C][sens S ][ap A ][nick NN ]
                              [rate R] [rts RT] [frag FT] [txpower T]
                              [enc E] [key K] [power P] [retry R]
                              [modu M] [commit]
           iwconfig --help
           iwconfig --version
    

    Why does it have an argument essid rather than bssid? Does a wireless network interface always work with a ESS not a BSS?

  2. wpa_cli has a command

       bssid <network id> <BSSID>
              set preferred BSSID for an SSID
    

    Why does it use BSSID instead of ESSID as iwconfig does?

  3. wpa_passphrase uses an argument for a SSID, does it mean the argument can be either BSSID or ESSID?

    SYNOPSIS
           wpa_passphrase [ ssid ] [ passphrase ]
    
  4. wicd-wired-settings.conf has the following settings:

       bssid = <BSSID_of_network>
              This value can be found using iwconfig(8).
    
       essid = <ESSID_of_network>
              This value can be found using iwconfig(8).
    

    Can iwconfig tell if a network is ESS or BSS?

Thanks!


My understanding is that ESSID is the name of the access point, which can be changed. On the other hand, BSSID is a numeric ID of the access point (something like the MAC address of the router). For instance, on my college campus we have many different access points with the same name, but BSSIDs are different for each router.

You can list networks with their respective ESSID and BSSID with

nmcli dev wifi

Or for cleaner output you can do nmcli -f SSID,BSSID dev wifi.

Also with iwlist, for example:

sudo iwlist wlp2s0 scan

Types of Service Sets:

  • BSS (Basic Service Set)
  • ESS (Extended Service Set). ESSs consists of one or more infrastructure-BBSs (the usual mode). Are associated with multiple access points. All the APs beacons will broadcast same SSID but different BSSID. It involves roaming. The user gets connected to the AP that has maximum strength. Usually nearby BSSs broadcast on different channels/frequencies.

diagram

IDentification:

  • SSID: Network name (friendly, text, even with non-ISO basic Latin characters, up to 64 characters). Could be hidden (no broadcast). Sometimes "wrongly" called ESSID since might group a set of APs under one name, but there is formally no such thing as an ESSID in 802.11 standards.
  • BSSID: MAC address of the access point, it uniquely identifies each one.

You can use these commands to get a lot of information of nearby networks:

nmcli -f NAME,SSID,SSID-HEX,BSSID,MODE,CHAN,FREQ,RATE,SIGNAL,BARS,SECURITY,WPA-FLAGS,RSN-FLAGS,DEVICE,ACTIVE,IN-USE,DBUS-PATH device wifi
# Or just nmcli device wifi

or iwlist wlp2s0 scanning, but since commands from net-tools and wireless-tools packages seems to be deprecated in Linux you could try to get familiar with modern iw from iproute2 package:

iw dev wlp2s0 scan dump

Reference

  • Understanding the Network Terms SSID, BSSID, and ESSID
  • What's the difference between a BSSID and an ESSID? - Quora

See also

  • Fast BSS Transition (AKA 802.11r, AKA Fast Roaming)