Token-Ring mini-HOWTO <author> 作者:Mike Eckhoff <tt><htmlurl url="mailto: mike.e@emissary.aus-etc.com" name=" mike.e@emissary.aus-etc.com"></tt><newline> 譯者:陳俊誌 <tt><htmlurl url="mailto: matterchen@sinamail.com" name=" matterchen@sinamail.com"></tt> <date>v4.1, 7 January 1998 翻譯日期 15 December 2000 <abstract> 這分文件是用來幫助你安裝核心修補程式同時試著指出該留心的事項.我建議你在試著安裝任何 Linux 用的 Token Ring 驅動程式之前最好能閱覽過這分文件. </abstract> <!-- Table of contents --> <toc> <!-- Begin the document --> <p> <descrip> <tag>特別感謝</tag> 給 Mark Swanson, Peter De Schrijver, David Morris, Paul Norton 以及任何花時間在撰寫及維護此驅動程式卻未被我在這裡列出的人. 並給 packrat 感謝他在 linux-tr listserv 的幫忙. </descrip> </p> <sect>版權和贅言 <p> 我們並不保證這分文件會切合你的系統. 很多人已經使用過這分文件並已經成功地在 linux 上安裝 Token Ring 網路. </p> <p> 使用本文,責任自負!!! ... 我們對任何因為本文件造成的問題並不負責. </p> <p> 如果你有任何關於本文未提到的問題,請來信給我... <quote> <htmlurl url="mailto:mike.e@emissary.aus-etc.com" name="mike.e@emissary.aus-etc.com"> </quote> 你也可以來信加入 Linux 上 Token Ring 的郵件論壇 <htmlurl url="mailto:majordomo@emissary.aus-etc.com" name="majordomo@emissary.aus-etc.com"> 來信內容請包含: <tscreen> <verb> 標題 linux-tr </verb> </tscreen> </p> <p> 此文件的版權歸 Michael Eckhoff (c) 1995-1998. 只要版權宣告保留在每份附件中,你可以以任何形式隨意複製本文. 商業複製也是被允許並半鼓勵的;但是,請先通知我讓我確定你有最新的資訊. </p> <sect>硬體需求 <p> 確定你有被此驅動程式支援的 Token Ring 網路卡. 目前只有 Tropic 晶片被支援. </p> <p> 我個人已知可用的卡有: <itemize> <item>3Com 3C619B Token Link <item>3Com 3C619C Token Link <item>HyperRing Classic 16/4 <item>IBM Turbo 16/4 ISA adapter** <item>IBM Token Ring Auto 16/4 ISA adapter <item>IBM Token Ring Auto 16/4 adapter /A <item>IBM Token Ring 16/4 adapter /A <item>IBM Token Ring adapter /A <item>IBM Token Ring adapter II (4 Megabit only) <item>IBM 16/4 ISA Token Ring card (16bit) <item>IBM 16/4 ISA Token Ring card (8bit) <item>Madge Blue (100% IBM compatable) </itemize> 其他 100%; IBM 相容的 shared-ram 網路卡應該也可以順利工作. 如果有其他可能請通知我. </p> <p> 建議你暫且用 16KB Shared RAM. </p> <p> 可能有問題的網路卡: <descrip> <tag>IBM Turbo 16/4 ISA adapter</tag> 事實上此網路卡在 Linux 下工作順利. 但是,你必須以 Auto 16/4 相容模式運作. 設定此卡最簡單的方式是用隨卡附的 LANAID disks 並打以下指令: <tscreen> <verb> LANAIDC /FAST=AUTO16 </verb> </tscreen> 你應該根據本文使用 <tt>LANAIDC</tt> or <tt>LANAID</tt> 來設定網路卡. <tag>Token-Ring Network 16/4 Adapter II</tag> 此網路卡<bf>無法</bf>工作. 別把此卡和 IBM Token Ring 網路卡 II (4mbit) 搞混了. 這是 ISA 介面的 DMA/Busmaster 網路卡. <tag>3Com TokenLink Velocity ISA</tag> 你或許可讓此卡運作. 根據某些的回報;有些工作無誤,但也有人有問題. <tag>PCI adapters</tag> 目前沒有任何 IBM PCI 網路卡被支援. <tag>IBM Auto LanStreamer 16/4 Token-Ring PCI Adapter</tag> 目前未支援,但已經在進行支援中. 預計完成時是 Full Duplex. </descrip> </p> <sect>軟體需求 <p> <descrip> <tag>留意事項 :</tag> 如果你的系統核心是 2.0 版以後的話,請跳到本文套件特有段落 (distribution specific section). 以下是針對 1.2版的核心而言. </descrip> 這裡假設你已經安裝並可運作 Linux. </p> <p> 可由以下位置獲得 Token Ring 的修補程式: <tscreen> <url url="ftp://ftp.wayne.esu1.k12.ne.us/pub/Linux/Token-Ring/TokenRing.patch-1.2.0.gz"> </tscreen> 可從下列位置獲得 Net-Tools 修補程式 <tscreen> <url url="ftp://ftp.wayne.esu1.k12.ne.us/pub/Linux/Token-Ring/net-tools-1.2.0.patched.tar.gz"> </tscreen> 替修補程式新增一個目錄 (例如 <tt>/usr/src/patches</tt>) 並把修補程式放在這. <tscreen> <verb> mkdir /usr/src/patches central directory for patch storage mkdir /usr/src/patches/token place TokenRing patch here </verb> </tscreen> </p> <sect>安裝和設定 <p> <descrip> <tag>留意事項 :</tag> 這些說明是針對 1.2 版的 token ring 支援的核心修補程式. 如果你用 2.0 版以上的核心,你只要在重新編譯目前的核心時,對支援 token ring 的選項選擇 "<tt>y</tt>es" 或 "<tt>m</tt>odule" 即可. </descrip> <enum> <item>把 Token Ring 網路卡安裝到電腦上並設定你想要使用的功能. 最好能先在 DOS 環境下測試此卡無誤後再在 Linux 上使用. 如果它能在 DOS 下工作,那它很有可能能用相同的設定值在 Linux 跑. 如果這是 Plug and Play (隨插即用) 網路卡,當你的設定可以讓它工作時,記得把設定值記下來. <item>替你原先的系統目錄作個備份. 當你有需要將這修補程式從你的核心中完全移除並回到你原先的系統時,這就顯得很重要. <tscreen> <verb> cd /usr/src tar cvzhf linuxbak.tar.gz linux </verb> </tscreen> <item>解壓縮 Token Ring 修補程式. <tscreen> <verb> cd /usr/src/patches/token gzip -d TokenRing.patch-1.2.0.gz </verb> </tscreen> <item>替你的核心增加 TokenRing 功能. <tscreen> <verb> cd /usr/src/linux patch -p1 < /usr/src/patches/token/TokenRing.patch-1.2.0 </verb> </tscreen> -或- <tscreen> <verb> patch -p1 < <directory-of-patchfile>/TokenRing.patch-1.2.0 </verb> </tscreen> <item> 從核心中搜尋因修補造成的 rejects (不合格) 並作適當的改變. <tscreen> <verb> find . -name \*.rej -print </verb> </tscreen> <item>從核心中搜尋 orig 檔案並刪除它們. <tscreen> <verb> find . -name \*.orig -print | xargs rm </verb> </tscreen> <item>編譯核心. <descrip> <tag>留意事項NOTE:</tag> 如果你有 swap 分割區,請把他設成 active. </descrip> <tscreen> <verb> cd /usr/src/linux make config </verb> </tscreen> (修補程式會將以下兩個選項加入 <tt>config.in</tt> <tscreen> <verb> Token Ring support (CONFIG_TR) [y] </verb> </tscreen> (還有以下這行...) <tscreen> <verb> IBM Tropic chipset based adaptor support (CONFIG_IBMTR) [y] </verb> </tscreen> <tscreen> <verb> make dep make clean make zImage </verb> </tscreen> <item>設定 LILO. 首先把你核心 <tt>vmlinuz</tt> 改名為 <tt>vmlinuz.old</tt> 再把新核心複製成 <tt>vmlinuz</tt>. 就我的系統而言,複製有以下幾步驟 <quote> <tt>/usr/src/linux/arch/i386/boot/zImage</tt> to <tt>/vmlinuz</tt> 並編輯 <tt>/etc/lilo.conf</tt> 使核心能載入. </quote> 並在提示符號下打 "<tt>lilo</tt>". <item>你現在可重新開機並使用 Token Ring 網路卡了. 相關設定的資訊請參考套件特有段落 (distribution specific section). </enum> </p> <sect>NetTools 安裝 <p> NetTools packages(包裝)中有很多網路設備聯繫的基本工具. 包含的程式有 <tt>arp</tt>, <tt>rarp</tt>, <tt>route</tt>, <tt>ifconfig</tt> and <tt>netstat</tt>. 因為這些程式預設並不了解 Token Ring, 你必須加入 NetTools 修補程式讓這些程式能與 Token Ring 驅動程式工作地更有效率. <descrip> <tag>留意事項 :</tag> 目前 1.2.x 版的核心用的 NetTools 是 1.2.0 版. 如果你用的是 2.0 版的核心,那麼很可能你的 NetTools 已是最新版了. 不論如何,你都可在以下位置找到最新的原始檔: <tscreen> <url url="ftp://tapac.inka.de/pub/comp/Linux/networking/NetTools/"> </tscreen> </descrip> <enum> <item>(1)複製並解開 NetTools 原始碼到目錄 /usr/src <tscreen> <verb> cp net-tools-1.2.0.patched.tar.gz /usr/src tar -zxvof /usr/src/net-tools-1.2.0.tar.gz </verb> </tscreen> <item>(5) Make net-tools 檔案. <tscreen> <verb> cd /usr/src/net make install </verb> </tscreen> </enum> </p> <sect>已知問題 <p> 我個人使用此驅動程式幾乎沒有問題. 它已經完美運作了一段時間. </p> <p> 如果你在 1.2.x 版核心使用此驅動程式有任何問題,請更新至 2.0 版核心. 本文寫作時的最新核心版本是 2.0.33. Token Ring 驅動程式自 1.2 版以後有很大的改善,而且大部分都沒有回朔. </p> <p> 此外,你不必對 2.0 版核心作 token ring 的修補. 核心已經內建.但如果你想測試新功能的話,也有給 2.1 版核心的修補程式. </p> <sect>問題與回答 <p> <descrip> <tag>Q:</tag> Token Ring 驅動程式能編譯成 module(模組) 嗎? <tag>A:</tag> 可以, 它工作地相當好.在編譯成 module 時有個額外的參數可用. 如果你有 "spoof(欺騙)" 軟體安裝程式的需要,例如 redhat boot disks 把 token ring 網路卡看成 ethernet(乙太網路) 裝置 (用 NFS/FTP 安裝等等),你可以用 "<tt>device</tt>" 這個參數強行指定設備不用 <tt>tr0</tt> 這個名稱. 但當你有多張網路卡時這個方法可能會出錯. 大多時候就是這裡有些不相容性要克服.例: <tscreen> <verb> /sbin/insmod ibmtr device=eth0 </verb> </tscreen> <tag>Q:</tag> 我一直遇到錯誤訊息 "0011". 這是甚麼意思? <tag>A:</tag> 確定你的網路連接沒有問題或是你的 token ring 網路卡有 loopback connector.這個錯誤訊息是指它無法開啟 token ring. 這種情形;有 99.99% 是因為它沒有被插入. <tag>C:</tag> 如果你有裝音效卡且它的 IO 0x220,那很有可能 token ring 網路卡會和 0xa20 的 IO 有衝突. 如果你發現有被支援的網路卡無法工作而你又有音效卡,請試著把你的網路卡設定成 0xa24 或是 更改/移除 音效卡. 除此之外... 這裡有一些我收到關於 Token Ring 和 Linux 的 email. 為了不佔空間,我把其中一些 email 不重要的內容刪去. <descrip> <tag>Q:</tag> <tscreen> <verb> From: "Mr. Chuck Rickard" <chuck@gl.umbc.edu> Subject: Re: Token Ring Kernel patch. 我已加入核心並重新編譯.當開機時它說,"tr0: Can't assign device to adapter" and again for tr1".您有何看法呢? (以下為原文...) I d/l'd the patch, applied it, and re-compiled. When booting it said, "tr0: Can't assign device to adapter" and again for tr1. Any ideas? Thanks! Chuck Rickard (chuck@umbc8.umbc.edu) </verb> </tscreen> <tag>A:</tag> <tscreen> <verb> From: David Morris <dwm@shell.portal.com> </verb> </tscreen> 如果只有這個訊息,它表示有關網路卡資訊的 PIO request (參考 <tt>segment = inb(PIOaddr)</tt> in <tt>ibmtr.c</tt>) 已超出 Token Ring 網路卡所在的 IO address 的範圍了. (以下為原文...) When this is the only message issued, it means that the PIO request for adapter information (see <tt>segment = inb(PIOaddr)</tt> in <tt>ibmtr.c</tt>) was so out of range that there is no TR card at that IO address. <tag>Q:</tag> <tscreen> <verb> From: Mike Glover <glover@credit.erin.utoronto.ca> Subject: Token ring problems. 感謝您的回答.我想我之前問的不對題,現在重新說明一遍.不論如何,以下剪輯是開機後從 /var/adm/messages 抄出來的. (以下原文未刪...) Thanks for responding. I was starting to thing that I posted incorrectly, and I was about to post again. Anyway, the following clip is part of my /var/adm/messages file from when I boot up. May 2 10:03:14 linux kernel: tr0: Unable to assign adapter to device. May 2 10:03:14 linux kernel: tr1: Unable to assign adapter to device. 這段中, tr0: Unable to assign adapter device.著實困擾著我.這訊息簡短至極使的我 不知如何處理.我只知道我沒有指定任何 token ring 的資訊,但我不知如何下手. The section, tr0: Unable to assign adapter device. is what kinda confuses me. The documentation is slim at best so I didn't know what to do with the message. I know I didn't assign any token ring information, and I didn't know where to do it. The hardware(硬體): Its a PC clone (Dell OMNIPLEX 560 to be exact) The token ring card is a Olicom 16/4 Adapter. 我有 DOS 環境的 token ring 驅動程式而且它馬上連上網路,所以不是這張網路卡的問題. 我想可能是我在 Linux 下設定時忽略了甚麼小東西. I have DOS token ring drivers and it snaps into the network, so there is nothing wrong with the card. I think, I am just missing something really small in the config on the Linux side. </verb> </tscreen> <tag>A:</tag> Olicom 16/4 網路卡並不使用 Tropic 晶片.試著去用上面 HOWTO 所列的網路卡. (以下為原文...) The Olicom 16/4 Adapter does not use the Tropic Chipset. Try using one of the cards that are listed at the top of the HOWTO. <tag>Q:</tag> <tscreen> <verb> From: Mike Glover <glover@credit.erin.utoronto.ca> Subject: Found an IBM card... 我發現一張 IBM token ring 網路卡並且更進一步,但似乎不怎麼好運.(在 /etc/rc.d/rc.inet1 中 ifconfig 項目我有把 eth0 改成 tr0) (原文...) I found myself an IBM token ring card and I got a little further, but still not luck. (I did change /etc/rc.d/rc.inet1 ifconfig entry from eth0 to tr0) 不管怎樣,以下是 /var/adm/messages 的內容: Anyway, here is part of the /var/adm/messages file: May 2 16:23:07 linux kernel: IPX Portions Copyright (c) 1995 Caldera, Inc. May 2 16:23:07 linux kernel: tr0: PIOaddr: a20 seg/intr: b8 mmio base: 000dc000 intr: 0 May 2 16:23:07 linux kernel: tr0: Channel ID string not found for PIOaddr: a20 May 2 16:23:07 linux kernel: tr0: Expected for ISA: 5049434f3631313039393020 May 2 16:23:07 linux kernel: tr0: found: 000902003021111000182000 May 2 16:23:07 linux kernel: tr0: Expected for MCA: 4d4152533633583435313820 May 2 16:23:07 linux kernel: tr0: Unable to assign adapter to device. May 2 16:23:07 linux kernel: tr1: Unable to assign adapter to device. May 2 16:23:07 linux kernel: PPP: version 0.2.7 (4 channels) NEW_TTY_DRIVERS OPTIMIZE_FLAGS 這有說甚麼嗎?我看不出來. Does this tell you anything. It tells me little. </verb> </tscreen> <tag>A:</tag> <tscreen> <verb> From: David Morris <dwm@shell.portal.com> </verb> </tscreen> 這訊息代表 MMTO area 或是 TR 網路卡有記憶體衝突造成和網路卡的不相容 (至少這訊號未知). This message means either a memory conflict with the MMIO area or a TR card which is not compatible with the driver (at least the signature isn't known). <tag>Q:</tag> <tscreen> <verb> From: Mike Glover <glover@credit.erin.utoronto.ca> Subject: Almost there... The following sample is what I'm getting on my messages file: May 3 14:50:24 linux kernel: tr0: now opening the board... May 3 14:50:24 linux kernel: tr0: board opened... May 3 15:11:47 linux kernel: tr0: Arrg. Transmitter busy for more than 50 msec. Donald resets adapter, but resetting May 3 15:11:47 linux kernel: the IBM tokenring adapter takes a long time. It might not even help when the May 3 15:11:47 linux kernel: ring is very busy, so we just wait a little longer and hope for the best. May 3 15:11:47 linux kernel: tr0: Arrg. Transmitter busy for more than 50 msec. Donald resets adapter, but resetting May 3 15:11:47 linux kernel: the IBM tokenring adapter takes a long time. It might not even help when the May 3 15:11:47 linux kernel: ring is very busy, so we just wait a little longer and hope for the best. May 3 15:11:47 linux kernel: tr0: Arrg. Transmitter busy for more than 50 msec. Donald resets adapter, but resetting Arrg 項目只有當我 telnet ,rlogin 或 ftp 到遠端機器時才會產生.當有上述情形時,網路會當掉一陣子. 我移除其他硬體裝置(我的 SCSI 卡)讓網路卡單獨工作.一樣有問題,這排除了硬體間 IRQ 衝突的情形. 以下是此卡的 DIP switches: The Arrg entry only comes when I telnet, rlogin or ftp to a remote machine. Once that happens, the connection hangs big time. I took out all the other hardware (which was 1 SCSI card) and tried running the card all by itself. Same thing, so it eliminates hardware IRQ's from getting into a yelling match. The following are the DIP switches on the card: 1 Up | 2 Down | 3 Down | According to the manual this sets the 4 Up | base address to CC000 Which is fine for 5 Up | my machine. 6 Down | 7 Down + This sets the IRQ to 2. Which is also fine 8 Down + 9 Up X Primary Lan adapter. Which it is. 10 Up = 16 KB shared RAM size. This OK? 11 Down = 12 Up # 16 Mbps Data rate. 我懷疑這是否真的是 dip switches,或是我設定網路時的 route table 有問題. I was wondering if it is in fact the dip switches, or the way I have configured my route table and other network info. ttfn, Mike </verb> </tscreen> <tag>A:</tag> 在 2.0 版核心中 Arrg 的問題值得留意.所有的修補程式都沒有回朔到 1.2 版,現在我在想這必要性了.如果你有過多 Arrg 訊息的問題,你願意升級到 2.0 版的核心嗎? The Arrg problem is pretty much taken care of in the 2.0 kernels. All of the patches have not been ported back to 1.2, and I doubt that they will be. If you get excessive Arrg messages, do yourself a favour and move to Linux 2.0. </descrip> </descrip> </p> <sect>套件特有安裝 <sect1>Slackware 96 <p> 如果你的系統未執行過 "<tt>netconfig</tt>" ,請現在執行. 設定值如同系統是處於 Ethernet(乙太網路) 中. </p> <p> 編輯 <tt>/etc/rc.d/rc.inet1</tt> 指向 <tt>tr0</tt> device(設備)而不是<tt>eth0</tt> device(設備) </p> <p> 你應該會看到有一行像這樣 <tscreen> <verb> /sbin/ifconfig eth0 ${IPADDR} broadcast ${BROADCAST} netmask ${NETMASK} </verb> </tscreen> 把這行改成為 <tscreen> <verb> /sbin/ifconfig tr0 ${IPADDR} broadcast ${BROADCAST} netmask ${NETMASK} </verb> </tscreen> </p> <sect1>RedHat 4.0+ <p> 在 RedHat Linux 中有一個很棒的 Xwindows 控制台可以設定 modules(模組) 和 devices(設備). 如果你在安裝 RedHat 時就已經裝上了 token ring 網路卡,那麼你應該已經有了 token ring 的模組支援了. 試試以下指令: <tscreen> <verb> modprobe ibmtr </verb> </tscreen> 看看你得到甚麼. 如果你的網路卡被支援,那麼很可能你已經能使用它了. </p> <p> 設定介面最好用的是 control-panel(控制台). 首先你會想用 kernel module control(模組核心控制) 並指示它載入 token ring 這個新的網路設備. 它應該會在開機時自動載入 ibmtr 這個驅動程式. 然後你會想跳過網路組態並增加新的設備,<tt>tr</tt>,並給它一個 ip address,等等. </p> <p> 你可以重新開機並在 RedHat Linux 4.0+ 上使用 Token Ring 網路卡了. </p> <p> 請留意關於 RedHat 的說明部份是靠腦中的印象寫的. 因為我有一段時間沒有修改過我的 RedHat 系統了,現在這是憑記憶寫的. 不論如何,它們可以達成你的目的. </p> </article>