Wireless HOWTO <author>作者: Roberto Arcomano <tt/berto@fatamorgana.com/ <newline>譯者: 陳敏劍 <tt/expns@yahoo.com/ <date> <abstract> 無線網路 Wireless 是一項新的技術,它擁有比較高的連接速率(最高11 Mbps), 這份文檔描述如何在Linux作業系統上設定無線網路, 解決兼容問題,以及更多的資訊. </abstract> <!-- Table of contents --> <toc> <sect>介紹 <p>按作者原意保留英文說明. <p>This document explains something about Wireless networking, how to setup it, problems with it. Unliked wired network, Wireless requires some additional trick to work well. You should know something about antennas, pointing it, roaming info and so on. Feedback are welcome. You can found more interesting help at <htmlurl url="http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux" name="Jean Tourrilhes Wireless Howto"> <p>For any suggestion and feedback write to <htmlurl url="mailto:berto@fatamorgana.com" name="my email address" > <sect1>版權 <p>Copyright (C) 2000,2001 Roberto Arcomano. <p>This document is free; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. <p>This document is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You can get a copy of the GNU GPL <htmlurl url="http://www.gnu.org/copyleft/gpl.html" name="here"> <sect1>Translations <p>If you want to translate this document you are free, you only have to: <itemize> <item>Check that another version of it doesn't already exist at your local LDP <item>Maintain all 'Introduction' section (including 'Introduction', 'Copyright', 'Translations', 'Credits'). </itemize> <p>Warning! You don't have to translate TXT or HTML file, you have to modify LYX file, so that it is possible to convert it all other formats (TXT, HTML, RIFF, etc.): to do that you can use "LyX" application you download from <htmlurl url="http://www.lyx.org" name="http://www.lyx.org"> <p>No need to ask me to translate! You just have to let me know (if you want) about your translation. <p>Thank you for your translation! <sect1>Credits <p>Thanks to <htmlurl url="http://www.fatamorgana.com/" name="Fatamorgana Computers"> for hardware equipment and experimental opportunity. <p>Thanks to <htmlurl url="http://www.linuxdoc.org/" name="Linux Documentation Project"> for publishing and uploading my document in a very quickly fashion. <sect>背景知識 <sect1>Wireless 是什麼? <p>Wireless 是一種讓你能遠距離連接電腦的新技術. 它使用Wireless發射/接收(2.4 GHz)卡,其軟體界面類似於以太網卡. 每一塊Wireless卡擁有全球唯一的硬體地址. 典型的傳輸功率為 10-20 mW 直到 100mW(參照標準 IEEE 802.11 和 FCC/CEPT 許可). <sect1>radio cards 的最遠傳輸距離是多少? <p>無線通訊最重要的一點就是 line of sight clear視野: 你必需能看見另一端的天線, 兩端之間允許存在少許樹木. 距離是依據天線(功率放大器)和用法:2到300米使用全方位天線. 1千米使用定向天線, 2到3千米使用全方位信號放大天線(200mW), 更遠一點的使用parabolic弧形天線. 50到60千米使用弧形或定向信號放大天線(some Watts). <p>要知道使用功率放大器不是合法的,因此你可能會違反FCC/CEPT的規定(視所在國家的情況而定). <sect1>有線網路和無線網路之間的區別是什麼? <p>設定有線網路比較簡單(at least at low level), 設定無線網路非常難,管理,調試...最典型的是硬體的安裝, 軟體的設定/調試等等對無線網路來說都是非常關鍵的: <itemize> <item>你必需選擇使用合適的無線網卡:有許多的產商不同型號的網卡及使用它們的不同條件. 如果你要建立一個小型的無線網路, 你最好選用兼容IEEE 802.11的無線網卡和一個基點(Access Point). <item>有些卡是 PCMCIA卡.所以你要先安裝支持PCMCIA的Linux核心. <item>你可以用兩個運行著的系統來進行測試,第一次的距離近一些, 然後就可以進行遠一點的測試. <item>在任何氣候下進行測試(典型的下雨天). <item>高高興興地完成測試. </itemize> <p>如果你設定一個轉發器(有許多無線網路和無線網卡的Linux機器), 在遠距離對它進行設定會有一些麻煩. <sect1>設定一個無線網路我需要知道些什麼? <p>設定一個無線網路的幾個條件: <p>軟體條件: <itemize> <item>一般的網路知識,包括IP地址, 網路遮罩,路由... 涵蓋了Linux NET3-4-HOWTO的所有內容. <item>地址解析代理,網橋 proc 文件系統.包括 Proxy-ARP-Subnet, Bridge Mini-Howto and in Linux Kernel Source (2.2.x or 2.4.x) under Documentation/networking/ ip-sysctl.txt) * <item>無線網路知識, 包括訪問模式(ADHOC, INFRASTRUCTURE and ACCESS POINT), 頻道的概念, 戶外和戶內的定義等等,你可以瞭解有關於無線網路的文檔: IEEE standard 802.11, CEPT, 等等. </itemize> <p>另外的: <itemize> <item>一點設定天線的經驗,裝備,定向. <item>Pc 硬體設定的經驗及排除無線網卡同其它硬體的衝突. </itemize> <p>最後, 擁有一個極佳的運氣. <p>*所有這提到的文檔都可以在<htmlurl url="www.linuxdoc.org" name="www.linuxdoc.org"> 找到. <sect1>我為什麼要設定一個無線網路, 用它來做什麼? <p>為什麼? 因為你對有線網路不滿意. <p>有了無線網卡,你可以穿過公園,停車場,房屋(要看得見另一端才行) <p>無線網卡使用的高層協議同以太網卡一樣:在無線網路上使用TCP/IP, 但要注意同Window 的共享軟體,因為你使用Linux forward轉寄, ip forwarder 不會讓廣播信息通過(參考NetBIOS協議). 在這種情況下就要使用WINS服務來支持網路流覽.(參照 Samba 文檔). <p>無線能使你建立一個小型的 LAN/WAN 中心(可以提供Internet接入),可以讓任何人從空中對它進行訪問! <p>想像一下,一個完全由無線網路組成的國家! <p>想像一下,一個可以將不同國家的人們聚在一起,分享音樂,文件,軟體,視屏的網路. <p>所有的都可以做到(在一些國家己經做到了).使用無線網卡和無線基點(Access Point),充當轉發器的無線Linux機器 (at IP level such as router or, if you want, at data-link level, with bridge driver, see more at <htmlurl url="http://openrock.net/bridge" name="Bridge Http"> Link or <htmlurl url="ftp://openrock.net/bridge" name="Bridge Ftp Link"> ) <sect1>在HOWTO裡都提到了哪些無線網卡? <p>在HOWTO裡我從一般的設定出發(介紹無線網路),我直接使用我瞭解的無線網卡做例子.我還有一些訣竅可以讓它們提高性能. <p>Wireless網卡列印: <itemize> <item>Proxim Symphony - <htmlurl url="http://www.proxim.com" name="http://www.proxim.com"> <item>Webgear AviatorPRO 2.4 (pcmcia support needed) - <htmlurl url="http://www.webgear.com" name="http://www.webgear.com"> <item>Lucent Wavelan I, II, Orinoco - <htmlurl url="http://www.lucent.com" name="www.lucent.com"> and <htmlurl url="http://www.orinocowireless.com" name="www.orinocowirelless.com"> <item>Cabletron - <htmlurl url="http://www.cabletron.com" name="http://www.cabletron.com"> <item>YDI am930_isa - <htmlurl url="http://www.ydi.com" name="http://www.ydi.com"> <item> Siemens Radio Modem (Dect) - <htmlurl url="http://www.siemens.com" name="http://www.siemens.com"> <item>RadioLan (5 GHZ) - <htmlurl url="http://www.radiolan.com" name="http://www.radiolan.com"> </itemize> <p>一個完整的清單: <htmlurl url="http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux" name="Jean Tourrilhes Wireless Howto"> <p>Siemens Radio Modem is not a really 802.11 Wireless card, they are modems that you can attach to serial and they act as modem (at 1800 MHz, so DECT technology). Appendix B describe their use. <p>RadioLan cards work at 5.4GHz in a Windows 9x environment and with a RadioLan Access Point that bridges between Wired and Wireless networks (在我的印象當中沒有Linux的驅動). <sect1>它們值多少錢? <p>上面提到的不太貴:從幾百美元至上千美元(Lucent的無線網卡,一個基點(Access Point)外加兩個無線網卡,可充當網橋使用). <sect>有關無線連結的資訊. <p>這裡我總結一個最基本的無線網路環境. <sect1>物理層 <p>第一層 ISO/OSI 有三種說明: <itemize> <item>FHSS, Frequency Hopping Spread Spectrum <item>DSSS, Direct Sequence Spread Spectrum <item>Infrared connections, not covered by this howto </itemize> <sect1>設定 <p>兩種設定: <itemize> <item>AdHoc模式(也稱獨立模式(Adhoc mode) ),每個獨立的網路擁有一個BSS(Basic Service Set 基本服務設定)每個基站有相同的BSS. <item>Infrastructure mode形組模式,幾個使用基點(Access Point)相互通訊的網路(每個網路都有一個 BSS ), 組成一個服務擴展ESS (Extended Service Set).當中也有漫遊功能,如借出一個子站加入最近的基點(Access Point). </itemize> <p>AdHoc是最簡單的方法(and the also the less scalable缺少升級的餘地),能使許多主機直接進行通訊. 限制性的條件是: 每個主機必需以可見的形式直接加入到網路當中(at least Ideally, because this problem could be solved at IP level! For more see Par 5.4). <tscreen><verb> Adhoc mode A - - - - - C \ / | \ / | /\ | / \ | / \ B - - - - - D </verb></tscreen> <p>在形組模式下,你使用基點(Access Point)與其它主機分享網路. <tscreen><verb> Infrastructure mode ESS A - - - | - Access Point - - Access Point - | - - - D B - - - | BSS1 BSS2 | - - - E C - - - | | - - - F </verb></tscreen> <p>對於B和C來說 D,E,F是不可見. 因為它們使用相同的ESS所以能很好地進行通訊. A , B , C 三個之間也是不可見的. <p>在一個像似戶外和戶內將短距離範圍和長距離範圍區分開的情形. <sect1>兼容性 <p>請注意,全世界有很多的無線網卡,並非每個無線網卡之間都能進行良好的通訊. 為了更好地兼容,最好按下例方法使用: <itemize> <item>相同的設定模式:只使用Adhoc或ESS <item>相同的物理層:只使用DSSS 或 all FHSS <item>相同的協議:(for example Proxim has its particular proprietary protocol OpenAir that cannot talk with other FHSS cards). </itemize> <sect1>我該使用Adhoc 還是 Infrastructure? <p>使用基點(Access Point)是消滅問題的最好方法,但是價格昂貴.理想當中,更集中的網路你需要使用Infrastructure形組模式. 只有少量主機時選用Adhoc. why to spend much money for few hosts? 要知道多花點錢可以省去不少的麻煩. Anyway be aware that if you spend much money probably all works well while spending less you could have some trouble. <sect1>Linux主機能不能當成基點(Access Point)來使用? <p>問得好! 最近有一種硬體可以做到: Prism2 你可以在這裡瞭解更詳盡的情況:<htmlurl url="http://people.ssh.com/jkm/Prism2/" name="people.ssh.com/jkm/Prism2"> <sect>工具箱 <sect1>硬體條件 <p>你需要一台Linux主機(486 或更好 a Pentium 100+ with 16MB+ ram), 無線網卡,一個天線(看第二部份), 因為要模擬通訊,所以在另一端也需要這些.(with Win9x or WinNT, if you prefer...), <sect1>軟體條件 <p>你需要: <itemize> <item>最近的,穩定的核心(2.2.x) <item>如果你買pcmcia卡 最新最穩定的 pcmcia 代碼 (pcmcia-cs) <item>無線網路驅動程式:如果沒有, 你可以在產商的Web站台下載,如果你沒有找到, 可以搜索 <htmlurl url="http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux" name=" Jean Tourrilhes Wireless Howto">. <p>如果還是沒有,看來你需要等了,或將Windows 驅動轉換成 Linux 驅動. (祝你好運) <p>在有了這些之後,你還要重新編譯核心, 重新編譯pcmcia代碼(如果你是用 pcmcia無線網卡的話), 最後重新編譯無線網路驅動程式,這是一般的過程, 有些特別的無線網卡只要執行第3步或者第 1 步和第 3 步. </itemize> <sect>無線網路設定 <sect1>基本步驟 <p>當你具備了所有的條件之後,你需要按照以下步驟進行設定: <itemize> <item>核心的底層設定,如I/O端口,中斷, DMA ...)完成後,你應當在開機的時候看到這些, 表示無線網卡被Linux正確識別. <item>為無線網卡設定連接層,比如用"rl2cfg"設定Proxim Symphony 無線網卡, 你應當為每個無線網卡設定以讓它們能進行正常通訊. <item>使用 ifconfig 和 route 更改IP設定. <item>找到最佳運行的決竅,解決資源衝突. 這樣你的無線網路以經基本運行起來: proxy-arp, icmp echo redirect, bridging, channel change 這些方面還要做一些細節的設定, 優化網路,防止異常. </itemize> <p>N.B.: step 1, 2 and 3 correspond to level 1, 2 和 3 基於 ISO/OSI, while step 4 is an addendum to solve situation generated by netmask 255.255.255.255. 事實上32bit網路遮罩違反了 ISO/OSI 標準,因為網路強制使用相同的地址對不存在的機器和地址進行廣播. <p>有些人可能反對這種觀點,但是如果你用 ISO/OSI 標準設定無線網路,會失去很多個子網路的設定. 每個子網通常丟棄2個IP號(Network and broadcast),並失去IP分配的靈活性(geographically kind). 你可以在附錄中找到有關的描述. You could notice that step 2 is not present in Wired cards 因為那裡沒有什麼詳細的設定要做. <sect1>底層核心設定 <p>管理機器總會有個問題 : 讓核心(or in general)識別你的硬體. <p>無線網卡更複雜, 因為它們通常是Pcmcia plug, 所以首先得讓你的核心識別你的Pcmcia adapter card , 因此,你可以試著為無線網卡安裝特別的硬體驅動程式. <p> 所以在Pcmcia 設定中你必需: <itemize> <item>安裝核心源代碼 從<htmlurl url="http://www.kernel.org " name="http://www.kernel.org "> 到/usr/src/linux (see tar and gzip utilities) <item>安裝Pcmcia源代碼 <htmlurl url="ftp://projects.sourceforge.net/pub/pcmcia-cs" name="ftp://projects.sourceforge.net/pub/pcmcia-cs"> 到/usr/src/pcmcia (see tar and gzip utilities) <item>設定並重新編譯核心:read file README in your linux directory (/usr/src/linux) <item>設定並重新編譯 Pcmcia 源代碼: 在 /usr/src/pcmcia 裡使用 configure 和 make. 確定你的驅動程式在那裡 另外你還要按指示安裝它(usually a tar zxvf driver.tgz under pcmcia dir is sufficient). 然後 "make all" 進行編譯最後 "make install". <item>完成之後你可以在/etc/pcmcia裡找到有用的設定程式(文檔). </itemize> <p>在非Pcmcia 模式中: <itemize> <item>如果無線網卡的驅動程式是以Linux源代碼的形式出現(99%不是), 你必需將它安裝到一個目錄當中,編譯它. 還要知道掛哪個模組: 使用pcmcia設定你只要運行pcmcia侍服程式(/etc/rc.d/init.d/pcmcia start for RedHat), 其它的使用"modprobe module_name options".在選項中給出無線硬體的I/O端口,IRQ和 data-link 設定 (see Par 5.3) <item>如果出現資源衝突,可以使用以下工具: <itemize> <item>"tail /var/log/messages" 列印日誌. <item>使用"dmesg"得到更多的資訊. <item>/proc dir: ioports, devices, irq files and driver specific sub-directories </itemize> </itemize> <sect1>數據連接層的設定 <p>那是什麼? <p>無線網路只需要相互連接,而你只要設定網路參數. <p>對於無線網路你先要進行連接的設定: <itemize> <item>它屬於哪一種無線網路(獨立或形組模式) <item>使用哪一個頻道 <item>它屬於哪一個子網路(BSSID),它的ESS ID是多少. <item>它的連接有無加密,加密的程度. </itemize> <p>正如上面那樣,許多設定需要調整. 因為無線網路的結構:可能在附近的某一個人,只要對準天線,使用和你一樣的協議和一樣的TCP/IP設定就可以看到你傳輸的數據包. <p>加之, 每個子網路之間可能相互產生衝突, <p>所以這裡: <itemize> <item>例如在掛模組的時候這樣: "modprobe ray_cs essid='LINUX'" 或者 <item>在運行的時候使用設定工具: "rl2cfg eth1 master". </itemize> <sect1>IP 設定 <p>這是你將要面對的第三個問題.出現當你的網路遂漸擴大的時候. <p>Remember Wireless IP Networking doesn't stress you if you don't stress it! 如果你不犯它,它就不會犯你. <sect2>一個簡單的構建: <p> <tscreen><verb> 所有的主機之間是相互可見的. A - - - - - C \ / | \ / | /\ | / \ | / \ B - - - - - D </verb></tscreen> <p>這個設定非常簡單,不需要特別的設定(IP層),只要給每個主機分配IP地址,設定網路遮罩相同就可以了. <sect2>一個較為複雜的網路: <p> <tscreen><verb> A不能直接訪問B A <- - - - NO\ | TALK\ C \ | B <- - - - </verb></tscreen> <p>A和B只有通過C才能相互訪問. <p>如果網路是形組模式,並且C是基點(Access Point),那麼就沒有問題. 在獨立模式(Adhoc mode) 裡你也可以設定一個host做為master (I know the term is not so formal!), 其它主機都加入以master為中心的無線網路當中. <p>所有的連接達到了IP層: A 和 B 的界面與 C 相同,它們都與C進行通訊, 這樣,如果你試著用A ping B, 你將收到許多來自C的ICMP重定向數據包, 因為C告訴A,它所要求的對象早已經連入網路. 解決方法: type a "echo 0 > /proc/sys/net/ipv4/conf/ethx/send_redirects" ( ethx 是 C 同 A 連接的界面) to null all that. <p>另一個問題:該給A和C怎麼分配遮罩? 如果你分配一個遮罩包含A和C,它們將不工作,因為A不使用閘道(C) 但又以未知的MAC地址來發送 ARP 請求. <p>你可能想過ARP代理,但是沒有用.因為代理ARP只在目標與請求的來源使用不同界面的時候對來源進行回應: this is not the case!! <p>所以你要設定一個不大相同的庶罩 (Win9x let it be 255.255.255.254, WinNT at least 255.255.255.248) 並保證A和C擁有不相同的網路地址. <tscreen><verb> Examples: IP(A) = x.y.z.2/31, IP(B) = x.y.z.3/31. This doesn't work cause A asks for B in its network (ARP request) and C doesn't answer cause, for it, A and B belong to the same interface (so, no proxy arp). IP(A) = x.y.z.1/31, IP(B)= x.y.z.2/31. This works cause A ask to C (send requests to B with C MAC address) for B. </verb></tscreen> <p>In general with a netmask 255.255.255.254 system works with 2 IP changing only for the final bit. <p>這都是 TCP/IP 的作用,也是唯一獲得最高靈活性的方法. <p>注意:如果你使用基點(Access Point)(網路使用形組模式)就不會有重定向的問題, 因為問題都在 data-link level 解決了 (幾乎所有的基點(Access Point)都扮演網橋的角色...). 但是基點(Access Point)很昂貴(在 1000 美元或更多) 既便是使用多個無線網卡加上一台 P133 32MB Ram 來代替基點(Access Point)還是很划得來的. <sect2>Internet 接入 <p> <tscreen><verb> A - - - - - C - - Internet \ / | \ / | /\ | / \ | / \ B - - - - - D </verb></tscreen> <p>它有多種情況: <itemize> <item>C 是唯一的Public IP 地址. 只要在無線網路設定private IP 地址(192.168.x.y for example), 在C上執行 forwarding 和 IP偽裝 . A, B 和 D 將 C 作為缺省的閘道. <item>You have a public netmask visible from Internet and C is your default GW to Internet for the network. You only need to enable forwarding on C, setting up default GW on A, B and D to point to C. 你擁有Internet的一部分網段. C 作為無線網路到Internet的默認閘道. 只要在C上執行 forwarding , A, B 和 D 對準 C. <item>You have a public netmask visible from Internet and C is not the default GW to Internet. You have 2 possible solutions: Modify your default GW to let it point to C for your network. Symmetrically you have to let C point to default GW to go to Internet. You could, instead, enable proxy arp feature to C (echo 1 > /proc/sys/net/ipv4/conf/ethx/proxy_arp where ethx is the interface towards the default GW) and set your default GW on C to point to the default GW. Proxy arp is a TCP/IP forcing but works well. </itemize> <sect2>有線網路與無線網路的混合 <p><tscreen><verb> Internet \ \ E \ / \ / Wireless A - - - - - C - - F \ / \ | \ / | \ Wired /\ G | / \ | / \ B - - - - - D </verb></tscreen> <p>現在 C 加入了2個網路: 左邊是有線網路 Wire 右邊是無線網路 Wiredless . <p>加上Internet接入,你總共要在C上裝三個網卡. <p>應該如何分配IP地址,你有兩個選擇: <tscreen><verb> 1.劃分成兩個子網路:如 192.168.1.0/24 和 192.168.2.0/24. 這種方法很快但如果你使用Internet IP地址就失去了靈活性. 因為你要丟掉很多的IP. 2. Enable Proxy Arp feature to C for all 2 interfaces. 無線網路 和 有線網路的 網路參數(net address and netmask) 相同, 但是使用 proxy-arp,我可以選擇哪一個IP分配給有線和哪一個分配給無線. </verb></tscreen> <sect2>現在我們來檢查一下第2個方案: <p>例子:現在你有一個 Internet public 子網路 x.y.z.0/24. <tscreen><verb> 它們的界面是: 1. ifconfig eth0 x.y.z.C netmask 255.255.255.255 (Wired) 2. ifconfig eth1 x.y.z.C netmask 255.255.255.255 (Wireless) 3. ifconfig eth2 x.y.z.C netmask 255.255.255.255 (to Internet) </verb></tscreen> <tscreen><verb> 在eth2上使用靜態路由 route add IPGW dev eth2 route add default gw IPGW </verb></tscreen> <p>這個路由使所有訪問Internet的請求發往閘道:像你注意到的那樣, 第一,告訴Linux路由器在哪裡,然後讓請求發往路由器. <tscreen><verb> 在eth0上使用靜態路由 Static routes on eth0: route add x.y.z.A dev eth0 route add x.y.z.B dev eth0 route add x.y.z.D dev eth0 </verb></tscreen> <tscreen><verb> 在eth0上使用靜態路由 Static routes on eth1: route add x.y.z.E dev eth1 route add x.y.z.F dev eth1 route add x.y.z.G dev eth1 </verb></tscreen> <p>主機E,F 和G 連入無線網路. <p>注意: 靈活性相當好,但是你要手工設定每一個主機. <sect>實例設定 <p>這裡我提供一些設定無線網路的實例(希望有用!),並且用一般的無線網卡進行一些更複雜的設定. <sect1> General setup info <p>無線網卡界面類似於以太網卡,所以你要在 /etc/conf.modules 裡進行模組的掛接: <itemize> <item>"alias ethx module", ethx 是你要分配給無線網卡的界面並設定模組的名稱. <item>"options module io=0xAAA irq=I ...", 0xAAA 是無線網卡的I/O地址, I 是 IRQ 等等,還有其它的一些參數. </itemize> <p>然後,你可以用ifconfig 和 route 在IP層進行設定. <sect1>Proxim Symphony (普羅西米交響曲) <sect2>網路類型: FHSS, 獨立模式(Adhoc mode), 使用OpenAir私有協議. <p>你可以下載設定文檔和驅動程式(Linux,Win9X), 它的首頁是: <htmlurl url=" http://www.proxim.com" name=" http://www.proxim.com"> <p>編譯驅動程式的源代碼: <tscreen><verb> 1. untar it in a empty directory 2. type make for help. 3. 編譯模組: make modules_install 安裝驅動程式 rlmod.o 和 設定工具 rl2cfg. 3. 要運行驅動程式你只要用ifconfig將界面激活(after modified /etc/conf.modules: see Par.6.1.). </verb></tscreen> <p>使用 rl2cfg 設定數據連接層(for help type man rl2cfg once done c step): <tscreen><verb> "rl2cfg dev ethx sta" 設定為station (Slave) "rl2cfg dev ethx msta" 設定為 master station (Master) "rl2cfg dev ethx alt" 設定為自動模式. </verb></tscreen> <p>所有的設定都在上面了. <sect1>Webgear Aviator 2.4 and AviatorPro (網路行者, 網路行者加強版) <sect2>網路類型: FHSS, 2.4使用獨立模式(Adhoc mode), AviatorPro 使用形組模式. <p>它們的設定比上面的複雜,它們使用Pcmcia接口,需要編譯Pcmcia源代碼. <p>首頁: <htmlurl url="http://www.webgear.com" name="http://www.webgear.com"> <p>設定: <tscreen><verb> 1.下載pcmcia 源代碼, 展開至 /usr/src/pcmcia (see Par 5.2) 2.從http://www.webgear.com 下載驅動程式在/usr/src/pcmcia 目錄 用 "tar zxvf driver.tgz" 解開 3.重新設定 pcmcia (see Par 5.2) 4.按指示將"source ./ray_cs.opts"加入至 /etc/pcmcia/config.opts 文檔中 . 5.注意在 /etc/pcmcia/ray_cs.opts 文檔中有一行像這樣: "module "ray_cs" opts "...". ngs at data-link level present in "opts"後面是 data-link level的設定. opts的參數: pc_debug=x , where x is the log level. net_type=x, x=0 表示使用獨立模式(Adhoc mode) , x=1 表示使用形組模式. essid=x, x is the ESSID </verb></tscreen> <p>最後用pc_debug > 0 檢查設定.你將看到 data-link 的資訊: "network started" 新 Wireless network 建立和 "network joined" 加入新的Wireless network. <sect1>Lucent Wavelan I, II, Orinoco products and Cabletron(朗訊網波,奧裡諾科 和 卡布勒森) <sect2>網路類型: DSSS, 使用獨立模式(Adhoc mode) 和形組模式. <p>朗訊的產品是最專業化的一種. <p>首頁: <htmlurl url="http://www.lucent.com" name="http://www.lucent.com"> <htmlurl url="http://www.orinoco.net" name="http://www.orinoco.net"> <p>設定有點像 WebGear: 步驟1,2,3相像. <p>在 /etc/pcmcia/config.opts當中: 添加 module "wavelan_cs" opts " ..." 表示使用 Lucent Wavelan I 模組 "wavelan2_cs" opts " ...", 表示使用 Lucent Wavelan II 或者 Orinoco. <tscreen><verb> opts的參數: port_type=x, 表示使用獨立模式Adhoc(3) 或者 形組模式Infrastructure(1) channel=x, x=頻道, 只適用於 AdHoc 獨立模式(Adhoc mode) . transmit_rate=x, 固定速率: 用來同Cabletron 協調兼容性. 注意: Ideally,有可能在Linux主機上有2個 Lucent Wavelanx 無線網卡, 一個使用 Adhoc獨立模式(Adhoc mode),另一個使用 Infrastructure 形組模式. 但其中可能只有一個能正常工作,因為運行 pcmcia service,兩個卡都使用相同的 opts 設定 (so in Adhoc or Infrastructure mode). 所以我們要創建一個模組(or maybe a user mode program)讓它在運行的時候可以改變 data_link 參數:比如 access mode 和Adhoc獨立模式(Adhoc mode) 中的 channel 設定! </verb></tscreen> <p>channel 參數通常用來避免兩個鄰近的 Wireless 發射/接收的衝突. <p>Lucent 的驅動程式也可以用在 Cabletron 上 <htmlurl url="http://www.cabletron.com" name="http://www.cabletron.com" <sect1>YDI <p>網路類型: DSSS, Adhoc獨立模式(Adhoc mode) 和 Infrastructure形組模式. <p>YDI 出售非常專業的無線網卡和天線,功率放大器等等. <p>首頁: <htmlurl url="http://www.ydi.com" name="http://www.ydi.com"> <p>設定: <tscreen><verb> 1. 將文檔解開至空的目錄中. 2. make 進行編譯. 3. make install 安裝 am930_isa 驅動程式和 wlanctl設定程式. 完成以後, 可以使用wlanctl 手動設定, 也可以採用 scripts/wlan 自動設定. </verb></tscreen> <p>手工設定: <tscreen><verb> "wlanctl scan ..." 查找存在的 BSSs . "wlanctl netlist" 列印"wlanctl scan ..." 的表單. "wlanctl bsscreate ... ssid" 使用ssid參數設定新的網路. "wlanctl bssjoin bssid" 使用bssid 號 加入網路. "wlanctl authen" and "wlanctl assoc" 認證服務. </verb></tscreen> <sect>關於無線網路的更多資訊 <sect1>Wireless Linux 發行版 <p>FlyingLinux 始於 1999年10月 在Teleinformatics KTH 的Telecommunication Systems 實驗室旦生. 目的是研究移動IPv4和標準DHCP無線接入. 實驗結果: FlyingLinux 環境可以為在2000年3月至5月的 2G1303 計劃當中為100個學生和老師提供無線接入服務. <p>FlyingLinux 是第一個專門針對移動服務的發行版. 它具備了Kerberos和OpenSSH,使通訊更加安全. <p>FlyingLinux 是開放源代碼運動的一部份. KTH的程式開發是在 GPL licence 下進行的. Wireless Linux 的首頁: <htmlurl url="http://www.flyinglinux.net/" name="http://www.flyinglinux.net/"> <p>維護者:Mantainer: Alberto Escudero Email:aep@it.kth.se, 首頁 <htmlurl url="http://www.it.kth.se/~aep" name="http://www.it.kth.se/~aep"> <sect>線上資訊 <sect1>Open software link <p><itemize> <item> <htmlurl url="http://www.linux-wlan.org/" name="Linux-wlan project"> <item> <htmlurl url="http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux" name="Jean Tourrilhes Wireless Howto"> </itemize> <sect1>商業連接 <p><itemize> <item> <htmlurl url="http://www.fatamorgana.com/" name="Fatamorgana Computers"> <item> <htmlurl url="http://www.lucent.com/" name="Lucent web site"> <item> <htmlurl url="http://www.ydi.com/" name="YDI web site "> <item> <htmlurl url="http://www.siemens.com/" name="Siemens web site "> </itemize> <sect>FAQ - Frequently asked questions <p>Q1:BSSID 和 ESSID 之間有什麼區別, 什麼情況下使用 ESSID? <p>A1:BSSID 是 48 bit 數值,用來對較小 BSS 區域進行標識, 每個主機在這個較小的區域裡進行通訊.(eventually with an Access Point) ESSID 可以讓不同的 BSS 擴展至 Extended Service Set (ESS). 每個BSS有一個基點(Access Point),如果ESSID相同就可以相互通訊. 如果你的網路較大,最少擁有兩個基點(Access Point),那麼你真的需要用到ESSID. <p>Q2:我該買什麼樣的基點(Access Point)? <p>A2:比較便宜的: 重要的是基點(Access Point)和無線網卡有相同的特性: 兼容 FHSS 或兼容 DSSS . 注意 Proxim RangeLan2 不能同其它基於 FHSS 標準的網卡通訊, 因為它使用私有的 OpenAir 協議. <p>Q3: 我應當使用什麼樣的 channel 設定? <p>A3: 當你有多個不同的BSS網路(不同的無線產品供應商), 當你遇到衝突時: 在基點(Access Point)或獨立模式(Adhoc mode) 下改變 channel 有助於避免這些衝突. <p>Q4:為什麼我不能在形組模式的主機裡設定 channel? <p>A4:因為 channel 取決於基點(Access Point). <sect>Appendix A - Netmask 255.255.255.255, proxy arp and bridging <p>這裡我們可以看到Linux在無線Internet接入方面的優勢. <p>Linux 使你能給任意一個界面指定 IP/網路遮罩 255.255.255.255 ,example one in eth0, another in eth1 and so on... <p>This has not particularly side-effects. <p>In addition 你可以通過/proc/sys/net/ipv4/conf/ethx/proxy_arp 設定 proxy arp (ethx是網路界面). <p>"echo 1 > proxy_arp" 開啟 ethx上的proxy_arp , "echo 0 > proxy_arp" 關閉 ethx上的proxy_arp. <p> 什麼是proxy_arp? 如果目標地址通過Linux路由器的另外一個界面接入,快速proxy arp 使路由器回應這樣的 ARP 請求. <p>例子: 192.168.1.1 ---- 192.168.1.2 Linux路由器 192.168.2.2 ----192.168.2.1 <p>要使這個例子運行你將要用以下兩種方式: <tscreen><verb> Without proxy-arp In 192.168.1.1 host to set 192.168.1.2 as gateway In 192.168.2.1 host to set 192.168.2.2 as gateway 從任何一端pinging都會成功. </verb></tscreen> <tscreen><verb> With proxy-arp In 192.168.1.1 host to set 192.168.1.2 as gateway 對IP地址為192.168.2.1 的主機不設置閘道,但在路由器相應的界面上設定相應的 proxy_arp. 從任何一端pinging都會成功. </verb></tscreen> <p>在第二個方案中當你從192.168.2.1ping 向192.168.1.1時 Proxy-arp 讓 linux路由器做出正確的回應. <newline> 然後,當192.168.2.1發送 ICMP 數據包, Linux 路由器知道將它重定向至 host 192.168.1.1 <newline> 所以如果你的網路當中有Linux主機提供 IP Forwarders, 你就不必為所有的主機設置靜態路由. <p>你當然可以用無線網路試驗Linux網橋: <p>1.安裝最新最穩定的核心. <p>2.下載網橋設定程式 <htmlurl url="http://openrock.net/bridge" name="http://openrock.net/bridge"> 或者 <htmlurl url="ftp://openrock.net/bridge" name="ftp://openrock.net/bridge"> <sect> 附錄 B - Siemens DECT Radio Modem (西門子--德特無線modem) <p>西門子的首頁 <htmlurl url="http://www.siemens.com" name="http://www.siemens.com"> <p>那是什麼? 這兩個組成部分不是真的PC卡, 有點像外設的modem. <p>Host1-serial - RadioModem1 - - - - - RadioModem2 - serial-Host2 <p>我怎麼連接它? <p>如果你把它們抽像化, 你可以得到下面這種模型: <newline>Host1-serial - - NULL MODEM CABLE - - serial-Host2 <p>你可以在兩個主機的串行口之間進行無線的連接,大體上有兩種設定方法: <tscreen><verb> 1. Linux和Windows, Linux 運行一個daemon侍服程式回應Windows的遠程PPP拔入. 2. Linux 和 Linux, 在它們之間使用不同的IP地址進行PPP連接. </verb></tscreen> <p>第1個方法可以在Linux主機上使用這個簡單的 script: "/usr/sbin/pppd -detach lock idle 300 crtscts connect "/usr/sbin/chat -v TIMEOUT 5 AT OK AT OK AT OK AT OK" IPLINUX:IPWINDOWS /dev/ttySx 115200 disconnect "/usr/sbin/chat -v AT OK" ms-dns IPDNS" <p>那兒: <tscreen><verb> /dev/ttySx 是你的串行端口, IPDNS 是DNS主機的IP地址, IPLINUX 是Linux IP地址 , IPWINDOWS 是 Windows IP地址. </verb></tscreen> <p>上面的script是讓Windows認為Linux上有一個modem. 在Windows 你需要使用crtscts,並創建撥號連接. speed at 115200 and with a stupid number to call (need by Remote Access but absolutely not used). <p>在第 2 個方法中你只要在每個主機中運行一個簡單的 script: "/usr/sbin/pppd passive local crtscts IPLINUX1:IPLINUX2 /dev/ttySx 115200 noauth persist" where you'll invert IPLINUX1 with IPLINUX2 at the other edge. Note that you can do authentication even Linux-Windows than in Linux-Linux if you want. </article>