Discussion:
toggle short / long preamble with hostapd
Sin
2009-09-02 15:02:07 UTC
Permalink
Hello,


Does anyone know how to enable short preamble in 7-STABLE ?

I'm using ath with hostapd in ap mode. It seems there was an option in hostapd.conf, but this is not in FreeBSD's /usr/share/examples/hostapd/hostapd.conf


The missing hostapd.conf option was found in google:

# Short Preamble
# This parameter can be used to enable optional use of short preamble for
# frames sent at 2 Mbps, 5.5 Mbps, and 11 Mbps to improve network performance.
# This applies only to IEEE 802.11b-compatible networks and this should only be
# enabled if the local hardware supports use of short preamble. If any of the
# associated STAs do not support short preamble, use of short preamble will be
# disabled (and enabled when such STAs disassociate) dynamically.
# 0 = do not allow use of short preamble (default)
# 1 = allow use of short preamble
#preamble=1


my version of hostapd is " v0.5.10 " - I was not able to set this option


hostapd.conf:

interface=ath0
#preamble=1
debug=1
ctrl_interface=/var/run/hostapd
ctrl_interface_group=wheel
ssid=private
wpa=1
wpa_passphrase=apassword
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP



rc.conf:

hostapd_enable="YES"
ifconfig_ath0="mode 11g hidessid mediaopt hostap"



ifconfig ath0:

ath0: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500
ether 00:17:9a:4c:e7:83
media: IEEE 802.11 Wireless Ethernet autoselect mode 11g <hostap>
status: associated
ssid private channel 1 (2412 Mhz 11g) bssid 00:17:9a:4c:e7:83
authmode WPA privacy MIXED deftxkey 2 TKIP 2:128-bit TKIP 3:128-bit
txpower 31.5 scanvalid 60 bgscan bgscanintvl 300 bgscanidle 250
roam:rssi11g 7 roam:rate11g 5 protmode CTS burst hidessid dtimperiod 1
Sam Leffler
2009-09-02 15:16:56 UTC
Permalink
Post by Sin
Hello,
Does anyone know how to enable short preamble in 7-STABLE ?
I'm using ath with hostapd in ap mode. It seems there was an option in hostapd.conf, but this is not in FreeBSD's /usr/share/examples/hostapd/hostapd.conf
# Short Preamble
# This parameter can be used to enable optional use of short preamble for
# frames sent at 2 Mbps, 5.5 Mbps, and 11 Mbps to improve network performance.
# This applies only to IEEE 802.11b-compatible networks and this should only be
# enabled if the local hardware supports use of short preamble. If any of the
# associated STAs do not support short preamble, use of short preamble will be
# disabled (and enabled when such STAs disassociate) dynamically.
# 0 = do not allow use of short preamble (default)
# 1 = allow use of short preamble
#preamble=1
my version of hostapd is " v0.5.10 " - I was not able to set this option
On freebsd hostapd is _purely_ an authenticator; to configure 802.11
parameters you use ifconfig.
Post by Sin
interface=ath0
#preamble=1
debug=1
ctrl_interface=/var/run/hostapd
ctrl_interface_group=wheel
ssid=private
wpa=1
wpa_passphrase=apassword
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP
hostapd_enable="YES"
ifconfig_ath0="mode 11g hidessid mediaopt hostap"
ath0: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500
ether 00:17:9a:4c:e7:83
media: IEEE 802.11 Wireless Ethernet autoselect mode 11g <hostap>
status: associated
ssid private channel 1 (2412 Mhz 11g) bssid 00:17:9a:4c:e7:83
authmode WPA privacy MIXED deftxkey 2 TKIP 2:128-bit TKIP 3:128-bit
txpower 31.5 scanvalid 60 bgscan bgscanintvl 300 bgscanidle 250
roam:rssi11g 7 roam:rate11g 5 protmode CTS burst hidessid dtimperiod 1
In ap mode you should not manually configure preamble; it should be
selected according to the associated stations. What are you trying to
accomplish?

Sam
Sin
2009-09-02 15:34:30 UTC
Permalink
Sam,

Basically I have a dlink WBR-1310 thats in bridge mode connected to my
current BSD router ( 6.3) I'm trying to replace this 1310 product with
FreeBSD 7. The last problem i'm dealing with is poor preformance. When I
use my current BSD 7 setup it works, but ping times from client to another
or even to the access point are bad. 100 - 400ms round trip. I had this
exact problem with the 1310. The fix was to change from long to short
preable. Been fine ever since.

I used three computers to prove this before emailing. Just swapping the
1310 for the 7-STABLE corrects this. The 1310 uses g only mode with short
preamble getting less then 5ms ping times to each client and host and
vice-versa

I realize that hostapd.conf is just for the encryption. However ifconfig
and ath man pages do not talk about this setting.


----- Original Message -----
From: "Sam Leffler" <***@errno.com>
To: "Sin" <***@gmail.com>
Cc: <freebsd-***@freebsd.org>
Sent: Wednesday, September 02, 2009 11:16 AM
Subject: Re: toggle short / long preamble with hostapd
Post by Sam Leffler
Post by Sin
Hello,
Does anyone know how to enable short preamble in 7-STABLE ?
I'm using ath with hostapd in ap mode. It seems there was an option in
hostapd.conf, but this is not in FreeBSD's
/usr/share/examples/hostapd/hostapd.conf
# Short Preamble
# This parameter can be used to enable optional use of short preamble for
# frames sent at 2 Mbps, 5.5 Mbps, and 11 Mbps to improve network performance.
# This applies only to IEEE 802.11b-compatible networks and this should only be
# enabled if the local hardware supports use of short preamble. If any of the
# associated STAs do not support short preamble, use of short preamble will be
# disabled (and enabled when such STAs disassociate) dynamically.
# 0 = do not allow use of short preamble (default)
# 1 = allow use of short preamble
#preamble=1
my version of hostapd is " v0.5.10 " - I was not able to set this option
On freebsd hostapd is _purely_ an authenticator; to configure 802.11
parameters you use ifconfig.
Post by Sin
interface=ath0
#preamble=1
debug=1
ctrl_interface=/var/run/hostapd
ctrl_interface_group=wheel
ssid=private
wpa=1
wpa_passphrase=apassword
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP
hostapd_enable="YES"
ifconfig_ath0="mode 11g hidessid mediaopt hostap"
ath0: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500
ether 00:17:9a:4c:e7:83
media: IEEE 802.11 Wireless Ethernet autoselect mode 11g <hostap>
status: associated
ssid private channel 1 (2412 Mhz 11g) bssid 00:17:9a:4c:e7:83
authmode WPA privacy MIXED deftxkey 2 TKIP 2:128-bit TKIP 3:128-bit
txpower 31.5 scanvalid 60 bgscan bgscanintvl 300 bgscanidle 250
roam:rssi11g 7 roam:rate11g 5 protmode CTS burst hidessid dtimperiod 1
In ap mode you should not manually configure preamble; it should be
selected according to the associated stations. What are you trying to
accomplish?
Sam
Sam Leffler
2009-09-03 18:04:15 UTC
Permalink
If I understand correctly you say that you have stations associated to a
FreeBSD 7 ap operating in 11g and pings between the clients are slow.
This occurred w/ the Dlink AP you're trying to replace until you
manually forced short preamble. If I've got it right then this doesn't
make sense as the ap should be using short preamble unless there are
non-ERP stations on the channel. You can trace the status of short/long
preamble with:

wlandebug +assoc

(you should get console msgs that when stations associate that indicate
whether protection is enabled). I believe you'll also get the same info
with:

ifconfig wlan0 list sta

on the ap. All this applies to 8.x; I've long since forgotten how
things work on 7.x and I'd recommend that if you're doing a new install
you use 8.0 and not 7.x.

In general forcing short preamble should not have the effect you
describe; just the opposite. If you want to figure out what's really
going on then try to turn off stations that might be interfering (if
possible). Otherwise you might try moving to a different channel to
avoid whatever station is interfering. Another possibility is one or
both stations are in power save mode and there's a bug in the RELENG_7
ap support; wlandebug +power might help for that.

I can look at adding a knob to force short/long preamble. It would go
into HEAD though and can't promise to backport to RELENG_7.

Sam
Post by Sin
Sam,
Basically I have a dlink WBR-1310 thats in bridge mode connected to my
current BSD router ( 6.3) I'm trying to replace this 1310 product with
FreeBSD 7. The last problem i'm dealing with is poor preformance.
When I use my current BSD 7 setup it works, but ping times from client
to another or even to the access point are bad. 100 - 400ms round
trip. I had this exact problem with the 1310. The fix was to change
from long to short preable. Been fine ever since.
I used three computers to prove this before emailing. Just swapping
the 1310 for the 7-STABLE corrects this. The 1310 uses g only mode
with short preamble getting less then 5ms ping times to each client and
host and vice-versa
I realize that hostapd.conf is just for the encryption. However
ifconfig and ath man pages do not talk about this setting.
Sent: Wednesday, September 02, 2009 11:16 AM
Subject: Re: toggle short / long preamble with hostapd
Post by Sam Leffler
Post by Sin
Hello,
Does anyone know how to enable short preamble in 7-STABLE ?
I'm using ath with hostapd in ap mode. It seems there was an option
in hostapd.conf, but this is not in FreeBSD's
/usr/share/examples/hostapd/hostapd.conf
# Short Preamble
# This parameter can be used to enable optional use of short preamble for
# frames sent at 2 Mbps, 5.5 Mbps, and 11 Mbps to improve network performance.
# This applies only to IEEE 802.11b-compatible networks and this should only be
# enabled if the local hardware supports use of short preamble. If any of the
# associated STAs do not support short preamble, use of short preamble will be
# disabled (and enabled when such STAs disassociate) dynamically.
# 0 = do not allow use of short preamble (default)
# 1 = allow use of short preamble
#preamble=1
my version of hostapd is " v0.5.10 " - I was not able to set this option
On freebsd hostapd is _purely_ an authenticator; to configure 802.11
parameters you use ifconfig.
Post by Sin
interface=ath0
#preamble=1
debug=1
ctrl_interface=/var/run/hostapd
ctrl_interface_group=wheel
ssid=private
wpa=1
wpa_passphrase=apassword
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP
hostapd_enable="YES"
ifconfig_ath0="mode 11g hidessid mediaopt hostap"
ath0: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500
ether 00:17:9a:4c:e7:83
media: IEEE 802.11 Wireless Ethernet autoselect mode 11g <hostap>
status: associated
ssid private channel 1 (2412 Mhz 11g) bssid 00:17:9a:4c:e7:83
authmode WPA privacy MIXED deftxkey 2 TKIP 2:128-bit TKIP 3:128-bit
txpower 31.5 scanvalid 60 bgscan bgscanintvl 300 bgscanidle 250
roam:rssi11g 7 roam:rate11g 5 protmode CTS burst hidessid dtimperiod 1
In ap mode you should not manually configure preamble; it should be
selected according to the associated stations. What are you trying to
accomplish?
Sam
Sin
2009-09-03 18:59:59 UTC
Permalink
Sam,

You understand correctly. I should of mentioned also before with high
latency comes packet loss, around 15 %. Setting short preamble makes this 1
% or less.

So you are right - this doesn't make sense. If I've read this correctly,
short preamble is enabled. So I do the ping tests from each machine
including the AP and latency is back to under 2ms.

test# ifconfig ath0 list sta
ADDR AID CHAN RATE RSSI IDLE TXSEQ RXSEQ CAPS FLAG
00:18:de:22:13:f1 1 10 36M 29.5 0 146 34480 EPS AE WPA
00:18:39:15:c6:24 2 10 48M 36.0 0 140 32160 EPS AE WPA


I was using channel 1 before in the first email because it was free ( found
it free with ifconfig ath0 up scan ) I'm wondering if just changing to
channel 10 was the real fix.


I wll take your advice and move everything to 8.0. Having the option in any
version to force preamble mode would be a nice feature.


----- Original Message -----
From: "Sam Leffler" <***@errno.com>
To: "Sin" <***@gmail.com>
Cc: <freebsd-***@freebsd.org>
Sent: Thursday, September 03, 2009 2:04 PM
Subject: Re: toggle short / long preamble with hostapd
Post by Sam Leffler
If I understand correctly you say that you have stations associated to a
FreeBSD 7 ap operating in 11g and pings between the clients are slow. This
occurred w/ the Dlink AP you're trying to replace until you manually
forced short preamble. If I've got it right then this doesn't make sense
as the ap should be using short preamble unless there are non-ERP stations
wlandebug +assoc
(you should get console msgs that when stations associate that indicate
whether protection is enabled). I believe you'll also get the same info
ifconfig wlan0 list sta
on the ap. All this applies to 8.x; I've long since forgotten how things
work on 7.x and I'd recommend that if you're doing a new install you use
8.0 and not 7.x.
In general forcing short preamble should not have the effect you describe;
just the opposite. If you want to figure out what's really going on then
try to turn off stations that might be interfering (if possible).
Otherwise you might try moving to a different channel to avoid whatever
station is interfering. Another possibility is one or both stations are
in power save mode and there's a bug in the RELENG_7 ap support; wlandebug
+power might help for that.
I can look at adding a knob to force short/long preamble. It would go
into HEAD though and can't promise to backport to RELENG_7.
Sam
Post by Sin
Sam,
Basically I have a dlink WBR-1310 thats in bridge mode connected to my
current BSD router ( 6.3) I'm trying to replace this 1310 product with
FreeBSD 7. The last problem i'm dealing with is poor preformance.
When I use my current BSD 7 setup it works, but ping times from client to
another or even to the access point are bad. 100 - 400ms round trip.
I had this exact problem with the 1310. The fix was to change from long
to short preable. Been fine ever since.
I used three computers to prove this before emailing. Just swapping the
1310 for the 7-STABLE corrects this. The 1310 uses g only mode with
short preamble getting less then 5ms ping times to each client and host
and vice-versa
I realize that hostapd.conf is just for the encryption. However ifconfig
and ath man pages do not talk about this setting.
Sent: Wednesday, September 02, 2009 11:16 AM
Subject: Re: toggle short / long preamble with hostapd
Post by Sam Leffler
Post by Sin
Hello,
Does anyone know how to enable short preamble in 7-STABLE ?
I'm using ath with hostapd in ap mode. It seems there was an option in
hostapd.conf, but this is not in FreeBSD's
/usr/share/examples/hostapd/hostapd.conf
# Short Preamble
# This parameter can be used to enable optional use of short preamble for
# frames sent at 2 Mbps, 5.5 Mbps, and 11 Mbps to improve network performance.
# This applies only to IEEE 802.11b-compatible networks and this should only be
# enabled if the local hardware supports use of short preamble. If any of the
# associated STAs do not support short preamble, use of short preamble will be
# disabled (and enabled when such STAs disassociate) dynamically.
# 0 = do not allow use of short preamble (default)
# 1 = allow use of short preamble
#preamble=1
my version of hostapd is " v0.5.10 " - I was not able to set this option
On freebsd hostapd is _purely_ an authenticator; to configure 802.11
parameters you use ifconfig.
Post by Sin
interface=ath0
#preamble=1
debug=1
ctrl_interface=/var/run/hostapd
ctrl_interface_group=wheel
ssid=private
wpa=1
wpa_passphrase=apassword
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP
hostapd_enable="YES"
ifconfig_ath0="mode 11g hidessid mediaopt hostap"
ath0: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500
ether 00:17:9a:4c:e7:83
media: IEEE 802.11 Wireless Ethernet autoselect mode 11g <hostap>
status: associated
ssid private channel 1 (2412 Mhz 11g) bssid 00:17:9a:4c:e7:83
authmode WPA privacy MIXED deftxkey 2 TKIP 2:128-bit TKIP 3:128-bit
txpower 31.5 scanvalid 60 bgscan bgscanintvl 300 bgscanidle 250
roam:rssi11g 7 roam:rate11g 5 protmode CTS burst hidessid dtimperiod 1
In ap mode you should not manually configure preamble; it should be
selected according to the associated stations. What are you trying to
accomplish?
Sam
Loading...