FreeBSD 9.1 wifi access point rc.conf problem

Hello,

I have this problem, I tried to setup access point bridged with LAN interface. It totally didn't work, so I decided to go back and try just with a single interface.

Following the FreeBSD Handbook Wireless networking chapter, setting it up trough shell works fine perfectly:
Code:
root@sentinel:/root # ifconfig wlan0 create wlandev ral0
root@sentinel:/root # ifconfig wlan0 list caps
drivercaps=d85cd01<STA,IBSS,HOSTAP,AHDEMO,SHSLOT,SHPREAMBLE,MONITOR,MBSS,WPA1,WPA2,WME,WDS>
root@sentinel:/root # ifconfig wlan0 destroy
root@sentinel:/root # ifconfig wlan0 create wlandev ral0 wlanmode hostap
root@sentinel:/root # ifconfig wlan0 inet 192.168.2.1 netmask 255.255.255.0 ssid FBSD_AP
root@sentinel:/root # /etc/rc.d/hostapd restart
Stopping hostapd.
Waiting for PIDS: 3608.
Starting hostapd.
Configuration file: /etc/hostapd.conf
Using interface wlan0 with hwaddr 00:1e:e5:e8:d4:6d and ssid 'UnixFBSD'
root@sentinel:/root # ifconfig wlan0
wlan0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
	ether 00:1e:e5:e8:d4:6d
	inet6 fe80::21e:e5ff:fee8:d46d%wlan0 prefixlen 64 tentative scopeid 0xa 
	inet 192.168.2.1 netmask 0xffffff00 broadcast 192.168.2.255
	nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
	media: IEEE 802.11 Wireless Ethernet autoselect mode 11g <hostap>
	status: running
	ssid UnixFBSD channel 1 (2412 MHz 11g) bssid 00:1e:e5:e8:d4:6d
	country US authmode WPA privacy MIXED deftxkey 2 TKIP 2:128-bit
	txpower 0 scanvalid 60 protmode CTS wme dtimperiod 1 -dfs
root@sentinel:/root #
The SSID is given to the interface, encryption works fine and I can connect to the wireless network and ping everything inside.

Setting it up in /etc/rc.conf is also that straight explained, but didn't work so fine:
Code:
root@sentinel:/root # ifconfig wlan0 destroy
root@sentinel:/root # cat /etc/rc.conf |grep -i wlan
wlans_ral0="wlan0"
create_args_wlan0="wlanmode hostap"
ifconfig_wlan0="inet 192.168.2.1 netmask 255.255.255.0 ssid UnixFBSD"
root@sentinel:/root # /etc/rc.d/netif restart
............................................................................
root@sentinel:/root # ifconfig ral0
ral0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 2290
	ether 00:1e:e5:e8:d4:6d
	nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
	media: IEEE 802.11 Wireless Ethernet autoselect mode 11g <hostap>
	status: running
root@sentinel:/root # 
root@sentinel:/root # ifconfig wlan0
wlan0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
	ether 00:1e:e5:e8:d4:6d
	inet6 fe80::21e:e5ff:fee8:d46d%wlan0 prefixlen 64 tentative scopeid 0xa 
	nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
	media: IEEE 802.11 Wireless Ethernet autoselect mode 11g <hostap>
	status: running
	ssid "" channel 1 (2412 MHz 11g) bssid 00:1e:e5:e8:d4:6d
	country US authmode OPEN privacy OFF txpower 0 scanvalid 60
	protmode CTS wme dtimperiod 1 -dfs
root@sentinel:/root #

And the logs:
Code:
root@sentinel:/root # dmesg -a |tail
in6_purgeaddr: err=65, destination address delete failed
re0: link state changed to DOWN
re1: link state changed to DOWN
wlan0: Ethernet address: 00:1e:e5:e8:d4:6d
ral0: need multicast update callback
ral0: need multicast update callback
ral0: need multicast update callback
ral0: need multicast update callback
re0: link state changed to UP
re1: link state changed to UP
root@sentinel:/root # 
root@sentinel:/root # tail /var/log/messages
Jan  1 09:16:48 sentinel kernel: ral0: need multicast update callback
Jan  1 09:19:27 sentinel last message repeated 5 times
Jan  1 09:22:46 sentinel kernel: in6_purgeaddr: err=65, destination address delete failed
Jan  1 09:22:49 sentinel kernel: re0: link state changed to DOWN
Jan  1 09:22:49 sentinel kernel: re1: link state changed to DOWN
Jan  1 09:22:49 sentinel kernel: wlan0: Ethernet address: 00:1e:e5:e8:d4:6d
Jan  1 09:22:49 sentinel kernel: ral0: need multicast update callback
Jan  1 09:22:49 sentinel last message repeated 3 times
Jan  1 09:22:51 sentinel kernel: re0: link state changed to UP
Jan  1 09:22:53 sentinel kernel: re1: link state changed to UP

No SSID or IP address is assigned to the interface.
The wi-fi card is Linksys WMP600N.

I guess when this issue is solved, I will try again with bridging with the LAN interface, but probably here is the main problem.

Anybody have idea what cause this and how to fix it?

Thank you.
 
IIRC if you have hostapd running it can prevent some changes taking place to the interface. You may need to kill hostapd, make your changes, then start hostapd again. Everything should happen in the right order at boot.

HTH,

Andrew
 
I have LAN bridged with WLAN and works great.
It's my /etc/rc.conf:
Code:
## WLAN
wlans_ath0="wlan0"
create_args_wlan0="wlanmode hostap"
ifconfig_wlan0="channel 11:n/20 txpower 20"

## Bridge
cloned_interfaces="bridge0"
ifconfig_bridge0="addm re0 stp re0 addm re1 stp re1 addm wlan0 up"
ifconfig_bridge0_alias0="ether 00:aa:bb:cc:dd:ee"
ifconfig_bridge0_alias1="inet 192.168.0.1/24"
ifconfig_re0="up"
ifconfig_re1="up"

and /etc/hostapd.conf:
Code:
interface=wlan0
driver=bsd
ctrl_interface=/var/run/hostapd
ctrl_interface_group=wheel
ssid=freebsdap
wpa=3
wpa_passphrase=123123
wpa_key_mgmt=WPA-PSK
wpa_pairwise=CCMP TKIP
 
Back
Top