Bridge with a wlan0 interface using wpa - Networking
This is a discussion on Bridge with a wlan0 interface using wpa - Networking ; Hi!
Is it possible to have a bridge with a wlan/wpa interface?
How?
I have tried a lot, but cannot get the interface associated when using a
bridge.
If, for example, I have a normal connection up, the association is ...
-
Bridge with a wlan0 interface using wpa
Hi!
Is it possible to have a bridge with a wlan/wpa interface?
How?
I have tried a lot, but cannot get the interface associated when using a
bridge.
If, for example, I have a normal connection up, the association is lost
as soon as I do "ifconfig wlan0 down" or even "ifconfig wlan0 0.0.0.0
promisc".
Thanks for any help.
Paulo
-
Re: Bridge with a wlan0 interface using wpa
Paulo da Silva wrote:
> Hi!
>
> Is it possible to have a bridge with a wlan/wpa interface?
Definitely yes.
> How?
Depends on what exactly you're trying to do:
Bridge on WLAN-Client, Bridge with AdHoc-WLAN or Bridge on WLAN-AP?
So far I have only tried with WLAN-AP but I think generally it's this
procedure:
Bring WLAN-Interface up ('ifconfig wlan0 up' - no promisc, no IP)
Add WLAN-Interface to bridge ('brctl addif wlan0')
Configure WLAN-Interface w/ iwconfig or start wpa_supplicant (associate...)
In case of your bridge also being a WLAN-AP bring up necessary additional
software, f.ex. hostapd.
>
> I have tried a lot, but cannot get the interface associated when using a
> bridge.
>
> If, for example, I have a normal connection up, the association is lost
> as soon as I do "ifconfig wlan0 down" or even "ifconfig wlan0 0.0.0.0
> promisc".
'ifconfig wlan0 down' disables the interface and therefor association is
lost. Also you don't need to make an interface specifically promisc, adding
it to a bridge does that for you.
HTH,
Felix
-
Re: Bridge with a wlan0 interface using wpa
Hello,
Paulo da Silva a écrit :
>
> Is it possible to have a bridge with a wlan/wpa interface?
It depends on your hardware. Bridging a wireless interface relies on its
capability to send frames with a source MAC address other than its own.
See
> If, for example, I have a normal connection up, the association is lost
> as soon as I do "ifconfig wlan0 down" or even "ifconfig wlan0 0.0.0.0
> promisc".
Why the hell would you want to do that ?
-
Re: Bridge with a wlan0 interface using wpa
Felix Tiede escreveu:
> Paulo da Silva wrote:
>
>> Hi!
>>
>> Is it possible to have a bridge with a wlan/wpa interface?
>
> Definitely yes.
>
>> How?
>
> Depends on what exactly you're trying to do:
> Bridge on WLAN-Client, Bridge with AdHoc-WLAN or Bridge on WLAN-AP?
I don't know much about "network" stuff. I want to connect to a
adsl/router using wlan0+tap0 (tap0 is for virtual box). wlan0 works fine
if not in bridge.
>
> So far I have only tried with WLAN-AP but I think generally it's this
> procedure:
> Bring WLAN-Interface up ('ifconfig wlan0 up' - no promisc, no IP)
> Add WLAN-Interface to bridge ('brctl addif wlan0')
> Configure WLAN-Interface w/ iwconfig or start wpa_supplicant (associate...)
> In case of your bridge also being a WLAN-AP bring up necessary additional
> software, f.ex. hostapd.
I tried this:
modprobe iwl3945
ifconfig wlan0 up
brctl addbr br0
brctl addif br0 wlan0
brctl show br0
bridge name bridge id STP enabled interfaces
br0 8000.001cbf85461a no wlan0
wpa_supplicant -i wlan0 -c /etc/wpa_supplicant.conf -Bw
iwconfig wlan0 essid foo
ifconfig br0 192.168.1.33 up
iwconfig
lo no wireless extensions.
eth0 no wireless extensions.
tunl0 no wireless extensions.
wmaster0 no wireless extensions.
wlan0 IEEE 802.11g ESSID:"foo"
Mode:Managed Frequency:2.412 GHz Access Point: Not-Associated
Tx-Power=27 dBm
Retry min limit:7 RTS thr
ff Fragment thr=2352 B
Encryption key
ff
Link Quality:0 Signal level:0 Noise level:0
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0
br0 no wireless extensions.
I have tried several combinations of
wpa_supplicant -i wlan0 -c /etc/wpa_supplicant.conf -Bw
iwconfig wlan0 essid foo
ifconfig br0 192.168.1.33 up
Without "bridging", wpa_supplicant+iwconfig wlan0 essid foo + ifconfig
.... is enough.
Thanks
-
Re: Bridge with a wlan0 interface using wpa
Pascal Hambourg escreveu:
> Hello,
>
> Paulo da Silva a écrit :
>>
>> Is it possible to have a bridge with a wlan/wpa interface?
>
> It depends on your hardware. Bridging a wireless interface relies on its
> capability to send frames with a source MAC address other than its own.
> See
>
How can I know?
>
>
>> If, for example, I have a normal connection up, the association is
>> lost as soon as I do "ifconfig wlan0 down" or even "ifconfig wlan0
>> 0.0.0.0 promisc".
>
> Why the hell would you want to do that ?
I just copied from other bridge examples I saw, using google.
In another computer I have (desktop), I have a bridge with eth0+tap0 and
it works.
-
Re: Bridge with a wlan0 interface using wpa
Paulo da Silva escreveu:
> Felix Tiede escreveu:
>> Paulo da Silva wrote:
>>
....
>
> I have tried several combinations of
> wpa_supplicant -i wlan0 -c /etc/wpa_supplicant.conf -Bw
> iwconfig wlan0 essid foo
> ifconfig br0 192.168.1.33 up
Using some combinations, I could get wlan0 associated, but I think it
cannot authenticate!
dmesg
wlan0: authenticate with AP 00:21:22:0a:16:01
wlan0: RX authentication from 00:21:22:0a:16:01 (alg=0 transaction=2
status=0)
wlan0: authenticated
wlan0: associate with AP 00:21:22:0a:16:01
wlan0: RX ReassocResp from 00:21:22:0a:16:01 (capab=0x471 status=0 aid=1)
wlan0: associated
wlan0: switched to short barker preamble (BSSID=00:21:22:0a:16:01)
br0: port 1(wlan0) entering learning state
wlan0: Initial auth_alg=0
wlan0: authenticate with AP 00:21:22:0a:16:01
wlan0: RX authentication from 00:21:22:0a:16:01 (alg=0 transaction=2
status=0)
wlan0: authenticated
wlan0: associate with AP 00:21:22:0a:16:01
wlan0: RX ReassocResp from 00:21:22:0a:16:01 (capab=0x471 status=0 aid=1)
wlan0: associated
wlan0: RX deauthentication from 00:21:22:0a:16:01 (reason=1)
wlan0: deauthenticated
br0: port 1(wlan0) entering disabled state
-
Re: Bridge with a wlan0 interface using wpa
Paulo da Silva wrote:
> Paulo da Silva escreveu:
>> Felix Tiede escreveu:
>>> Paulo da Silva wrote:
>>>
> ...
>
>>
>> I have tried several combinations of
>> wpa_supplicant -i wlan0 -c /etc/wpa_supplicant.conf -Bw
>> iwconfig wlan0 essid foo
>> ifconfig br0 192.168.1.33 up
>
>
> Using some combinations, I could get wlan0 associated, but I think it
> cannot authenticate!
>
> dmesg
> wlan0: authenticate with AP 00:21:22:0a:16:01
> wlan0: RX authentication from 00:21:22:0a:16:01 (alg=0 transaction=2
> status=0)
> wlan0: authenticated
> wlan0: associate with AP 00:21:22:0a:16:01
> wlan0: RX ReassocResp from 00:21:22:0a:16:01 (capab=0x471 status=0 aid=1)
> wlan0: associated
> wlan0: switched to short barker preamble (BSSID=00:21:22:0a:16:01)
> br0: port 1(wlan0) entering learning state
> wlan0: Initial auth_alg=0
> wlan0: authenticate with AP 00:21:22:0a:16:01
> wlan0: RX authentication from 00:21:22:0a:16:01 (alg=0 transaction=2
> status=0)
> wlan0: authenticated
> wlan0: associate with AP 00:21:22:0a:16:01
> wlan0: RX ReassocResp from 00:21:22:0a:16:01 (capab=0x471 status=0 aid=1)
> wlan0: associated
> wlan0: RX deauthentication from 00:21:22:0a:16:01 (reason=1)
> wlan0: deauthenticated
> br0: port 1(wlan0) entering disabled state
Do you have a MAC filter active on your AP? If so, try with a deactivated
MAC filter.
HTH,
Felix
-
Re: Bridge with a wlan0 interface using wpa
Felix Tiede escreveu:
> Paulo da Silva wrote:
>
....
>>
>> Using some combinations, I could get wlan0 associated, but I think it
>> cannot authenticate!
>>
>> dmesg
>> wlan0: authenticate with AP 00:21:22:0a:16:01
>> wlan0: RX authentication from 00:21:22:0a:16:01 (alg=0 transaction=2
....
>> wlan0: deauthenticated
>> br0: port 1(wlan0) entering disabled state
>
> Do you have a MAC filter active on your AP? If so, try with a deactivated
> MAC filter.
>
I did it already. I think I began to get AP association afer that.
wpa_supplicant seems to not be able to authenticate when in bridge.
I'll try another solution without using bridge.
Thanks