[Avila] STP on the GW2348-4 and Madwifi

mando at airspot.it mando at airspot.it
Tue Nov 13 11:55:00 EST 2007


Hi Jake,

Thank you for your e-mail and help.

Today we've applied your patch to our Madwifi (0.9.1) and to the newest one
(0.9.3.2) too.
We tested it in the following scenario:

        AP    ch. 36     Sta
          |----------------------|
      BR1 |                      | BR2
          |----------------------|
          Sta   ch. 40     AP

Unforunately it doesn't work because every port of both the boards remains in
forwarding state.

We were expecting that one of the four ports would move to the blocking state.
Obviously one of the two board is elected as root by stp and it has both ports
in forwarding state, the problem is on the other one.

Anyway, all our configurations follows :

Board 1:

wlanconfig ath0 create wlandev wifi0 wlanmode ap
iwpriv ath0 mode 1
iwconfig ath0 essid tratta1 channel 36
iwpriv ath0 wds 1
ifconfig ath0 0.0.0.0 up
wlanconfig ath1 create wlandev wifi1 wlanmode sta nosbeacon
iwpriv ath1 mode 1
iwconfig ath1 essid tratta2
iwpriv ath1 wds 1
ifconfig ath1 0.0.0.0 up
brctl addbr br0
brctl addif br0 ath0
brctl addif br0 ath1
ifconfig br0 11.0.0.1/24 up
brctl stp br0 on

Board 2:

wlanconfig ath0 create wlandev wifi0 wlanmode ap
iwpriv ath0 mode 1
iwconfig ath0 essid tratta2 channel 40
ifconfig ath0 0.0.0.0 up
wlanconfig ath1 create wlandev wifi1 wlanmode sta nosbeacon
iwpriv ath1 mode 1
iwconfig ath1 essid tratta1
iwpriv ath1 wds 1
ifconfig ath1 0.0.0.0 up
brctl addbr br0
brctl addif br0 ath0
brctl addif br0 ath1
ifconfig br0 11.0.0.2/24 up
brctl stp br0 on

The interfaces associate in the right way, but this is the result of the command
brctl showstp br0:

Board 1:

# brctl showstp br0
br0
 bridge id              8000.00026f408483
 designated root        8000.00026f408483
 root port                 0                    path cost                  0
 max age                  20.00                 bridge max age            20.00
 hello time                2.00                 bridge hello time          2.00
 forward delay            15.00                 bridge forward delay      15.00
 ageing time             300.00
 hello timer               0.35                 tcn timer                  0.00
 topology change timer     0.00                 gc timer                   0.07
 flags


ath0 (0)
 port id                0000                    state                forwarding
 designated root        8000.00026f408483       path cost                100
 designated bridge      8000.00026f408483       message age timer          0.00
 designated port        8001                    forward delay timer        0.00
 designated cost           0                    hold timer                 0.34
 flags

ath1 (0)
 port id                0000                    state                forwarding
 designated root        8000.00026f408483       path cost                100
 designated bridge      8000.00026f408483       message age timer          0.00
 designated port        8002                    forward delay timer        0.00
 designated cost           0                    hold timer                 0.00
 flags

Board 2:

# brctl showstp br0
br0
 bridge id              8000.00156d539d8d
 designated root        8000.00026f408483
 root port                 1                    path cost                100
 max age                  20.00                 bridge max age            20.00
 hello time                2.00                 bridge hello time          2.00
 forward delay            15.00                 bridge forward delay      15.00
 ageing time             100.00
 hello timer               0.00                 tcn timer                  0.00
 topology change timer     0.00                 gc timer                   0.08
 flags


ath0 (0)
 port id                0000                    state                forwarding
 designated root        8000.00026f408483       path cost                100
 designated bridge      8000.00026f408483       message age timer         19.70
 designated port        8002                    forward delay timer        0.00
 designated cost           0                    hold timer                 0.00
 flags

ath1 (0)
 port id                0000                    state                forwarding
 designated root        8000.00026f408483       path cost                100
 designated bridge      8000.00156d539d8d       message age timer          0.00
 designated port        8002                    forward delay timer        0.00
 designated cost         100                    hold timer                 0.69
 flags


Maybe we're using the wrong scenario to test STP with MadWiFi, can you tell us
your scenario?
This way we can reproduce it and test STP.

Thanks in advance for all your help

Ciao
Gianluca




-----Messaggio originale-----
Da: Jake Farrell [mailto:jake at amperion.com]
Inviato: sabato 10 novembre 2007 13.18
A: Avila; Avila
Oggetto: RE: [Avila] STP on the GW2348-4 and Madwifi

I had a very similar problem with madwifi and bridging and the root cause
was that madwifi was not updating the llc correctly.
Below is the patch that i used. Hopefully this will help

Jake


diff -Naur madwifi-ng.orig/net80211/ieee80211_input.c
madwifi-ng/net80211/ieee80211_input.c
--- madwifi-ng.orig/net80211/ieee80211_input.c	2006-07-05
23:23:08.000000000 -0400
+++ madwifi-ng/net80211/ieee80211_input.c	2007-01-25
15:11:26.000000000 -0500
@@ -3491,7 +3491,11 @@
if (memcmp(eth->h_dest, dev->dev_addr, ETH_ALEN))
skb->pkt_type = PACKET_OTHERHOST;

-	return eth->h_proto;
+	// return eth->h_proto;
+    	if (ntohs(eth->h_proto) >= 1536)  return eth->h_proto;

+	// skip NETWARE check now

+   	return htons(ETH_P_802_2);
}
#endif



-----Original Message-----
From: mando at airspot.it [mailto:mando at airspot.it]
Sent: Fri 11/9/2007 1:49 PM
To: Avila
Subject: [Avila] STP on the GW2348-4 and Madwifi


Hi all,

we are trying to use the STP of bridge utils on the two wireless interfaces
of
two GW2348-4 by using the driver madwifi.

We bridge 2 Wi-Fi interfaces (one Station and one AP), apply the WDS 4
address
management (iwpriv athX wds 1)to both.

The Sta of BR1 associates to the AP of BR2 and vice versa.

Unfortunately, it does not work in the sense that it set all the interfaces
to
"forwarding", while it, for each BRX, should set one of them to "blocking".
Packets transit but I suspect on both the links.

AP    ch. 1     Sta
|-------------------|
BR1 |                   | BR2
|-------------------|
Sta   ch. 11     AP

STP works ok on the ethernet interfaces. Infact, using the EthXs, one is
blocked
and the other forwarded.

Our configuration is:

kernel 2.6.15
madwifi 0.9.1

Thank you in advance for your help.

Ciao
Gianluca








----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.


---------------------------------------------------------------------
To unsubscribe, e-mail: avila-unsubscribe at lists.unixstudios.net
For additional commands, e-mail: avila-help at lists.unixstudios.net






----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.

----- Fine messaggio inoltrato -----


----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.

----- Fine messaggio inoltrato -----


----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.




More information about the Avila mailing list