wifi connection
Matt
sendtomatt at gmail.com
Sat Jun 4 08:04:30 UTC 2011
On 06/03/11 07:19, pál péter wrote:
> Hi everyone!
>
> I have a very silly question. I have an initiated wlan device, and i can
> scann the available access points, BUT:
> Can anyone write to me those shell commands and there parameters (ifconfig
> etc), which need to connect to a scanned access point through the access
> point ssid or bssid. I read the following manuals:
> ifconfig, vlan, but i did not find the answers.
> I need a full command list, eg.:
> -connect to a simple access point without encryption.
> -connect to an access point with WPA encryption.
> -connect to an access point with other encryptions.
> -connect to an access point and using DHCP
> -connect to an access point which require password.
> I need only shell commands, not rc.conf modifications or other options.
> Thanks a lot.
> _______________________________________________
> freebsd-wireless at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-wireless
> To unsubscribe, send any mail to "freebsd-wireless-unsubscribe at freebsd.org"
>
A. ifconfig <wlandevicename> up
B. ifconfig wlan0 create wlandev <wlandevicename>
C. ifconfig wlan0 up
D. If connecting to WPA/WEP/WPA2|CCMP goto E, else continue
1. ifconfig wlan0 ssid 'nameofaccesspoint'
2. dhclient wlan0
3. You should be connected now to the non-encrypted access
point nameofaccesspoint; exit 0 :)
E. For encrypted access point, setup /etc/wpa_supplicant.conf (type man
wpa_supplicant.conf for instructions)
F. wpa_supplicant -i wlan0 -c /etc/wpa_supplicant.conf -B
1. wait for a bit to allow card to connect
2. dhclient wlan0
3. You are now connected to the highest priority access
point in wpa_supplicant.conf which could be
contacted.
It helps me to make a short shell script to handle these, and you can
use dialog command to make it interactive (specific networks, options,
static ips instead of dhcp client etc.).
If you want static ips, replace the "dhclient wlan0" lines above with:
ifconfig wlan0 inet <staticip> netmask <netmask>
route add default <defaultrouterip>
Always make sure you have a sensible /etc/resolv.conf, easy to
test...see if you can ping 8.8.8.8 then try www.google.com. If the first
one works and the second one fails you don't have working DNS.
May the gods of plain text email forgive me if Thunderbird does not
preserve my tab-based formatting.
Matt
More information about the freebsd-wireless
mailing list