0

I'm trying to force a wifi connection thru a specific 5GHz network using the bssid on netplan configuration but it always report an error when I ran netplan apply command.

Here is my current configuration that fails:

wlan0:
  dhcp4: true
  dhcp6: false
  link-local: []
  access-points:
    "wifissid":
      password: "wifipassword"
    bssid: "3c:28:6d:95:76:00"

The error is the following:

sudo netplan apply
/etc/netplan/30-wlan0.yaml:10:16: Error in network definition: expected mapping (check indentation)
        bssid: "3c:28:6d:95:76:00"
               ^

Tried many different combinations but it always fail. Could you help me providing an example that works?

Thank you in advance. Ederson Santos

2 Answers2

1

In your question, you have the bssid indented such that it is listed directly under the access-points mapping as if it were an SSID. It must be indented so that it's under the SSID it's associated with (in the above example, indented so that it's under wifissid).

slangasek
  • 5,828
0

"You can find many templates in /usr/share/doc/netplan/examples/" according to the posting I just read in the link below. It is near the bottom where they give the address to the netplan.io site.

How to configure wpa_supplicant in Ubuntu server 20.04