# wpa\_supplicant connection

{% hint style="info" %}
Use `sudo dhclient wlan0` to request IP after connection.
{% endhint %}

### wpa\_supplicant.conf

```
# WPA-MGT (WPA Enterprise, PEAP)
network={
  ssid="NetworkName"
  scan_ssid=1
  key_mgmt=WPA-EAP
  identity="Domain\username"
  password="password"
  eap=PEAP
  phase1="peaplabel=0"
  phase2="auth=MSCHAPV2"
}
```

```
# WPA-PSK (WPA1/2 Personal)
network={
  ssid="network"
  scan_ssid=1
  psk="password"
  key_mgmt=WPA-PSK
}
```

```
# WEP
network={
  ssid="network"
  key_mgmt=NONE
  wep_key0="12345"  # 5 or 13 characters, or a hexkey starting with 0x
  #wep_key0=0102030405 #hex
  wep_tx_keyidx=0
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://osnotes.jackielam.net/oswp/general/basic-operations/wpa_supplicant-connection.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
