特殊:Badtitle/NS100:WifiDocs/MasterMode:修订间差异
小 新页面: {{From|https://help.ubuntu.com/community/WifiDocs/MasterMode}} {{Languages|UbuntuHelp:WifiDocs/MasterMode}} == Setting up a Wifi Adapter to support "master mode" == What we need for a wir... |
小无编辑摘要 |
||
第47行: | 第47行: | ||
* For other editions just enable restricted drivers | * For other editions just enable restricted drivers | ||
<pre><nowiki> | <pre><nowiki> | ||
wget http:// | wget http://downloads.sourceforge.net/madwifi/madwifi-0.9.4.tar.gz | ||
tar -xvzf madwifi-0.9.4.tar.gz | tar -xvzf madwifi-0.9.4.tar.gz | ||
cd madwifi-0.9.4 | cd madwifi-0.9.4 |
2010年5月20日 (四) 00:57的最新版本
文章出处: |
{{#if: | {{{2}}} | https://help.ubuntu.com/community/WifiDocs/MasterMode }} |
点击翻译: |
English {{#ifexist: {{#if: UbuntuHelp:WifiDocs/MasterMode | UbuntuHelp:WifiDocs/MasterMode | {{#if: | :}}WifiDocs/MasterMode}}/af | • {{#if: UbuntuHelp:WifiDocs/MasterMode|Afrikaans| [[::WifiDocs/MasterMode/af|Afrikaans]]}}|}} {{#ifexist: {{#if: UbuntuHelp:WifiDocs/MasterMode | UbuntuHelp:WifiDocs/MasterMode | {{#if: | :}}WifiDocs/MasterMode}}/ar | • {{#if: UbuntuHelp:WifiDocs/MasterMode|العربية| [[::WifiDocs/MasterMode/ar|العربية]]}}|}} {{#ifexist: {{#if: UbuntuHelp:WifiDocs/MasterMode | UbuntuHelp:WifiDocs/MasterMode | {{#if: | :}}WifiDocs/MasterMode}}/az | • {{#if: UbuntuHelp:WifiDocs/MasterMode|azərbaycanca| [[::WifiDocs/MasterMode/az|azərbaycanca]]}}|}} {{#ifexist: {{#if: UbuntuHelp:WifiDocs/MasterMode | UbuntuHelp:WifiDocs/MasterMode | {{#if: | :}}WifiDocs/MasterMode}}/bcc | • {{#if: UbuntuHelp:WifiDocs/MasterMode|جهلسری بلوچی| [[::WifiDocs/MasterMode/bcc|جهلسری بلوچی]]}}|}} {{#ifexist: {{#if: UbuntuHelp:WifiDocs/MasterMode | UbuntuHelp:WifiDocs/MasterMode | {{#if: | :}}WifiDocs/MasterMode}}/bg | • {{#if: UbuntuHelp:WifiDocs/MasterMode|български| [[::WifiDocs/MasterMode/bg|български]]}}|}} {{#ifexist: {{#if: UbuntuHelp:WifiDocs/MasterMode | UbuntuHelp:WifiDocs/MasterMode | {{#if: | :}}WifiDocs/MasterMode}}/br | • {{#if: UbuntuHelp:WifiDocs/MasterMode|brezhoneg| [[::WifiDocs/MasterMode/br|brezhoneg]]}}|}} {{#ifexist: {{#if: UbuntuHelp:WifiDocs/MasterMode | UbuntuHelp:WifiDocs/MasterMode | {{#if: | :}}WifiDocs/MasterMode}}/ca | • {{#if: UbuntuHelp:WifiDocs/MasterMode|català| [[::WifiDocs/MasterMode/ca|català]]}}|}} {{#ifexist: {{#if: UbuntuHelp:WifiDocs/MasterMode | UbuntuHelp:WifiDocs/MasterMode | {{#if: | :}}WifiDocs/MasterMode}}/cs | • {{#if: UbuntuHelp:WifiDocs/MasterMode|čeština| [[::WifiDocs/MasterMode/cs|čeština]]}}|}} {{#ifexist: {{#if: UbuntuHelp:WifiDocs/MasterMode | UbuntuHelp:WifiDocs/MasterMode | {{#if: | :}}WifiDocs/MasterMode}}/de | • {{#if: UbuntuHelp:WifiDocs/MasterMode|Deutsch| [[::WifiDocs/MasterMode/de|Deutsch]]}}|}} {{#ifexist: {{#if: UbuntuHelp:WifiDocs/MasterMode | UbuntuHelp:WifiDocs/MasterMode | {{#if: | :}}WifiDocs/MasterMode}}/el | • {{#if: UbuntuHelp:WifiDocs/MasterMode|Ελληνικά| [[::WifiDocs/MasterMode/el|Ελληνικά]]}}|}} {{#ifexist: {{#if: UbuntuHelp:WifiDocs/MasterMode | UbuntuHelp:WifiDocs/MasterMode | {{#if: | :}}WifiDocs/MasterMode}}/es | • {{#if: UbuntuHelp:WifiDocs/MasterMode|español| [[::WifiDocs/MasterMode/es|español]]}}|}} {{#ifexist: {{#if: UbuntuHelp:WifiDocs/MasterMode | UbuntuHelp:WifiDocs/MasterMode | {{#if: | :}}WifiDocs/MasterMode}}/fa | • {{#if: UbuntuHelp:WifiDocs/MasterMode|فارسی| [[::WifiDocs/MasterMode/fa|فارسی]]}}|}} {{#ifexist: {{#if: UbuntuHelp:WifiDocs/MasterMode | UbuntuHelp:WifiDocs/MasterMode | {{#if: | :}}WifiDocs/MasterMode}}/fi | • {{#if: UbuntuHelp:WifiDocs/MasterMode|suomi| [[::WifiDocs/MasterMode/fi|suomi]]}}|}} {{#ifexist: {{#if: UbuntuHelp:WifiDocs/MasterMode | UbuntuHelp:WifiDocs/MasterMode | {{#if: | :}}WifiDocs/MasterMode}}/fr | • {{#if: UbuntuHelp:WifiDocs/MasterMode|français| [[::WifiDocs/MasterMode/fr|français]]}}|}} {{#ifexist: {{#if: UbuntuHelp:WifiDocs/MasterMode | UbuntuHelp:WifiDocs/MasterMode | {{#if: | :}}WifiDocs/MasterMode}}/gu | • {{#if: UbuntuHelp:WifiDocs/MasterMode|ગુજરાતી| [[::WifiDocs/MasterMode/gu|ગુજરાતી]]}}|}} {{#ifexist: {{#if: UbuntuHelp:WifiDocs/MasterMode | UbuntuHelp:WifiDocs/MasterMode | {{#if: | :}}WifiDocs/MasterMode}}/he | • {{#if: UbuntuHelp:WifiDocs/MasterMode|עברית| [[::WifiDocs/MasterMode/he|עברית]]}}|}} {{#ifexist: {{#if: UbuntuHelp:WifiDocs/MasterMode | UbuntuHelp:WifiDocs/MasterMode | {{#if: | :}}WifiDocs/MasterMode}}/hu | • {{#if: UbuntuHelp:WifiDocs/MasterMode|magyar| [[::WifiDocs/MasterMode/hu|magyar]]}}|}} {{#ifexist: {{#if: UbuntuHelp:WifiDocs/MasterMode | UbuntuHelp:WifiDocs/MasterMode | {{#if: | :}}WifiDocs/MasterMode}}/id | • {{#if: UbuntuHelp:WifiDocs/MasterMode|Bahasa Indonesia| [[::WifiDocs/MasterMode/id|Bahasa Indonesia]]}}|}} {{#ifexist: {{#if: UbuntuHelp:WifiDocs/MasterMode | UbuntuHelp:WifiDocs/MasterMode | {{#if: | :}}WifiDocs/MasterMode}}/it | • {{#if: UbuntuHelp:WifiDocs/MasterMode|italiano| [[::WifiDocs/MasterMode/it|italiano]]}}|}} {{#ifexist: {{#if: UbuntuHelp:WifiDocs/MasterMode | UbuntuHelp:WifiDocs/MasterMode | {{#if: | :}}WifiDocs/MasterMode}}/ja | • {{#if: UbuntuHelp:WifiDocs/MasterMode|日本語| [[::WifiDocs/MasterMode/ja|日本語]]}}|}} {{#ifexist: {{#if: UbuntuHelp:WifiDocs/MasterMode | UbuntuHelp:WifiDocs/MasterMode | {{#if: | :}}WifiDocs/MasterMode}}/ko | • {{#if: UbuntuHelp:WifiDocs/MasterMode|한국어| [[::WifiDocs/MasterMode/ko|한국어]]}}|}} {{#ifexist: {{#if: UbuntuHelp:WifiDocs/MasterMode | UbuntuHelp:WifiDocs/MasterMode | {{#if: | :}}WifiDocs/MasterMode}}/ksh | • {{#if: UbuntuHelp:WifiDocs/MasterMode|Ripoarisch| [[::WifiDocs/MasterMode/ksh|Ripoarisch]]}}|}} {{#ifexist: {{#if: UbuntuHelp:WifiDocs/MasterMode | UbuntuHelp:WifiDocs/MasterMode | {{#if: | :}}WifiDocs/MasterMode}}/mr | • {{#if: UbuntuHelp:WifiDocs/MasterMode|मराठी| [[::WifiDocs/MasterMode/mr|मराठी]]}}|}} {{#ifexist: {{#if: UbuntuHelp:WifiDocs/MasterMode | UbuntuHelp:WifiDocs/MasterMode | {{#if: | :}}WifiDocs/MasterMode}}/ms | • {{#if: UbuntuHelp:WifiDocs/MasterMode|Bahasa Melayu| [[::WifiDocs/MasterMode/ms|Bahasa Melayu]]}}|}} {{#ifexist: {{#if: UbuntuHelp:WifiDocs/MasterMode | UbuntuHelp:WifiDocs/MasterMode | {{#if: | :}}WifiDocs/MasterMode}}/nl | • {{#if: UbuntuHelp:WifiDocs/MasterMode|Nederlands| [[::WifiDocs/MasterMode/nl|Nederlands]]}}|}} {{#ifexist: {{#if: UbuntuHelp:WifiDocs/MasterMode | UbuntuHelp:WifiDocs/MasterMode | {{#if: | :}}WifiDocs/MasterMode}}/no | • {{#if: UbuntuHelp:WifiDocs/MasterMode|norsk| [[::WifiDocs/MasterMode/no|norsk]]}}|}} {{#ifexist: {{#if: UbuntuHelp:WifiDocs/MasterMode | UbuntuHelp:WifiDocs/MasterMode | {{#if: | :}}WifiDocs/MasterMode}}/oc | • {{#if: UbuntuHelp:WifiDocs/MasterMode|occitan| [[::WifiDocs/MasterMode/oc|occitan]]}}|}} {{#ifexist: {{#if: UbuntuHelp:WifiDocs/MasterMode | UbuntuHelp:WifiDocs/MasterMode | {{#if: | :}}WifiDocs/MasterMode}}/pl | • {{#if: UbuntuHelp:WifiDocs/MasterMode|polski| [[::WifiDocs/MasterMode/pl|polski]]}}|}} {{#ifexist: {{#if: UbuntuHelp:WifiDocs/MasterMode | UbuntuHelp:WifiDocs/MasterMode | {{#if: | :}}WifiDocs/MasterMode}}/pt | • {{#if: UbuntuHelp:WifiDocs/MasterMode|português| [[::WifiDocs/MasterMode/pt|português]]}}|}} {{#ifexist: {{#if: UbuntuHelp:WifiDocs/MasterMode | UbuntuHelp:WifiDocs/MasterMode | {{#if: | :}}WifiDocs/MasterMode}}/ro | • {{#if: UbuntuHelp:WifiDocs/MasterMode|română| [[::WifiDocs/MasterMode/ro|română]]}}|}} {{#ifexist: {{#if: UbuntuHelp:WifiDocs/MasterMode | UbuntuHelp:WifiDocs/MasterMode | {{#if: | :}}WifiDocs/MasterMode}}/ru | • {{#if: UbuntuHelp:WifiDocs/MasterMode|русский| [[::WifiDocs/MasterMode/ru|русский]]}}|}} {{#ifexist: {{#if: UbuntuHelp:WifiDocs/MasterMode | UbuntuHelp:WifiDocs/MasterMode | {{#if: | :}}WifiDocs/MasterMode}}/si | • {{#if: UbuntuHelp:WifiDocs/MasterMode|සිංහල| [[::WifiDocs/MasterMode/si|සිංහල]]}}|}} {{#ifexist: {{#if: UbuntuHelp:WifiDocs/MasterMode | UbuntuHelp:WifiDocs/MasterMode | {{#if: | :}}WifiDocs/MasterMode}}/sq | • {{#if: UbuntuHelp:WifiDocs/MasterMode|shqip| [[::WifiDocs/MasterMode/sq|shqip]]}}|}} {{#ifexist: {{#if: UbuntuHelp:WifiDocs/MasterMode | UbuntuHelp:WifiDocs/MasterMode | {{#if: | :}}WifiDocs/MasterMode}}/sr | • {{#if: UbuntuHelp:WifiDocs/MasterMode|српски / srpski| [[::WifiDocs/MasterMode/sr|српски / srpski]]}}|}} {{#ifexist: {{#if: UbuntuHelp:WifiDocs/MasterMode | UbuntuHelp:WifiDocs/MasterMode | {{#if: | :}}WifiDocs/MasterMode}}/sv | • {{#if: UbuntuHelp:WifiDocs/MasterMode|svenska| [[::WifiDocs/MasterMode/sv|svenska]]}}|}} {{#ifexist: {{#if: UbuntuHelp:WifiDocs/MasterMode | UbuntuHelp:WifiDocs/MasterMode | {{#if: | :}}WifiDocs/MasterMode}}/th | • {{#if: UbuntuHelp:WifiDocs/MasterMode|ไทย| [[::WifiDocs/MasterMode/th|ไทย]]}}|}} {{#ifexist: {{#if: UbuntuHelp:WifiDocs/MasterMode | UbuntuHelp:WifiDocs/MasterMode | {{#if: | :}}WifiDocs/MasterMode}}/tr | • {{#if: UbuntuHelp:WifiDocs/MasterMode|Türkçe| [[::WifiDocs/MasterMode/tr|Türkçe]]}}|}} {{#ifexist: {{#if: UbuntuHelp:WifiDocs/MasterMode | UbuntuHelp:WifiDocs/MasterMode | {{#if: | :}}WifiDocs/MasterMode}}/vi | • {{#if: UbuntuHelp:WifiDocs/MasterMode|Tiếng Việt| [[::WifiDocs/MasterMode/vi|Tiếng Việt]]}}|}} {{#ifexist: {{#if: UbuntuHelp:WifiDocs/MasterMode | UbuntuHelp:WifiDocs/MasterMode | {{#if: | :}}WifiDocs/MasterMode}}/yue | • {{#if: UbuntuHelp:WifiDocs/MasterMode|粵語| [[::WifiDocs/MasterMode/yue|粵語]]}}|}} {{#ifexist: {{#if: UbuntuHelp:WifiDocs/MasterMode | UbuntuHelp:WifiDocs/MasterMode | {{#if: | :}}WifiDocs/MasterMode}}/zh | • {{#if: UbuntuHelp:WifiDocs/MasterMode|中文| [[::WifiDocs/MasterMode/zh|中文]]}}|}} {{#ifexist: {{#if: UbuntuHelp:WifiDocs/MasterMode | UbuntuHelp:WifiDocs/MasterMode | {{#if: | :}}WifiDocs/MasterMode}}/zh-hans | • {{#if: UbuntuHelp:WifiDocs/MasterMode|中文(简体)| [[::WifiDocs/MasterMode/zh-hans|中文(简体)]]}}|}} {{#ifexist: {{#if: UbuntuHelp:WifiDocs/MasterMode | UbuntuHelp:WifiDocs/MasterMode | {{#if: | :}}WifiDocs/MasterMode}}/zh-hant | • {{#if: UbuntuHelp:WifiDocs/MasterMode|中文(繁體)| [[::WifiDocs/MasterMode/zh-hant|中文(繁體)]]}}|}} |
{{#ifeq:UbuntuHelp:WifiDocs/MasterMode|:WifiDocs/MasterMode|请不要直接编辑翻译本页,本页将定期与来源同步。}} |
{{#ifexist: :WifiDocs/MasterMode/zh | | {{#ifexist: WifiDocs/MasterMode/zh | | {{#ifeq: {{#titleparts:WifiDocs/MasterMode|1|-1|}} | zh | | }} }} }} {{#ifeq: {{#titleparts:WifiDocs/MasterMode|1|-1|}} | zh | | }}
Setting up a Wifi Adapter to support "master mode"
What we need for a wireless "base-station" or "access-point" is a wireless network card that does "master mode", which allows our Linux box to behave just like products from the likes of Linksys, Netgear & Belkin - later sections of this HOWTO should be pretty much the same whether you can find a 802.11a, 802.11b or g card that does master mode in Linux.
Purchasing WiFi adaptor
Select a card that supports "master mode". Be careful when buying a card for this project - WLAN cards documented as Linux-supported often become no longer available and it's not uncommon for manufacturers of wireless cards to sell completely different cards with a completely new chipset under the model number of a card that is already currently sold. I guess this saves them the trouble & expense of having new packaging & advertising printed, but it causes copious confusion for the Linux-loving enthusiast. Also look out for D-Link's evil naming conventions - the 3 different revisions of the DWL-520 are all different from the DWL-520+, which is different from the DWL-G520, which is different from the DWL-A520 and so on... when you throw into the mix the 8 different cards with "DWL" and "650" in their names it can give you a headache just trying to work out which one your supplier is listing, never mind installing the drivers. A good place to start looking for a compatible device is: http://linuxwireless.org/ A good chipset for pci adaptors is: Atheros chipsets http://madwifi.org/
Determine wifi adapter chipset
Doing a Google search on the manufactures part number usually gets results e.g. "Cnet CWP-854 chipset" should give you the result of ralink rt2561 or rt61. The other option is to plug the wifi adapter into a linux box and type the commands:
sudo lspci
for PCI adapters
sudo lsusb
for USB adapters
sudo iwconfig
Using these commands you should have enough clues to your wifi adapters chipset.
Test an adapter for "master mode"
To check if an adapter and driver can do master mode you can use a program called 'iwconfig'
sudo iwconfig
In the terminal window should list all available wireless interfaces. Assuming your adapter is connected and its drivers are loaded, try the following.
sudo iwconfig wlan1 mode master
Replace wlan1 with whatever Ubuntu is calling your adapter. If you don’t get an error you’re in business.
Adapter setup
Prism (HostAP)
Note that cards using these drivers are 11MBPS only. Jason Boxman provides quite an excellent description of these drivers: HostAP enables 802.11b access point functionality utilizing the secondary (STA) firmware of Intersil's Prism2, Prism2.5, or Prism3 chipsets for time sensitive tasks. All other functionality is handled via the driver, including WEP and passing frames off to a port authenticator, like FreeRADIUS. Presently, HostAP works with Intersil's Prism chipset and cards utilizing PCI and PC Card interfaces to the host system. (PLX bridging is also supported)
Atheros (Madwifi)
Atheros card setup for routing resource =
You have to install the Source to get the driver into Master mode for a WAP
- For "ubuntu server edition" do the following
- For other editions just enable restricted drivers
wget http://downloads.sourceforge.net/madwifi/madwifi-0.9.4.tar.gz tar -xvzf madwifi-0.9.4.tar.gz cd madwifi-0.9.4 sudo apt-get install build-essential linux-headers-server sudo make sudo make install
- Edit your kernel modules loaded at boot time:
sudo nano /etc/modprobe.d/madwifi
add this to make sure the wireless card goes into Master mode:
options ath_pci autocreate=ap
load the module without a reboot
sudo modprobe ath_pci
NDISwrapper
NDISwrapper cards are NOT SUITABLE for base-station use - they don't do master mode. NDISwrapper is basically a layer of interfacing glue to use Windows drivers with Linux, and so it denies access to some of the more interesting &/or esoteric functions of the wireless card (because NDIS has no programming interface for them, I guess). If you have a wireless card that you're currently using with NDISwrapper then it's possible that there are native drivers for it - I've seen quite a few posters to the Ubuntu forums suggesting using NDISwrapper with Ralink cards, for instance - but it's more likely that you'll have to bin it (or put it in your sister's Windows PC) and get a card with native drivers that interface properly with the kernel. NOTE: You can accomplish a similar goal with an Ad-Hoc network; this might help.
Prism54
I wanted a card that supported the Prism54 drivers, as they seemed to be about the most mature ones for "54G" wireless cards under Linux at the time I was looking - my Powerbook has Airport Extreme, Apple's name for 802.11g, so I might as well make use of it. I took a good look through the supported cards and decided upon the Allnet ALL0271. It seemed to be fairly well-recommended on the Prism54.org forums - there are too many short comments saying "worked for me" for me to post all the individual links, so do a search & read all the threads for yourself. You can order the ALL0271 from the US, from Germany or if you're in the UK, I actually bought a handful, so email me if you'd like to buy one. I also recently got one of these cards working on a friend's SuSE 9.1 box, although the process isn't as brain-dead as it is under Gentoo - portage & the ebuilds automate the process so well.
Ralink rt2400 / rt2500
As I see on the rt2x00 project page, the new branch rt2x00 beta drivers support master mode and all advanced features, but legacy rt2400, rt2500, rt2570, rt61 drivers do not, but I have no way to test such setup. For more details on this driver see the project homepage.
Broadcom 43xx cards (bcm43xx.ko)
Broadcom cards support master mode using the reverse-engineered kernel driver. You need to enable (or make as a module) the Softmac wireless extensions and BCM43xx wireless driver.
Realtek RTL8180 cards (rtl8180-sa2400 project)
Master mode is working correctly together with promiscuous mode. Supports WEP open encryption and possibly TKIP/CCMP(not tested). Supports only 1/2/5.5/11M modes.
Texas Instruments ACX100/ACX111
In cards based on this chip (ex. D-Link DWL-520+) master mode is not fully implemented (as of 2007-01-01 driver) and there are some different problems like sometimes no beacons are broadcasted and card can't be properly initiated. Supports 1/2/5.5/11M(b) and 22M(b+) modes.
Intel PRO/Wireless (ipwXXXX) series
For ipw2100/ipw2200, unfortunately there is no way to use them as AP, but this can be done for ipw3945 and ipw4965, maybe ipw2915 too, which are pretty good cards anyway, using fully open-source iwlwifi drivers, but it can't be done with old Intel drivers with closed microcode.
ZyDAS ZD1211
ZyDAS ZD1211 802.11b/g USB WLAN chipset Linux drivers Initially contributed by ZyDAS under the GPL license, the ZD1211 Linux driver is maintained by the open source community.. zd1211 chipset supports master mode, but the drivers built into Ubuntu for the zd1211 chipset do not. Luckily another set of drivers exist and they work with master mode. http://zd1211.wiki.sourceforge.net/VendorBasedDriver If you’re compiling and installing the zd1211 VendorBasedDriver for your wifi module (depending your chipset version) you may need to edit the Makefile to enable zd1211b mode. Also you’ll likely need to blacklist the driver built-in to the kernel to let the new VendorBasedDriver load instead.
sudo echo zd1211rw >> /etc/modprobe.d/blacklist