用 Linux bridge 有線和無線(SoftAP)

用無線網卡來當 AP,這邊不說很長,只講個關鍵部分,
因為大部分的這類設定的網站都有提詳細設定的指令部分,
例如:IBM 的 Building a wireless access point on Linux
若對以下指令的意義了解的話一下就 OK 了,

啟用 bridge 有線和無線:

ifconfig eth0 0.0.0.0 up
ifconfig wlan0 0.0.0.0 up
iwconfig wlan0 mode master
brctl addbr br0
brctl addif eth0
brctl addif wlan0

關閉:

ifconfig eth0 0.0.0.0 down
ifconfig wlan0 0.0.0.0 down
brctl delif br0 eth0
brctl delif br0 wlan0
brctl delbr br0

在這邊我一直卡住的是設定 mode master 這個部分,
原來不是可以驅動無線網卡的 driver 就可以了,
要特定的 driver,在 本頁 中提到:

Supported drivers:

Linux drivers that support Linux Wireless Extensions v19 or newer with WPA/WPA2 extensions
Host AP driver for Prism2/2.5/3
Linuxant DriverLoader with Windows NDIS driver supporting WPA
Agere Systems Inc. Linux Driver (Hermes-I/Hermes-II chipset)
madwifi (Atheros ar521x)
ATMEL AT76C5XXx
Linux ndiswrapper with Windows NDIS driver
Broadcom wl.o driver
Intel ipw2100 and ipw2200
Wired Ethernet drivers
BSD net80211 layer (e.g., Atheros driver) (FreeBSD 6-CURRENT)
Windows NDIS drivers (Windows; at least XP and 2000, others not tested)

在我這邊由於一插上的卡直接出現 orinoco_cs 就動了,
一直沒有想到是它,
後來換上 hostap_cs 就 OK 了,
可能是我沒仔細讀吧!
反正強調一下,特定的驅動才能當AP!!


Posted

in

by

Tags: