fixunix
Tags Register FAQ Members List Social Groups Calendar Search Today's Posts Mark Forums Read

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 ...


Fix Unix > Linux > Help > Networking > Bridge with a wlan0 interface using wpa

Reply
 
LinkBack Tools
  #1  
Old 09-02-2008, 04:04 AM
Junior Member
 
Join Date: Sep 2009
Posts: 0
Default 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
Reply With Quote
  #2  
Old 09-02-2008, 05:16 AM
Junior Member
 
Join Date: Sep 2009
Posts: 0
Default 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
Reply With Quote
  #3  
Old 09-02-2008, 08:06 AM
Junior Member
 
Join Date: Sep 2009
Posts: 0
Default 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 ?
Reply With Quote
  #4  
Old 09-02-2008, 12:18 PM
Junior Member
 
Join Date: Sep 2009
Posts: 0
Default 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 thrff Fragment thr=2352 B
Encryption keyff
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
Reply With Quote
  #5  
Old 09-02-2008, 12:28 PM
Junior Member
 
Join Date: Sep 2009
Posts: 0
Default 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.
Reply With Quote
  #6  
Old 09-02-2008, 01:18 PM
Junior Member
 
Join Date: Sep 2009
Posts: 0
Default 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
Reply With Quote
  #7  
Old 09-02-2008, 05:02 PM
Junior Member
 
Join Date: Sep 2009
Posts: 0
Default 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
Reply With Quote
  #8  
Old 09-02-2008, 06:50 PM
Junior Member
 
Join Date: Sep 2009
Posts: 0
Default 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
Reply With Quote
Reply

Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
wlan0 disappeared... unix Suse 1 10-17-2008 09:50 PM
Re: SNMP on a bridge interface unix SNMP 0 02-11-2008 03:12 PM
SNMP on a bridge interface unix SNMP 0 01-07-2008 12:59 PM
I have 4 NIC cards on Linux PC, can I assign Ip address to bridge interface? unix Networking 2 09-30-2007 03:37 PM
if_bridge: Assigning IP Address to Bridge Interface unix FreeBSD 0 08-02-2006 03:57 AM


All times are GMT. The time now is 10:39 AM.