:: Re: [DNG] howto wifi roaming [was R…
Página Inicial
Delete this message
Reply to this message
Autor: Didier Kryn
Data:  
Para: dng
Assunto: Re: [DNG] howto wifi roaming [was Re: Systemd Shims]
Le 19/08/2015 12:03, Didier Kryn a écrit :
> Le 19/08/2015 01:37, Isaac Dunham a écrit :
>> On Tue, Aug 18, 2015 at 02:19:20PM +0200, Didier Kryn wrote:
>>> Le 18/08/2015 12:49, Edward Bartolo a écrit :
>>>> At the moment I am stuck trying to use sudo to run ifup from within my
>>>> frontend.
>>>      Just in case, here are a few things I know about wpa_supplicant:

>>>
>>>       wpa_supplicant does ifups automatically when it connects to a 
>>> wifi
>>> station. If an interface name is not specified in 
>>> wpa_supplicant.conf, in
>>> the proper section of this station, it ifups the interface named 
>>> "default".

>>>
>>>      Therefore you shouldn't ifup yourself. You only need to fill the
>>> configuration files, wpa_supplicant.conf, via the control socket and
>>> interfaces by some method probably involving sudo.
>> I've not been able to figure out what that would look like.
>> Could you give a sample wpa_supplicant.conf and /etc/network/interfaces?

>>
>> Assume the following configuration:
>> network 1: (WPA)
>>     SSID = "home"
>>     pass = "topsecret"
>>     ip = 192.168.1.100
>>     router = 192.168.1.0
>>     nameserver = 8.8.8.8

>>
>> network 2: (open, DHCP)
>>     SSID = "public"

>>
>> This is what I know would go in wpa_supplicant.conf:
>>
>> ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=net
>> network={
>>     ssid="home"
>>     #psk="topsecret"
>>     psk=c406ef685867ff2dca906a4992ab997d6ebd5c747451113c0c0ead704d859010
>> }
>> network={
>>     ssid="public"
>>     key_mgmt=NONE
>> }

>>
>     You add the following line to your home config in 
> wpa_supplicant.conf:
>     id_str="foo"

>
>     and you put the following in interfaces:
> ----------------------------------
> allow-hotplug wlan0
> iface wlan0 inet manual
>         wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf

>
> iface foo inet static
>        address      192.168.1.100
>        netmask      255.255.255.0
>        network      192.168.1.0
>        broadcast    192.168.1.255
>        gateway      192.168.1.0

>
> iface default inet dhcp
> -----------------------------------
>
> With id_str, you can assign an interface name to every wifi station in
> wpa_supplicant.conf
> and declare in interfaces how you want it configured. id_str defaults
> to "default"
>
>     Attached are my two files. I have masked the passwords in 
> wpa_supplicant.conf.I tried
> to use a static address with the wifi in a hotel where dhcp wasn't 
> working; I don't use
> it anymore but there is the relic in wpa_supplicant.conf.

>
>     For the file interfaces,I don't know how the instruction wpa-roam 
> is executed, since
> there isno file with this name in the system. I can only guess it is 
> interpreted by
> ifup/ifdown.Note the last line; it tells ifup that the default 
> interface name used
> by wpa_supplicant must be configured by dhcp.

>
>     The only 3 package I have installed to manage the network are 
> ifplugd, wpa_supplicant
> and wpagui. I use the last only to enable a new wifi station or to 
> disconnect/reconnect when
> there is a problem. The rest of the time, wpa_supplicant does 
> everything automagically.

>
>
>     For the whole explanation, have a look at this howto:

>
> http://www.debuntu.org/how-to-wifi-roaming-with-wpa-supplicant/
>
>     Didier

>


     Yet another howto here: http://manual.aptosid.com/en/inet-setup-en.htm