Linux Networking-HOWTO (Previously the Net-3 Howto) <author>Current Author: {Poet} <htmlurl url="mailto:poet@linuxports.com" name="poet@linuxports.com"> <newline> Original Authors: Terry Dawson (main author), VK2KTJ; Alessandro Rubini (maintainer) <date>v1.5, August 1999 <trans>The Linux Japanese FAQ Project <tdate>v1.5j, January 2000 <abstract> <!--O The Linux Operating System boasts kernel based networking support written almost entirely from scratch. The performance of the tcp/ip implementation in recent kernels makes it a worthy alternative to even the best of its peers. This document aims to describe how to install and configure the Linux networking software and associated tools. --> Linux オペレーティングシステムのカーネルには、ゼロから書きあげられたネッ トワークコードが組み込まれています。最近のカーネルに実装されている TCP/IP の性能は、既存の最高のシステムにも比肩しうる結果を示しています。 この文書は Linux のネットワーク用のソフトウェアのインストールと設定方法、 さらに関連するツール類について解説します。 </abstract> <!-- 訳語表: 藤原のでっちあげなので、追加・修正が必要です…。 Mobile-IP モバイル IP firewall: ファイアウォール ethernet: イーサネット routing table: 経路表 dynamic routing daemon: 動的経路制御デーモン access control: アクセス制御 source address: 始点アドレス destination address: 終点アドレス --> <!-- Table of contents --> <toc> <!-- Begin the document --> <p> <!--######################################################################--> <!--O <sect><heading>Introduction. --> <sect><heading>はじめに <!--O <p>This is the first release since LinuxPorts has become the author of this document. First let me say that we hope that over the next few months you will find this document to be of use and that we are able to provide accurate and timely information in regards to networking issues with Linux. --> <p>この文書は、LinuxPorts がこの文書の著者となってから最初のリリースで す。最初に一言、我々は、 この先数ヶ月程度は読者の皆さんがこの文書を役に立つと考えてくださるように、 また本文書が Linux のネットワーク関連のことがらについて、 正確でタイムリーな情報を提供できているように望んでいます。 <!--NAKANO: もうちょっと意訳しちゃっていいと思いますが...--> <p> <!--O This document like the other howto's that we manage is going to become very different, this document will shortly become the Networking-HOWTO not just the Net-3(4) Howto. We will cover such items as PPP, VPN, and others... --> この文書は我々が管理している他の HOWTO と同様に、全く別物になるでしょう。 この文書はまもなく単なる Net-3(4) HOWTO ではなく、Networking-HOWTO となるでしょう。PPP, VPN 等といった内容も押さえるつもりです。 <!--NAKANO: be going to = will :-) --> <p> <!--O <sect><heading>Document History --> <sect><heading>文書の履歴 <!--O <p>The original NET-FAQ was written by Matt Welsh and Terry Dawson to answer frequently asked questions about networking for Linux at a time before the Linux Documentation Project had formally started. It covered the very early development versions of the Linux Networking Kernel. The NET-2-HOWTO superceded the NET-FAQ and was one of the original LDP HOWTO documents, it covered what was called version 2 and later version 3 of the Linux kernel Networking software. This document in turn supercedes it and relates only to version 4 of the Linux Networking Kernel or more specifically kernel releases 2.x and 2.2.x. --> <P>元々の NET-FAQ は Matt Welsh と Terry Dawson が著者であり、 Linux Documentation Project が正式に立ち上がる前に Linux のネットワーク に関する FAQ (よく聞かれる質問)に答えるために書かれました。 この FAQ は Linux カーネルのネットワーク機能のごく初期の開発バージョン を扱っていました。NET-2-HOWTO は、オリジナルの LDP HOWTO 文書の一つと なり、NET-FAQ の後を受けて Linux カーネルのネットワークコードの バージョン 2、そしてその後のバージョン 3 を扱っていました。 この文書はさらにその後を受け、Linux のネットワークコードの バージョン 4 だけに関連する話題や、カーネルのリリース 2.x と 2.2.x に 特化した話題を扱っています。 <!--O <p>Previous versions of this document became quite large because of the enormous amount of material that fell within its scope. To help reduce this problem a number of HOWTO's dealing with specific networking topics have been produced. This document will provide pointers to them where relevant and cover those areas not yet covered by other documents. --> 話題をあれこれと取りこみすぎたため、この文書の以前のバージョン (NET-2/3-HOWTO)はかなり肥大化していました。そのため、ネットワーク機能 のうち、特定の分野だけを扱う HOWTO がいくつも書かれてきました。この文 書では、そのような HOWTO で書かれている話題については、その HOWTO への ポインタを示し、主に他の文書が扱っていない分野の話題を扱うことにします。 <!-- ==================================================================== --> <!--O <sect1><heading>Feedback --> <sect1><heading>フィードバック <!--O <p>We are always interested in feedback. Please contact us at: <htmlurl url="mailto:poet@linuxports.com" name="poet@linuxports.com">. --> <p>我々 LinuxPorts はフィードバックをお待ちしています。 <url url="mailto:poet@linuxports.com" name="poet@linuxports.com"> まで連絡してください。 <!--O <p>Again, if you find anything erroneous or anything you would like to see added, please contact us. --> <p>繰り返しますが、誤っている点や追加してほしい項目が何かあれば、我々 に連絡してください。 <!--######################################################################--> <!--O <sect><heading>How to use this HOWTO. --> <sect><heading>この HOWTO の読み方 <!--O <p>This document is organized top-down. The first sections include informative material and can be skipped if you are not interested; what follows is a generic discussion of networking issues, and you must ensure you understand this before proceeding to more specific parts. The rest, ``technology specific'' information is grouped in three main sections: Ethernet and IP-related information, technologies pertaining to widespread PC hardware and seldom-used technologies. --> <p>この文書はトップダウン式の構成にしています。最初の章には お知らせ的なことが書いてあるので、興味がなければ飛ばしても構いません。 その後にはネットワークに関する一般的な知識が書いてあるので、より専門的 な部分に進む前に必ず理解しておいてください。残りの部分は 「技術に特化した」情報であり、3 つの主な部分からできています: つまりイーサネットと IP に関する情報、 広く使われている PC ハードウェアの関連技術に関する情報、 まれに使われている技術に関する情報、です。 <!--O <p>The suggested path through the document is thus the following: --> <p>したがって、この文書のお勧めの読み方は以下のようになります: <descrip> <!--O <p><tag>Read the generic sections</tag>These sections apply to every, or nearly every, technology described later and so are very important for you to understand. On the other hand, I expect many of the readers to be already confident with this material. --> <p><tag>一般的なことに関する章を読む。</tag> これらの章に書いてあることの全 てあるいはほとんど全ては、その後で説明する技術に適用されます。したがっ て、これを理解しておくことは重要です。その一方で、読者の多くは既にこう いったことに詳しいものと筆者は考えています。 <!--O <p><tag>Consider your network</tag>You should know how your network is, or will be, designed and exactly what hardware and technology types you will be implementing. --> <p><tag>自分のところのネットワークについて考える。</tag>自分のところの ネットワークがどうなっているか、あるいはこれからどうするのかを知ってお き、どんなハードウェアや技術を使うのかを正確に知っておくべきです。 <!--O <p><tag>Read the ``Ethernet and IP'' section if you are directly connected a LAN or the Internet</tag>This section describes basic Ethernet configuration and the various features that Linux offers for IP networks, like firewalling, advanced routing and so on. --> <p><tag>直接 LAN やインターネットに接続しているならば「イーサネットと IP」の章を読む。</tag> この章ではイーサネットの基本的な設定と Linux が IP ネットワーク用に用意している各種機能(ファイアウォールや 高度な経路設定など)について説明しています。 <!--O <p><tag>Read the next section if you are interested in low-cost local networks or dial-up connections</tag>The section describes PLIP, PPP, SLIP and ISDN, the widespread technologies used on personal workstations. --> <p><tag>安価な LAN やダイアルアップ接続に興味があるなら次の章を読む。</tag> この章では PLIP, PPP, SLIP, ISDN といった個人所有のワークステーション で広く使われる技術について説明します。 <!--O <p><tag>Read the technology specific sections related to your requirements</tag>If your needs differ from IP and/or common hardware, the final section covers details specific to non-IP protocols and peculiar communication hardware. --> <p><tag>必要に応じて専門技術の章を読む。</tag> IP 以外のプロトコルや 一般的でないハードウェアが必要ならば、最後の章を見ましょう。 IP 以外のプロトコルと特殊な通信ハードウェアの詳しい説明があります。 <!--O <p><tag>Do the configuration work</tag>You should actually try to configure your network and take careful note of any problems you have. --> <p><tag>設定作業を行う。</tag> 実際にネットワークの設定をやってみて、 そこで起きた問題を注意深く記録しておくべきです。 <!--O <p><tag>Look for further help if needed</tag>If you experience problems that this document does not help you to resolve then read the section related to where to get help or where to report bugs. --> <p><tag>必要ならば、さらに説明を探す。</tag> この文書では解決の役に立 たない問題に出会ったら、助けを求めるための場所やバグを報告する先に関す る章を読んでください。 <!--O <p><tag>Have fun!</tag>Networking is fun, enjoy it. --> <p><tag>楽しむ!</tag> ネットワークは面白いものです。楽しんでください。 </descrip> <!-- ==================================================================== --> <!--O <sect1><heading>Conventions used in this document --> <sect1><heading>この文書内での約束事 <!--O <p>No special convention is used here, but you must be warned about the way commands are shown. Following the classic Unix documentation, any command you should type to your shell is prefixed by a prompt. This howto shows "<tt>user%</tt>" as the prompt for commands that do not require superuser privileges, and "<tt>root#</tt>" as the prompt for commands that need to run as root. I chose to use "<tt>root#</tt>" instead of a plain "<tt>#</tt>" to prevent confusion with snapshots from shell scripts, where the hash mark is used to define comment lines. --> <p>特別な約束事はありませんが、コマンドの表記方法には注意してください。 古典的な Unix の文書に従って、シェルに入力するコマンドの前にはプロンプト を書いてあります。この HOWTO では、スーパーユーザの権限が必要ない コマンドのプロンプトとしては "<tt>user%</tt>" を使い、root で実行する 必要があるコマンドのプロンプトとしては "<tt>root#</tt>" を使います。 ただの "<tt>#</tt>" でなく "<tt>root#</tt>" を使っているのは、 シェルスクリプトからの抜粋部分との混同を避けるためです。シェルスクリプ トでは "#" 記号はコメント行を定義するために使います。 <!--O <p>When ``Kernel Compile Options'' are shown, they are represented in the format used by <em/menuconfig/. They should be understandable even if you (like me) are not used to <em/menuconfig/. If you are in doubt about the options' nesting, running the program once can't but help. --> <p>「カーネルのコンパイルオプション」が示された時は、これは <em/menuconfig/ で使われる書式で表現されます。 <em/menuconfig/ を使っていなくてもわかるはずです(筆者も使っていません)。 オプションの入れ子がわからなくても、<em/menuconfig/ を一度実行すればわ かると思います。 <!--O <p>Note that any link to other HOWTO's is local to help you browsing your local copy of the LDP documents, in case you are using the html version of this document. If you don't have a complete set of documents, every HOWTO can be retrieved from <tt>metalab.unc.edu</tt> (directory <tt>/pub/Linux/HOWTO</tt>) and its countless mirrors. --> <p>この文書の HTML 版については、ローカルに置いている LDP 文書を読みや すくするために他の HOWTO へのリンクをローカル参照にしています。LDP 文書の全てを持っていなければ、各 HOWTO 文書は <url url="ftp://metalab.unc.edu/pub/Linux/HOWTO/" name="metalab の /pub/Linux/HOWTO ディレクトリ"> や metalab の無数にあるミラーサイトから入手できます。 <!--NAKANO 邦訳では絶対参照にしたほうがいいんじゃないかしらん?--> <!--######################################################################--> <!--O <sect><heading>General Information about Linux Networking. --> <sect><heading>Linux のネットワーク機能に関する一般的な情報 <p> <!-- ==================================================================== --> <!--O <sect1><heading>A brief history of Linux Networking Kernel Development. --> <sect1><heading> Linux カーネルのネットワーク機能の開発小史 <p> <!--O Developing a brand new kernel implementation of the tcp/ip protocol stack that would perform as well as existing implementations was not an easy task. The decision not to port one of the existing implementations was made at a time when there was some uncertainty as to whether the existing implementations may become encumbered by restrictive copyrights because of the court case put by U.S.L. and when there was a lot of fresh enthusiasm for doing it differently and perhaps even better than had already been done. --> カーネルに新規に TCP/IP プロトコルスタックを組み込み、既存のものと同等 の性能を出すのは簡単なことではありません。U.S.L(Unix Software Laboratory)が Unix に関する訴訟を起こして、既存のコードが著作権によって 使えなくなるかもしれない恐れが生じたことが主な理由となって、Linux の開 発者たちは、既存のネットワークコードを移植するのではなく、ゼロから新し いコードを書こうと決意しました。同時に、既存の実装とは全く異なったやり 方で、よりよいものを作り直してみようという熱意も、大きな原動力になりまし た。 <p> <!--O The original volunteer to lead development of the kernel network code was Ross Biro <tt/<biro@yggdrasil.com>/. Ross produced a simple and incomplete but mostly usable implementation set of routines that were complemented by an ethernet driver for the WD-8003 network interface card. This was enough to get many people testing and experimenting with the software and some people even managed to connect machines in this configuration to live internet connections. The pressure within the Linux community driving development for networking support was building and eventually the cost of a combination of some unfair pressure applied to Ross and his own personal commitments outweighed the benefit he was deriving and he stepped down as lead developer. Ross's efforts in getting the project started and accepting the responsibility for actually producing something useful in such controversial circumstances were what catalyzed all future work and were therefore an essential component of the success of the current product. --> カーネルに組み込まれたネットワークコードの開発を最初にリードしたボラン ティアは Ross Biro <tt/<biro@yggdrasil.com>/ でした。彼は、単純で機 能的には不十分ながら、まずまず使いものになるネットワークコードと WD-8003 ネットワークカード用のドライバを作成しました。このコードを使っ て多くの人々がソフトウェアのテストや実験をし、実際にインターネットに接 続した人たちもいました。しかし、Linux コミュニティの中でネットワーク機 能の開発に対する要望が高まるにつれ、Ross にのしかかる責任が増えてしま い、彼はネットワーク機能の開発のリーダーを降りました。しかし、Ross がこ のプロジェクトを開始したことと、様々な論争がなされている中で、 ある程度実用になるコードを責任を持って実際に開発したことのおかげで、 その後の作業が 容易になりました。したがって、彼のした仕事は現在のコードがうまくできて いることの重要な要素です。 <p> <!--O Orest Zborowski <tt/<obz@Kodak.COM>/ produced the original BSD socket programming interface for the Linux kernel. This was a big step forward as it allowed many of the existing network applications to be ported to linux without serious modification. --> Orest Zborowski <tt/<obz@Kodak.COM>/ が Linux カーネルに独自の BSD のソケットプログラムインターフェイスを組み込みました。これは極めて重要 な前進でした。というのも、これを使うことにより既存のネットワーク アプリケーションの多くが大きな変更なしに移植できるようになったからです。 <p> <!--O Somewhere about this time Laurence Culhane <tt/<loz@holmes.demon.co.uk>/ developed the first drivers for Linux to support the SLIP protocol. These enabled many people who did not have access to Ethernet networking to experiment with the new networking software. Again, some people took this driver and pressed it into service to connect them to the Internet. This gave many more people a taste of the possibilities that could be realized if Linux had full networking support and grew the number of users actively using and experimenting with the networking software that existed. --> 同じ頃、Laurence Culhane <tt/<loz@holmes.demon.co.uk>/ が SLIP プ ロトコルをサポートする最初のドライバを開発しました。これにより、イーサ ネットを持たない多くの人々もネットワーク用のソフトウェアのテストができ るようになりました。こちらの場合でもまた、何人かの人々がこのドライバに 携わり、これを実際に使ってインターネットに接続しはじめました。 このドライバの成功により、Linux に充分なネットワーク機能が組み込まれれ ば、より多くのユーザが積極的に既存のネットワークソフトウェアを利用・実 験するようになるだろうと感じる人がますます多くなりました。 <p> <!--O One of the people that had also been actively working on the task of building networking support was Fred van Kempen <tt/<waltje@uwalt.nl.mugnet.org>/. After a period of some uncertainty following Ross's resignation from the lead developer position Fred offered his time and effort and accepted the role essentially unopposed. Fred had some ambitious plans for the direction that he wanted to take the Linux networking software and he set about progressing in those directions. Fred produced a series of networking code called the `NET-2' kernel code (the `NET' code being Ross's) which many people were able to use pretty much usefully. Fred formally put a number of innovations on the development agenda, such as the dynamic device interface, Amateur Radio AX.25 protocol support and a more modularly designed networking implementation. Fred's NET-2 code was used by a fairly large number of enthusiasts, the number increasing all the time as word spread that the software was working. The networking software at this time was still a large number of patches to the standard release of kernel code and was not included in the normal release. The NET-FAQ and subsequent NET-2-HOWTO's described the then fairly complex procedure to get it all working. Fred's focus was on developing innovations to the standard network implementations and this was taking time. The community of users was growing impatient for something that worked reliably and satisfied the 80% of users and, as with Ross, the pressure on Fred as lead developer rose. --> もう一人、熱心にネットワーク機能を開発したのが Fred van Kempen <tt/<waltje@uwalt.nl.mugnet.org>/ です。Ross がリーダーを降りてからの 不安定な時期に Fred は彼の時間と努力を捧げて開発をリードしました。Fred は Linux のネットワークソフトウェアを独特の方向に発展させようと考え、 その方向に開発をすすめました。Fred は `NET-2' と呼ばれるネットワークコー ドを開発し(Ross のコードは `NET' コードと呼ばれています)、このコードは 多くの人々にとって十分実用的なものでした。Fred は開発計画として、動的 なデバイスインターフェイスやアマチュア無線用の AX.25 プロトコル、より モジュール化されたネットワーク機能など、さまざまな革新的な機能をスケジュー ルに挙げていました。Fred の NET-2 コードは実に多くの熱心な開発者に 用いられ、「実際に動く」という評判が広まりました。このころのネットワー クコードはまだカーネル本体には組み込まれておらず、多数のパッチとして公 開されていました。当時書かれた NET-FAQ と NET-2-HOWTO はこのパッチを組 みこむずいぶん複雑な手順について説明していました。Fred は既存のネット ワーク系の実装に革新をもたらそうとしていましたが、それには時間がかかり ました。一方、Linux コミュニティでは、安定して動き、80% のユーザを満足 させる機能を持ったネットワーク機能をもとめる声が強まり、Ross 同様、開 発のリーダーとして Fred にかかるプレッシャーが強まってきました。 <p> <!--O Alan Cox <tt/<iialan@www.uk.linux.org>/ proposed a solution to the problem designed to resolve the situation. He proposed that he would take Fred's NET-2 code and debug it, making it reliable and stable so that it would satisfy the impatient user base while relieving that pressure from Fred allowing him to continue his work. Alan set about doing this, with some good success and his first version of Linux networking code was called `Net-2D(ebugged)'. The code worked reliably in many typical configurations and the user base was happy. Alan clearly had ideas and skills of his own to contribute to the project and many discussions relating to the direction the NET-2 code was heading ensued. There developed two distinct schools within the Linux networking community, one that had the philosophy of `make it work first, then make it better' and the other of `make it better first'. Linus ultimately arbitrated and offered his support to Alan's development efforts and included Alan's code in the standard kernel source distribution. This placed Fred in a difficult position. Any continued development would lack the large user base actively using and testing the code and this would mean progress would be slow and difficult. Fred continued to work for a short time and eventually stood down and Alan came to be the new leader of the Linux networking kernel development effort. --> Alan Cox<tt/<iialan@www.linux.uk.org>/がこの状況を解決する方法を提 案しました。彼は Fred の NET-2 コードを引きとり、デバッグして、信頼性 と安定性を高めてせっかちなユーザに提供しました。そうやって Fred の負担 を減らし、彼が本来の仕事を続けられるようにしました。Alan はこれをうま くやり、彼の作ったネットワークコードは `Net-2D(ebugged)' と呼ばれまし た。このコードはほとんどの設定で安定して動作し、多くのユーザはこのコー ドに満足しました。Alan にはネットワーク機能を開発していく計画に貢献す るだけの独自のアイデアと技術力があり、彼を中心に NET-2 コードの開発方 針について多くの議論がなされました。その結果、Linux のネットワーク界に 2 つの流れが生まれることになりました。一つは「まず動くものを作って、そ の後改善していこう」と考える人たち、もう一つは「最初から良いものを作ろ う」と考える人たちでした。最終的には Linus が判断をして、Alan の開発し たコードを標準のカーネルに組み込みました。その結果、Fred の立場は難しく なりました。彼が開発した新機能をテストしてくれるユーザの絶対数は少な くなり、開発のテンポも遅れ、しだいに開発そのものが難しくなっていきまし た。Fred はその後もしばらくは開発を続けていましたが次第に開発から手を 引き、Alan が Linux のネットワーク機能の開発者の新しいリーダーになりま した。 <p> <!--O Donald Becker <tt><becker@cesdis.gsfc.nasa.gov></tt> soon revealed his talents in the low level aspects of networking and produced a huge range of ethernet drivers, nearly all of those included in the current kernels were developed by Donald. There have been other people that have made significant contributions, but Donald's work is prolific and so warrants special mention. --> そのころ、Donald Becker<tt><becker@cesdis.gsfc.nasa.gov></tt>がハー ドウェアレベルのドライバの開発者としての頭角を現わし、多数のイーサネッ ト用ドライバを開発しました。現在のカーネルに組み込まれているネットワー クカード用ドライバのほとんどは彼が開発したものです。もちろん彼以外にも 重要な貢献をした人はいますが、Donald の素晴しい仕事は特に言及に値する ものでしょう。 <p> <!--O Alan continued refining the NET-2-Debugged code for some time while working on progressing some of the matters that remained unaddressed on the `TODO' list. By the time the Linux <tt/1.3.*/ kernel source had grown its teeth the kernel networking code had migrated to the NET-3 release on which current versions are based. Alan worked on many different aspects of the networking code and with the assistance of a range of other talented people from the Linux networking community grew the code in all sorts of directions. Alan produced dynamic network devices and the first standard AX.25 and IPX implementations. Alan has continued tinkering with the code, slowly restructuring and enhancing it to the state it is in today. --> Alan はその後も NET-2-Debugged コードの改善を進めるとともに、`TODO' リス トに載ったまま残されていたさまざまな仕事にも取り組みました。Linux <tt>1.3.*</tt> のカーネルが公開され始めたころ、カーネルのネットワー クコードは現在のバージョンである NET-3 へと移行しました。Alan は、 Linux のネットワークコミュニティにいる多数の才能ある人々の助けを借りな がら、多くの機能を開発していきました。彼は動的なネットワークデバイスや AX.25 の最初のスタンダード、IPX 機能などを開発しました。彼はその後もネッ トワークコードを修正し続け、ゆっくりと再構築と機能強化につとめて現在の 状況に達しました。 <p> <!--O PPP support was added by Michael Callahan <tt/<callahan@maths.ox.ac.uk>/ and Al Longyear <tt/<longyear@netcom.com>/ this too was critical to increasing the number of people actively using linux for networking. --> PPP の機能は Michael Callahan<tt/<callahan@maths.ox.ac.uk>/と Al Longyear<tt/<longyear@netcom.com>/が組み込みました。この機能も、多 数の人々が Linux をネットワーク接続に使う際に重要な役割を果しました。 <p> <!--O Jonathon Naylor <tt/<jsn@cs.nott.ac.uk>/ has contributed by significantly enhancing Alan's AX.25 code, adding NetRom and Rose protocol support. The AX.25/NetRom/Rose support itself is quite significant, because no other operating system can boast standard native support for these protocols beside Linux. --> Jonathon Naylor <tt/<jsn@cs.nott.ac.uk>/ は Alan の AX.25 コードを 引き継いでさまざまな機能を強化し、NetRom プロトコルと Rose プロトコル もサポートしました。 この AX.25/NetRom/Rose のサポートはとても重要です。なぜなら、これらの プロトコルを標準的にサポートしていると胸を張れる OS は Linux 以外に存 在しないからです。 <p> <!--O There have of course been hundreds of other people who have made significant contribution to the development of the Linux networking software. Some of these you will encounter later in the technology specific sections, other people have contributed modules, drivers, bug-fixes, suggestions, test reports and moral support. In all cases each can claim to have played a part and offered what they could. The Linux kernel networking code is an excellent example of the results that can be obtained from the Linux style of anarchic development, if it hasn't yet surprised you, it is bound to soon enough, the development hasn't stopped. --> もちろん、ここで紹介した人以外にも何百人もの人々が Linux のネットワー クソフトウェアを開発する中で重要な役割を果してきました。彼らの何人かは 後述のそれぞれの技術の詳細に関する節で紹介することになるでしょう。 その他、モジュール化や各種のドライバの開発、バグの修正、新しい機能の提 案、テストレポート、精神的な支援をしてきた多数の人々がいます。その全 ての人が、「自分は自分の役割を果し、自分に可能なことをしてきただけ」、 と言うことでしょう。Linux カーネルのネットワークコードは Linux 風のア ナーキーな開発がどのような結果をもたらすかの優れた実例です。今までの話 に驚かなかった人でも、これからの発展にはきっと驚くはずです。開発は現在も 続いているのですから。 <!-- ==================================================================== --> <!--O <sect1><heading>Linux Networking Resources. --> <sect1><heading>Linux のネットワーク機能についての情報源 <p> <!--O There are a number of places where you can find good information about Linux networking. --> Linux のネットワーク機能についての情報はさまざまなところから入手できま す。 <p> <!--O There are a wealth of Consultants available. A listing can be found at <htmlurl url="http://www.linuxports.com/" name="LinuxPorts Consultants Database"> --> コンサルタント業者がたくさんあります。そのリストは <url url="http://www.linuxports.com/" name="LinuxPorts Consultants Database"> から入手できます。 <p> <!--O Alan Cox, the current maintainer of the Linux kernel networking code maintains a world wide web page that contains highlights of current and new developments in linux Networking at: <htmlurl url="http://www.uk.linux.org/NetNews.html" name="www.uk.linux.org">. --> 現在の Linux カーネルのネットワークコードのメンテナンスをしている Alan Cox はネットワーク機能の現状と今後について紹介したページを公開しています: <url url="http://www.uk.linux.org/NetNews.html" name="www.uk.linux.org"> <p> <!--O Another good place is a book written by Olaf Kirch entitled the <tt/Network Administrators Guide/. It is a work of the <htmlurl url="http://www.linuxdoc.org/" name="Linux Documentation Project"> and you can read it interactively at <htmlurl url="http://metalab.unc.edu/LDP/LDP/nag/nag.html" name="Network Administrators Guide HTML version"> or you can obtain it in various formats by ftp from the <htmlurl url="ftp://metalab.unc.edu/pub/Linux/docs/LDP/network-guide/" name="metalab.unc.edu LDP ftp archive">. Olaf's book is quite comprehensive and provides a good high level overview of network configuration under linux. --> もう一つお勧めの情報源は Olaf Kirch が書いた <tt>Network Administrators Guide</tt> です。この文書は <url url="http://www.linuxdoc.org/" name="Linux Documentation Project"> の成果の一つで、 <url url="http://metalab.unc.edu/LDP/LDP/nag/nag.html" name="Network Administrators Guide HTML version"> を使えばインタラクティブに読むことができます。その他、さまざまな形式に変換した バージョンを <url url="ftp://metalab.unc.edu/pub/Linux/docs/LDP/network-guide/" name="metalab.unc.edu LDP ftp archive"> から入手できます。 Olaf の著書はわかりやすく書かれており、Linux におけるネットワーク関係 の設定を、十分高いレベルで概説しています。 <p> <!--O There is a newsgroup in the Linux news hierarchy dedicated to networking and related matters, it is: <htmlurl url="news:comp.os.linux.networking" name="comp.os.linux.networking"> --> Linux のネットワーク機能について論じるニュースグループもあります。 <htmlurl url="news:comp.os.linux.networking" name="comp.os.linux.networking"> です。 [訳注: 日本語のニュースグループとしては <htmlurl url="news:fj.os.linux.networking" name="fj.os.linux.networking"> があります] <p> <!--O There is a mailing list to which you can subscribe where you may ask questions relating to Linux networking. To subscribe you should send a mail message: --> Linux のネットワーク機能について質問できるメーリングリストもあります。 このメーリングリストに参加するには、以下のようなメールを送ってください。 <tscreen><verb> To: majordomo@vger.rutgers.edu Subject: anything at all Message: subscribe linux-net </verb></tscreen> <p> <!--O On the various IRC networks there are often <tt/#linux/ channels on which people will be able to answer questions on linux networking. --> IRC にもさまざまなチャンネルがありますが、<tt>#linux</tt> チャンネ ルには Linux のネットワークに関する質問に答えてくれる人が多数います。 <p> <!--O Please remember when reporting any problem to include as much relevant detail about the problem as you can. Specifically you should specify the versions of software that you are using, especially the kernel version, the version of tools such as <em/pppd/ or <em/dip/ and the exact nature of the problem you are experiencing. This means taking note of the exact syntax of any error messages you receive and of any commands that you are issuing. --> 何か問題を報告する際には、関係する情報を可能な限り付属させることをお忘 れなく。使っているソフトウェアのバージョン、特にカーネルのバージョンや <em>pppd</em> や <em>dip</em> のバージョンは必須です。加えて、問題の本 質をきちんと報告してください。そのためには、出力されたエラーメッセージ を正確に記録し、どのようなコマンドを実行したかを詳しく記録しておきましょう。 <!-- ==================================================================== --> <!--O <sect1><heading>Where to get some non-linux-specific network information. --> <sect1><heading>Linux 限定でないネットワークに関する情報源 <p> <!--O If you are after some basic tutorial information on tcp/ip networking generally, then I recommend you take a look at the following documents: --> TCP/IP ネットワークについての全般的な知識を得たいならば、以下の文書を 読んでみることをお勧めします: <descrip> <!--O <p><tag>tcp/ip introduction</tag> this document comes as both a <htmlurl url="ftp://athos.rutgers.edu/runet/tcp-ip-intro.doc" name="text version"> and a <htmlurl url="ftp://athos.rutgers.edu/runet/tcp-ip-intro.ps" name="postscript version">. --> <p><tag>TCP/IP 入門(tcp/ip introduction)</tag> この文書は <url url="ftp://athos.rutgers.edu/runet/tcp-ip-intro.doc" name="テキスト版"> あるいは <url url="ftp://athos.rutgers.edu/runet/tcp-ip-intro.ps" name="Postscript 版"> を入手可能です。 <!--O <p><tag>tcp/ip administration </tag> this document comes as both a <htmlurl url="ftp://athos.rutgers.edu/runet/tcp-ip-admin.doc" name="text version"> and a <htmlurl url="ftp://athos.rutgers.edu/runet/tcp-ip-admin.ps" name="postscript version">. --> <p><tag>TCP/IP の管理(tcp/ip administration)</tag> この文書も <url url="ftp://athos.rutgers.edu/runet/tcp-ip-admin.doc" name="テキスト版"> と <url url="ftp://athos.rutgers.edu/runet/tcp-ip-admin.ps" name="Postscript 版"> があります。 </descrip> <!--O <p>If you are after some more detailed information on tcp/ip networking then I highly recommend: --> <p>TCP/IP ネットワークについて、より詳細な情報を知りたい場合は、次の書籍 が非常にお勧めです。 <!--O <quote><em>Internetworking with TCP/IP, Volume 1: principles, protocols and architecture</em>, by Douglas E. Comer, ISBN 0-13-227836-7, Prentice Hall publications, Third Edition, 1995.</quote> --> <quote><em>Internetworking with TCP/IP, Volume 1: principles, protocols and architecture</em>, by Douglas E. Comer, ISBN 0-13-227836-7, Prentice Hall publications, Third Edition, 1995</quote> <!--O If you are wanting to learn about how to write network applications in a Unix compatible environment then I also highly recommend: --> Unix 互換の環境でネットワーク機能を使ったアプリケーションを書くために は以下の書籍が参考になるでしょう。 <!--O <quote><em>Unix Network Programming</em>, by W. Richard Stevens, ISBN 0-13-949876-1, Prentice Hall publications, 1990.</quote> --> <quote><em>Unix Network Programming</em>, by W. Richard Stevens, ISBN 0-13-949876-1, Prentice Hall publications, 1990</quote> <!--O A second edition of this book is appearing on the bookshelves; the new book is made up of three volumes: check <htmlurl url="http://www.phptr.com/" name="Prenice-Hall's web site"> to probe further. --> この本の第2版ももうすぐ出版されます。新しい版は 3 分冊になります。詳しくは <url url="http://www.phptr.com/" name="Prenice-Hall のウェブサイト"> で調べてください。 <!--O <p>You might also try the <htmlurl url="news:comp.protocols.tcp-ip" name="comp.protocols.tcp-ip"> newsgroup. --> <p><htmlurl url="news:comp.protocols.tcp-ip" name="comp.protocols.tcp-ip"> も見るとよいでしょう。 <!--O <p>An important source of specific technical information relating to the Internet and the tcp/ip suite of protocols are RFC's. RFC is an acronym for `Request For Comment' and is the standard means of submitting and documenting Internet protocol standards. There are many RFC repositories. Many of these sites are ftp sites and other provide World Wide Web access with an associated search engine that allows you to search the RFC database for particular keywords. --> <p>インターネットと TCP/IP プロトコル群に関する特定の技術的な情報について は RFC が重要です。RFC とは `Request For Comment' の略で、インターネッ トで標準的に使われているプロトコルについて定義したものになっています。 RFC は多くの ftp サイトに保存されており、何らかのサーチエンジンを使っ てキーワードから RFC のデータベースを検索できるような WWW のページもあ ります。 <!--O <p>One possible source for RFC's is at <htmlurl url="http://pubweb.nexor.co.uk/public/rfc/index/rfc.html" name="Nexor RFC database">. --> <p>RFC に関するページとしては、 <url url="http://pubweb.nexor.co.uk/public/rfc/index/rfc.html" name="Nexor RFC database"> を紹介しておきます。 <!--######################################################################--> <!--O <sect><heading>Generic Network Configuration Information. --> <sect><heading>ネットワークの設定に関する一般的な情報 <p> <!--O The following subsections you will pretty much need to know and understand before you actually try to configure your network. They are fundamental principles that apply regardless of the exact nature of the network you wish to deploy. --> 以下の節では実際にネットワークを設定する前に知っておいた方がよいことに ついてまとめておきます。これらは最も基本となる原理で、あなたが実際に 張ろうとしているネットワークの実際の種類によらず、全てのネットワークに 適用されます。 <!-- ==================================================================== --> <!--O <sect1><heading>What do I need to start ? --> <sect1><heading>何から始めるか? <p> <!--O Before you start building or configuring your network you will need some things. The most important of these are: --> ネットワークを構築したり設定したりする前に用意しておくべき ものがいくつかあります。まず最も重要なものから。 <!-- ==================================================================== --> <!--O <sect2><heading>Current Kernel source(Optional). --> <sect2><heading>最新のカーネルソース(なくてもかまいません) <!--O <p>Please note: --> <p>以下の点に注意してください: <p> <!--O The majority of current distributions come with networking enabled, therefore it may not be required to recompile the kernel. If you are running well known hardware you should be just fine. For example: 3COM NIC, NE2000 NIC, or a Intel NIC. However if you find yourself in the position that you do need to update the kernel, the following information is provided. --> 最近のディストリビューションのほとんどにはネットワーク機能を有効にした カーネルが付属 しているので、カーネルを再コンパイルする必要はないと思います。よく知ら れているハードウェアを使っていればうまく動作するはずです。例えば 3COM の NIC や NE2000 の NIC, Intel の NIC などです。しかし、カーネルを更 新する必要がある状況になった場合には、以下の手順をご覧ください。 <p> <!--O Because the kernel you are running now might not yet have support for the network types or cards that you wish to use you will probably need the kernel source so that you can recompile the kernel with the appropriate options. --> 現在お使いのカーネルには、おそらく使いたいネットワークに機能のサポートや 使いたいネットワークカード用のドライバが組み込まれていないのでしょう。 カーネルのソースを入手して、適切なオプションを指定し、カーネルを再構築する 必要があるでしょう。 <p> <!--O For users of the major distributions such as Redhat, Caldera, Debian, or Suse this no longer holds true. As long as you stay within the mainstream of hardware there should be no need to recompile your kernel unless there is a very specific feature that you need. --> ただし、これは RedHat, Caldera, Debian, SuSE といったメジャーな ディストリビューションを使っている場合にはもはや当てはまりません。一般 的なハードウェアを使っている限りは、ごく特殊な機能を使わなければカーネル を再コンパイルする必要はないはずです。 <!--O <p>You can always obtain the latest kernel source from <htmlurl url="ftp://ftp.cdrom.com/pub/linux/sunsite/kernel.org/pub/linux/kernel" name="ftp.cdrom.com">. This is not the official site but they have LOTS of bandwidth and ALOT of users allowed. The official site is kernel.org but please use the above if you can. Please remember that ftp.kernel.org is seriously overloaded. Use a mirror. --> <p>最新のカーネルは常に <url url="ftp://ftp.cdrom.com/pub/linux/sunsite/kernel.org/pub/linux/kernel" name="ftp.cdrom.com"> から入手できます。これは公式サイトではありませんが、<em/大きい/帯域幅 を持ち、<em/たくさんの/ユーザを受け入れることができます。公式サイトは kernel.org ですが、できるだけ ftp.cdrom.com を使ってください。 ftp.kernel.org は非常に負荷が高い状態です。ミラーサイトを使ってください。 <!-- NAKANO: 日本だと ftp.jp.kernel.org が良いでしょうか --> [訳注: 日本では <url url="ftp://ftp.jp.kernel.org/" name="ftp.jp.kernel.org"> を利用するとよいでしょう] <!--O <p>Normally the kernel source will be untarred into the <tt>/usr/src/linux</tt> directory. For information on how to apply patches and build the kernel you should read the <htmlurl url="Kernel-HOWTO.html" name="Kernel-HOWTO">. For information on how to configure kernel modules you should read the ``Modules mini-HOWTO''. Also, the <tt>README</tt> file found in the kernel sources and the <tt>Documentation</tt> directory are very informative for the brave reader. --> <p>通常カーネルのソースは <tt>/usr/src/linux</tt> ディレクトリに展開し ます。パッチの当て方やカーネルの構築方法については <url url="Kernel-HOWTO.html" name="Kernel-HOWTO"> を読んでください。 カーネルモジュールの設定方法については ``Modules mini-HOWTO'' をご覧ください。また、カーネルソースと <tt>Documentation</tt> ディレクトリに入っている <tt>README</tt> ファイルは、気合いの入った読者には非常に有益な情報が書かれています。 <!--O <p>Unless specifically stated otherwise, I recommend you stick with the standard kernel release (the one with the even number as the second digit in the version number). Development release kernels (the ones with the odd second digit) may have structural or other changes that may cause problems working with the other software on your system. If you are uncertain that you could resolve those sorts of problems in addition to the potential for there being other software errors, then don't use them. --> <p>特別に言及しない限り、安定版のカーネルを使うことをお勧めします (バージョン番号の 2 つめの数字が偶数のバージョンです)。開発版のカーネル (2 つめの数字が奇数のバージョン)は内部構造が大きく変わっていたり、その 他さまざまな変更が行なわれているため、今まで動いていたソフトウェアがう まく動かないかもしれません。自分でそれらの問題を解決したり、それらの ソフトウェアに潜む問題を解決できないのであれば、開発版のカーネルは使わ ないほうがいいでしょう。 <!--O <p>On the other hand, some of the features described here have been introduced during the development of 2.1 kernels, so you must take your choice: you can stick to 2.0 while wait for 2.2 and an updated distribution with every new tool, or you can get 2.1 and look around for the various support programs needed to exploit the new features. As I write this paragraph, in August 1998, 2.1.115 is current and 2.2 is expected to appear pretty soon. --> <p>その一方、この文書で説明する機能の一部はバージョン 2.1 のカーネルの 開発段階で導入されたものです。そこで選ばなければなりません: 2.2 カーネルと全てのツールが更新されたディストリビューションを待って 2.0 に留まるか、2.1 を入手し、その新機能を利用するのに必要な各種 補助プログラムを探し回るかです。この節を書いている 1998 年 8 月の時点 では、2.1.115 が最新バージョンで、じきに 2.2 が出るものと考えられてい ます。 <!-- ==================================================================== --> <!--O <sect2><heading>Current Network tools. --> <sect2><heading>最新のネットワークツール <p> <!--O The network tools are the programs that you use to configure linux network devices. These tools allow you to assign addresses to devices and configure routes for example. --> ネットワークツールとは、Linux のネットワークデバイスを設定するためのプ ログラムです。これらのプログラムを用いてネットワークデバイスにアドレス を割り当てたり、経路情報を設定したりします。 <p> <!--O Most modern linux distributions are supplied with the network tools, so if you have installed from a distribution and haven't yet installed the network tools then you should do so. --> 最近の Linux ディストリビューションには、大抵ネットワークツールも含ま れています。ですから、システムはディストリビューションからインストール していて、ネットワークツールはまだインストールしていないようなら、 インストールしてください。 <p> <!--O If you haven't installed from a distribution then you will need to source and compile the tools yourself. This isn't difficult. --> ディストリビューションを使わずにシステムを構築した場合には、ネットワー クツールはソースコードを入手してコンパイルする必要があります。しかし、 これはそんなに難しい作業ではありません。 <p> <!--O The network tools are now maintained by Bernd Eckenfels and are available at: --> <!-- NOTE: last checked fron RH-5.1, aug 98 --> <!--O <htmlurl url="ftp://ftp.inka.de/pub/comp/Linux/networking/NetTools/" name="ftp.inka.de"> and are mirrored at: <htmlurl url="ftp://ftp.uk.linux.org/pub/linux/Networking/base/" name="ftp.uk.linux.org">. --> ネットワークツールは Bernd Eckenfels がメンテナンスしており、 <url url="ftp://ftp.inka.de/pub/comp/Linux/networking/NetTools/" name="ftp.inka.de"> から入手可能です。ここは <url url="ftp://ftp.uk.linux.org/pub/linux/Networking/base/" name="ftp.uk.linux.org"> にミラーされています。 <p> <!--O You can also get the latest RedHat packages from <htmlurl url="ftp://ftp.cdrom.com/pub/linux/redhat/redhat-6.0/i386/base/" name="net-tools-1.51-3.i386.rpm">n --> また、RedHat の最新パッケージを <url url="ftp://ftp.cdrom.com/pub/linux/redhat/redhat-6.0/i386/base/" name="net-tools-1.51-3.i386.rpm"> から入手できます。 <p> <!--O Be sure to choose the version that is most appropriate for the kernel you wish to use and follow the instructions in the package to install. --> お使いのカーネルのバージョンにあったバージョンを入手して、インストール の際は付属の文書の指示に従ってください。 <p> <!--O To install and configure the version current at the time of the writing you need do the following: --> この文書を執筆している時点での最新版のネットワークツールをコンパイル してインストールするには以下のようにします: <tscreen><verb> user% tar xvfz net-tools-1.33.tar.gz user% cd net-tools-1.33 user% make config user% make root# make install </verb></tscreen> <p> <!--O Or to use the Redhat packahges: --> RedHat のパッケージを使う場合には以下のようにします: <p> <tscreen<verb> root# rpm -U net-tools-1.51-3.i386.rpm </verb></tscreen> <p> <!--O Additionally, if you intend configuring a firewall or using the IP masquerade feature you will require the <em>ipfwadm</em> command. The latest version of it may be obtained from: <htmlurl url="ftp:/ftp.xos.nl/pub/linux/ipfwadm" name="ftp.xos.nl">. Again there are a number of versions available. Be sure to pick the version that most closely matches your kernel. Note that the firewalling features of Linux changed during 2.1 development and has been superceded by <em>ipchains</em> in v2.2 of the kernel. <em>ipfwadm</em> only applies to version 2.0 of the kernel. The following are known to be distributions with version 2.0 or below of the kernel. --> さらに、ファイアウォールを設定したり、IP マスカレード機能を使いたい場合は、 <em>ipfwadm</em> コマンドも必要です。<tt>ipfwadm</tt> の最新版は <url url="ftp://ftp.xos.nl/pub/linux/ipfwadm" name="ftp.xos.nl"> から入手できます。このコマンドにもいくつかのバージョンがあるので、 カーネルのバージョンに合ったものを入手してください。Linux の ファイアウォール機能は 2.1 の開発中に変更され、カーネル 2.2 では <em>ipchains</em> に置き換えられたので注意してください。 <em>ipfwadm</em> はカーネル 2.0 でしか使えません。 以下のディストリビューションには 2.0 以前のカーネルが付属していること がわかっています。 <!--O <tscreen><verb> Redhat 5.2 or below Caldera pre version 2.2 Slackware pre version 4.x Debian pre version 2.x </verb></tscreen> --> <tscreen><verb> Redhat 5.2 以前 Caldera 2.2 より前のバージョン Slackware 4.x より前のバージョン Debian 2.x より前のバージョン </verb></tscreen> <p> <!--O To install and configure the version current at the time of this writing you need to read the IPChains howto located at <htmlurl url="http://www.linuxdoc.org/" name="The Linux Documentation Project"> --> この文書の執筆時点での最新版をインストールするには、 <url url="http://www.linuxdoc.org/" name="The Linux Documentation Project"> にある IPChains HOWTO を読んでください。 <!--O <p>Note that if you run version 2.2 (or late 2.1) of the kernel, <em/ipfwadm/ is not the right tool to configure firewalling. This version of the NET-3-HOWTO currently doesn't deal with the new firewalling setup. If you need more detailed information on ipchains please refer to the above. --> <p>バージョン 2.2(または 2.1 後期)のカーネルを使っている場合は、 <em/ipfwadm/ はファイアウォールの設定を行うための正しいプログラムでは ありません。このバージョンの NET-3-HOWTO では今のところファイアウォール の新しい設定方法は扱いません。ipchains に関する詳しい情報が必要ならば、 先に紹介した HOWTO を見てください。 <!-- FIXME: new firewall tools --> <!-- ==================================================================== --> <!--O <sect2><heading>Network Application Programs. --> <sect2><heading>各種ネットワーク用アプリケーションプログラム <!--O <p> The network application programs are programs such as <em>telnet</em> and <em>ftp</em> and their respective server programs. David Holland has been managing a distribution of the most common of these, which is now maintained by <tt/netbug@ftp.uk.linux.org/. You may obtain the distribution from: <htmlurl url="ftp://ftp.uk.linux.org/pub/linux/Networking/base" name="ftp.uk.linux.org">. --> <p>ネットワークアプリケーションプログラムとは、<em>telnet</em> や <em>ftp</em> などと、それらのサーバプログラムのことです。これらの大部 分は、以前は David Holland がメンテナンスしていましたが、現在は <tt/netbug@ftp.uk.linux.org/ がメンテナンスしています。配布物は <url url="ftp://ftp.uk.linux.org/pub/linux/Networking/base" name="ftp.uk.linux.org"> から入手可能です。 <!-- ==================================================================== --> <!--O <sect2><heading>IP Addresses, an Explanation. --> <sect2><heading>IP アドレスの説明 <p> <!--O Internet Protocol Addresses are composed of four bytes. The convention is to write addresses in what is called `dotted decimal notation'. In this form each byte is converted to a decimal number (0-255) dropping any leading zero's unless the number is zero and written with each byte separated by a `.' character. By convention each interface of a host or router has an IP address. It is legal for the same IP address to be used on each interface of a single machine in some circumstances but usually each interface will have its own address. --> インターネットプロトコル用のアドレスは 4 バイトから構成されています。 アドレスは「ドット区切りの 10 進表記」で表示するのが普通です。この書き 方では、それぞれのバイトを 10 進数(0-255)に変換し、頭の 0 は省略し、各 バイトを `.' で区切って示します。通常、ホストやルータの持つ ネットワークインターフェイスそれぞれに 1 つの IP アドレスを割り当てます。目 的によっては、一台のマシンの複数のポートに同じ IP アドレスを付けること も可能ですが、複数のインターフェイスには、それぞれ独自の IP アドレスを 付けるのが普通です。 <p> <!--O Internet Protocol Networks are contiguous sequences of IP addresses. All addresses within a network have a number of digits within the address in common. The portion of the address that is common amongst all addresses within the network is called the `network portion' of the address. The remaining digits are called the `host portion'. The number of bits that are shared by all addresses within a network is called the netmask and it is role of the netmask to determine which addresses belong to the network it is applied to and which don't. For example, consider the following: --> インターネットプロトコルで構成されたネットワークは、一連の IP アドレス が集まって構成されています。1つのネットワークの IP アドレスには共通 部分が必要です。1つのネットワーク全体に共通なアドレスの部分 をアドレスの「ネットワーク部」と呼びます。残りの部分を「ホスト部」と呼 びます。1つのネットワークの中で共通しているネットワークアドレス分のビッ ト数をネットマスクと呼び、アドレスのうちどこまでがネットワーク部で、ど こからがホスト部かを定義しています。例えば、以下のような場合を考えてく ださい。 <!-- <tscreen><verb> ================= =============== Host Address 192.168.110.23 Network Mask 255.255.255.0 Network Portion 192.168.110. Host portion .23 ================= =============== Network Address 192.168.110.0 Broadcast Address 192.168.110.255 ================= =============== </verb></tscreen> --> <verb> ----------------- --------------- ホストアドレス 192.168.110.23 ネットワークマスク 255.255.255.0 ネットワーク部 192.168.110. ホスト部 .23 ----------------- --------------- ネットワークアドレス 192.168.110.0 ブロードキャストアドレス 192.168.110.255 ----------------- --------------- </verb> <p> <!--O Any address that is 'bitwise anded' with its netmask will reveal the address of the network it belongs to. The network address is therefore always the lowest numbered address within the range of addresses on the network and always has the host portion of the address coded all zeroes. --> ホストに付けられたアドレスのうち、ネットマスクとビットごとに論理積(AND)を取っ たものがネットワークアドレスになります。すなわち、ネットワークアドレス は、それぞれのネットワークに割り当てられたアドレスの最小のものになりま す。つまり、ネットワークアドレスはアドレスのホスト部を全て 0 にした ものです。 <p> <!--O The broadcast address is a special address that every host on the network listens to in addition to its own unique address. This address is the one that datagrams are sent to if every host on the network is meant to receive it. Certain types of data like routing information and warning messages are transmitted to the broadcast address so that every host on the network can receive it simultaneously. There are two commonly used standards for what the broadcast address should be. The most widely accepted one is to use the highest possible address on the network as the broadcast address. In the example above this would be <tt>192.168.110.255</tt>. For some reason other sites have adopted the convention of using the network address as the broadcast address. In practice it doesn't matter very much which you use but you must make sure that every host on the network is configured with the same broadcast address. --> ネットワークに接続されているホストは自分自身のアドレスに送られたパケッ トを受けとりますが、それ以外にも「ブロードキャストアドレス」という特別 に設定されたアドレスに送られたパケットも受けとります。ブロードキャスト アドレスは、ネットワーク上にいる全てのホストにパケットを送りたい場合に 利用する特別のアドレスです。経路情報や各種の警告メッセージなどはブロー ドキャストアドレスへ送出され、ネットワーク上にいる全てのホストが同時に 受けとることができます。ブロードキャストアドレスはそのネットワークで利 用可能な最大の IP アドレスにすることが慣例になっています。例えば、上記 の例ではブロードキャストアドレスは <tt>192.168.110.255</tt> になってい ます。何らかの理由からネットワークアドレスとブロードキャストアドレスを 同じにしているサイトがあるかもしれません。実用上はどちらにしておいても 大差はありませんが、ネットワーク上の全てのホストは同じブロードキャスト アドレスを使わなければなりません。 <p> <!--O For administrative reasons some time early in the development of the IP protocol some arbitrary groups of addresses were formed into networks and these networks were grouped into what are called classes. These classes provide a number of standard size networks that could be allocated. The ranges allocated are: --> IP プロトコルの開発の早期の段階で、管理上の理由から、いくつか の IP 番号のグループがネットワークを構成するようになり、またこれらの ネットワークがグループ分けされて、いわゆる「クラス」へと発展しました。 IP アドレスにおけるクラスはそのネットワークで 使用できるホストの数を決定します。ネットワークのクラスは以下のように分 けられています。 <!--O <tscreen><verb> ========================================================== | Network | Netmask | Network Addresses | | Class | | | ========================================================== | A | 255.0.0.0 | 0.0.0.0 - 127.255.255.255 | | B | 255.255.0.0 | 128.0.0.0 - 191.255.255.255 | | C | 255.255.255.0 | 192.0.0.0 - 223.255.255.255 | |Multicast| 240.0.0.0 | 224.0.0.0 - 239.255.255.255 | ========================================================== </verb></tscreen> --> <tscreen><verb> --------------------------------------------------------------- |ネットワーク | ネットマスク | ネットワークアドレス | | のクラス | | | --------------------------------------------------------------- | A | 255.0.0.0 | 0.0.0.0 - 127.255.255.255 | | B | 255.255.0.0 | 128.0.0.0 - 191.255.255.255 | | C | 255.255.255.0 | 192.0.0.0 - 223.255.255.255 | |マルチキャスト| 240.0.0.0 | 224.0.0.0 - 239.255.255.255 | --------------------------------------------------------------- </verb></tscreen> <p> <!--O What addresses you should use depends on exactly what it is that you are doing. You may have to use a combination of the following activities to get all the addresses you need: --> どのような IP アドレスを使うかは何をしたいかに依存します。以下に示す ような作業を組みあわせて、必要なアドレスを決めてください。 <descrip> <!--O <p><tag>Installing a linux machine on an existing IP network</tag>If you wish to install a linux machine onto an existing IP network then you should contact whoever administers the network and ask them for the following information: --> <p><tag>既存のIPネットワークにLinuxマシンをインストールする場合</tag> 既存のIPネットワークにLinuxマシンを接続したい場合、ネットワークの管理 者に相談して以下の情報を教えてもらってください: <!-- <itemize> <item>Host IP Address <item>IP network address <item>IP broadcast address <item>IP netmask <item>Router address <item>Domain Name Server Address </itemize> --> <itemize> <item>ホストの IP アドレス <item>ネットワークアドレス <item>ブロードキャストアドレス <item>ネットマスク <item>ルータのアドレス <item>ドメインネームサーバのアドレス </itemize> <!--O You should then configure your linux network device with those details. You can not make them up and expect your configuration to work. --> これらの情報を使ってあなたのLinuxマシンのネットワークデバイスを設定し ます。正しい設定をしない限りネットワークは使えません。 <!--O <p><tag>Building a brand new network that will never connect to the Internet</tag> If you are building a private network and you never intend that network to be connected to the Internet then you can choose whatever addresses you like. However, for safety and consistency reasons there have been some IP network addresses that have been reserved specifically for this purpose. These are specified in RFC1597 and are as follows: --> <p><tag>インターネットへ接続しないネットワークを新しく構築する場合</tag> インターネットへ接続する予定の無いプライベートなネットワークを構築する 場合、どのような IP アドレスを使っても構いません。しかしながら、このよ うなネットワークに使うべき IP アドレスは予め決められています。以 下に示すアドレスを使えば、インターネットとはパケットをやりとりできない ため、誤ってインターネットに接続してしまっても安全です。RFC1597では以 下のアドレスがプライベートネットワーク用に割り当てられています。 <!--O <tscreen><verb> =========================================================== | RESERVED PRIVATE NETWORK ALLOCATIONS | =========================================================== | Network | Netmask | Network Addresses | | Class | | | =========================================================== | A | 255.0.0.0 | 10.0.0.0 - 10.255.255.255 | | B | 255.255.0.0 | 172.16.0.0 - 172.31.255.255 | | C | 255.255.255.0 | 192.168.0.0 - 192.168.255.255 | =========================================================== </verb></tscreen> --> <tscreen><verb> -------------------------------------------------------------- | プライベートネットワーク用に予約されたアドレス | -------------------------------------------------------------- |ネットワーク| ネットマスク | ネットワークアドレス | | のクラス | | | -------------------------------------------------------------- | A | 255.0.0.0 | 10.0.0.0 - 10.255.255.255 | | B | 255.255.0.0 | 172.16.0.0 - 172.31.255.255 | | C | 255.255.255.0 | 192.168.0.0 - 192.168.255.255 | -------------------------------------------------------------- </verb></tscreen> <!--O You should first decide how large you want your network to be and then choose as many of the addresses as you require. --> プライベートネットワーク用のアドレスもクラスごとに用意されているので、 まず構築したいネットワークの規模を考えて、それにふさわしい規模のクラス の IP アドレスを使ってください。 </descrip> <!-- ==================================================================== --> <!--O <sect1><heading>Where should I put the configuration commands ? --> <sect1><heading>設定コマンドの置き場所は? <p> <!--O There are a few different approaches to Linux system boot procedures. After the kernel boots, it always executes a program called `<em/init/'. The <em/init/ program then reads its configuration file called <tt>/etc/inittab</tt> and commences the boot process. There are a few different flavours of <em/init/ around, although everyone is now converging to the System V (Five) flavor, developed by Miguel van Smoorenburg. --> Linux の起動方法にはいくつかの流儀があります。カーネルが起動したとき、 まず実行されるのが <em>init</em> と呼ばれるプログラムです。 <em>init</em> は起動されると設定ファイルである <tt>/etc/inittab</tt> を読みこみ、システムの起動作業を実行します。<em>init</em> にはいくつか の種類がありますが、全体としては Miguel van Smoorenburg が開発した System V 系のものに収束しました。 <p> <!--O Despite the fact that the <em/init/ program is always the same, the setup of system boot is organized in a different way by each distribution. --> <em/init/ プログラム自体は同じですが、システムの起動の仕方の設定はディ ストリビューションごとに異なります。 <p> <!--O Usually the <tt>/etc/inittab</tt> file contains an entry looking something like: --> <tt>/etc/inittab</tt> ファイルには、普通は以下のような行があります。 <tscreen><verb> si::sysinit:/etc/init.d/boot </verb></tscreen> <p> <!--O This line specifies the name of the shell script file that actually manages the boot sequence. This file is somewhat equivalent to the <tt/AUTOEXEC.BAT/ file in MS-DOS. --> この行は実際の起動方法を管理するシェルスクリプトを指定しています。この ファイルは MS-DOS の <tt>AUTOEXEC.BAT</tt> と同等の機能を果します。 <p> <!--O There are usually other scripts that are called by the boot script and often the network is configured within one of many of these. --> 通常、他のいくつものスクリプトが boot スクリプトから呼び出されます。 ネットワークの設定も、このようなスクリプトのどれかで行われます。 <p> <!--O The following table may be used as a guide for your system: --> 以下の表にシステムごとの違いをまとめました。 <!--O <tscreen><verb> =========================================================================== Distrib. | Interface Config/Routing | Server Initialization =========================================================================== Debian | /etc/init.d/network | /etc/rc2.d/* =========================================================================== Slackware| /etc/rc.d/rc.inet1 | /etc/rc.d/rc.inet2 =========================================================================== RedHat | /etc/rc.d/init.d/network | /etc/rc.d/rc3.d/* =========================================================================== </verb></tscreen> --> <tscreen><verb> --------------------------------------------------------------------------- ディストリ | インタフェースの設定/経路設定 | サーバの初期化 ビューション| | --------------------------------------------------------------------------- Debian | /etc/init.d/network | /etc/rc2.d/* --------------------------------------------------------------------------- Slackware | /etc/rc.d/rc.inet1 | /etc/rc.d/rc.inet2 --------------------------------------------------------------------------- RedHat | /etc/rc.d/init.d/network | /etc/rc.d/rc3.d/* --------------------------------------------------------------------------- </verb></tscreen> <!--O <p>Note that Debian and Red Hat use a whole directory to host scripts that fire up system services (and usually information does not lie within these files, for example Red Hat systems store all of system configuration in files under <tt>/etc/sysconfig</tt>, whence it is retrieved by boot scripts). If you want to grasp the details of the boot process, my suggestion is to check <em>/etc/inittab</em> and the documentation that accompanies <em>init</em>. Linux Journal is also going to publish an article about system initialization, and this document will point to it as soon as it is available on the web. --> <p>Debian と RedHat はシステムのサービスを起動するスクリプトを ディレクトリ全体を使って管理しています(設定情報は普通、これらのファイルの中 にはありません。例えば RedHat は全てのシステム情報を <tt>/etc/sysconfig</tt> ディレクトリの下に置いており、起動スクリプトは ここから情報を取得します)。起動プロセスを把握したければ、筆者のお勧め は <em>/etc/inittab</em> と <em>init</em> に付属の文書を調べることです。 Linux Journal にもシステムの初期化に関する記事が載る予定です。 この記事が WWW で公開され次第、この文書からもリンクを張ります。 <!--O <p>Most modern distributions include a program that will allow you to configure many of the common sorts of network interfaces. If you have one of these then you should see if it will do what you want before attempting a manual configuration. --> <p>最近のディストリビューションには、一般的なネットワークインターフェイス を設定するためのプログラムは予め含まれています。次に示すような設 定用のプログラムがある場合、手動で設定する前に、これらを使って必要な設 定が可能かチェックしてみてください。 <!-- FIXME: check where the config program lives in Slackw, RH, Deb --> <!--O <tscreen><verb> ========================================= Distrib | Network configuration program ========================================= RedHat | /usr/bin/netcfg Slackware | /sbin/netconfig ========================================= </verb></tscreen> --> <tscreen><verb> ----------------------------------------- ディストリ | ネットワーク設定プログラム ビューション| ----------------------------------------- RedHat | /usr/bin/netcfg Slackware | /sbin/netconfig ----------------------------------------- </verb></tscreen> <!-- ==================================================================== --> <!--O <sect1><heading>Creating your network interfaces. --> <sect1><heading>ネットワークインターフェイスの作成 <p> <!--O In many Unix operating systems the network devices have appearances in the <em>/dev</em> directory. This is not so in Linux. In Linux the network devices are created dynamically in software and do not require device files to be present. --> 多くの Unix では <em>/dev</em> ディレクトリにネットワークデバイス用の スペシャルファイルがありますが、Linux の場合は違います。Linux では ネットワークデバイスはソフトウェアによって動的に作成されるので、 デバイスファイルは不要です。 <p> <!--O In the majority of cases the network device is automatically created by the device driver while it is initializing and has located your hardware. For example, the ethernet device driver creates <tt/eth[0..n]/ interfaces sequentially as it locates your ethernet hardware. The first ethernet card found becomes <tt/eth0/, the second <tt/eth1/ etc. --> ほとんどの場合、ネットワークデバイスは、デバイスドライバがハードウェア を検出して初期化する際に自動的に作成されます。例えばイーサネットデバ イスドライバは、 <tt>eth[0..n]</tt> というインターフェイスを イーサネットハードウェアに順に割り当てていきます。最初に検出された イーサネッカードが <tt>eth0</tt>、次が <tt>eth1</tt> のようになります。 <p> <!--O In some cases though, notably <em/slip/ and <em/ppp/, the network devices are created through the action of some user program. The same sequential device numbering applies, but the devices are not created automatically at boot time. The reason for this is that unlike ethernet devices, the number of active <em/slip/ or <em/ppp/ devices may vary during the uptime of the machine. These cases will be covered in more detail in later sections. --> 例外もいくつかあり (注目すべきは <em>slip</em> と <em>ppp</em>)、 これが使うネットワークデバイスはデバイスドライバではなくユーザプログラ ムが作成します。それぞれのデバイスに付けられる番号は、デバイスドライバ が割り当てるのと同様に順に振られていきますが、起動時にデバイスが自動的 に作成されるということはありません。なぜこのようになっているのかと言う と、イーサネットデバイスとは異なり、<em>slip</em> や <em>ppp</em> デバ イスは、マシンの稼働中に必要な数が変化するからです。詳細については後述 します。 <!-- ==================================================================== --> <!--O <sect1><heading>Configuring a network interface. --> <sect1><heading>ネットワークインターフェイスの設定 <p> <!--O When you have all of the programs you need and your address and network information you can configure your network interfaces. When we talk about configuring a network interface we are talking about the process of assigning appropriate addresses to a network device and to setting appropriate values for other configurable parameters of a network device. The program most commonly used to do this is the <em/ifconfig/ (interface configure) command. --> ネットワークの設定に必要なプログラムと情報が揃ったら、ネットワークインター フェイスの設定を始めましょう。ネットワークインターフェイスの設定とは、 ネットワークデバイスに適切なアドレスを割り当てたり、その他ネットワーク デバイスを設定するための適切な値を指定することです。このためのプログラ ムが<em>ifconfig</em>(interface configure)コマンドです。 <p> <!--O Typically you would use a command similar to the following: --> <tt>ifconfig</tt> は、通常以下のような書式で使います: <tscreen><verb> root# ifconfig eth0 192.168.0.1 netmask 255.255.255.0 up </verb></tscreen> <!--O <p>In this case I'm configuring an ethernet interface `<tt/eth0/' with the IP address `<tt/192.168.0.1/' and a network mask of `<tt/255.255.255.0/'. The `<em/up/' that trails the command tells the interface that it should become active, but can usually be omitted, as it is the default. To shutdown an interface, you can just call ``<tt>ifconfig eth0 down</tt>''. --> <p>この例では、``<tt>eth0</tt>''イーサネットインターフェイスに `<tt>192.168.0.1</tt>' という IP アドレスと `<tt>255.255.255.0</tt>' というネットマスクを設定しています。コマンドの後ろにある `<em>up</em>' はインターフェイスをアクティブにする指定ですが、これはデフォルトの動作 なので、普通は省略できます。インターフェイスを停止させるには、単に ``<tt>ifconfig eth0 down</tt>'' を実行してください。 <p> <!--O The kernel assumes certain defaults when configuring interfaces. For example, you may specify the network address and broadcast address for an interface, but if you don't, as in my example above, then the kernel will make reasonable guesses as to what they should be based on the netmask you supply and if you don't supply a netmask then on the network class of the IP address configured. In my example the kernel would assume that it is a class-C network being configured on the interface and configure a network address of `<tt/192.168.0.0/' and a broadcast address of `<tt/192.168.0.255/' for the interface. --> カーネルはインターフェイスを設定する際、あるデフォルト値を想定します。 例えば、あるインターフェイスに対してネットワークアドレスとブロードキャ ストアドレスを設定できますが、上記の例のようにこれを設定しなかった場合 には、カーネルは指定したネットマスクに基づいて、適切な値を推測します。 ネットマスクを与えなかった場合には、IP アドレスが属するネットワークク ラスに基づいて設定が行われます。上記の例では、このインターフェイスに クラス C のネットワークアドレスが割り当てられたことをカーネルが認識し、 ネットワークアドレスとして `<tt>192.168.0.0</tt>' を、 ブロードキャストアドレスとして `<tt>192.168.0.255</tt> を自動的に割り 当てます。 <!--O <p>There are many other options to the <em/ifconfig/ command. The most important of these are: --> <p><em>ifconfig</em>コマンドで指定できるオプションはいろいろあります。もっ とも重要なものを列挙すると、 <descrip> <!--O <tag/up/this option activates an interface (and is the default). --> <tag/up/ このオプションはインターフェイスを利用可能(アクティブ)にします。 <!--O <tag/down/this option deactivates an interface. --> <tag/down/ このオプションはインターフェイスを停止させます。 <!--O <tag/[-]arp/this option enables or disables use of the address resolution protocol on this interface --> <tag/[-]arp/ このオプションは、このインターフェイスで ARP(Address ResolutionProtocol) を使うかどうかを指定します。 <!--O <tag/[-]allmulti/this option enables or disables the reception of all hardware multicast packets. Hardware multicast enables groups of hosts to receive packets addressed to special destinations. This may be of importance if you are using applications like desktop videoconferencing but is normally not used. --> <tag/[-]allmulti/ このオプションは、全てのハードウェアマルチキャストパケットの受信を有効 にするか無効にするかを指定します。ハードウェアマルチキャストを使うと、 特殊な終点アドレスに向けられたパケットを複数のホストで受け取ることがで きます。デスクトップ用のビデオ会議アプリケーションを使っている場合には このオプションは重要ですが、普通は使われません。 <!--O <tag/mtu N/this parameter allows you to set the <em/MTU/ of this device. --> <tag/mtu N/ このパラメータはデバイスの <em>MTU</em>(Maximum Transfer Unit)を設定し ます。 <!--O <tag/netmask <addr>/this parameter allows you to set the network mask of the network this device belongs to. --> <tag/netmask <アドレス>/ このパラメータはデバイスが接続しているネットワークのネットワークマスク を設定します。 <!--O <tag/irq <addr>/this parameter only works on certain types of hardware and allows you to set the IRQ of the hardware of this device. --> <tag/irq <IRQ 値>/ このパラメータは特定の種類のハードウェアにしか使えませんが、デバイスの ハードウェアの IRQ を設定します。 <!--O <tag/[-]broadcast [addr]/this parameter allows you to enable and set the accepting of datagrams destined to the broadcast address, or to disable reception of these datagrams. --> <tag/[-]broadcast [アドレス]/ このパラメータで、指定したブロードキャストアドレス宛のデータグラ ムを受け取るかどうかを設定できます。 <!--O <tag/[-]pointopoint [addr]/this parameter allows you to set the address of the machine at the remote end of a point to point link such as for <em/slip/ or <em/ppp/. --> <tag/[-]pointopoint [アドレス]/ このパラメータは、<em>slip</em> や <em>ppp</em> などの一対一接続の場合 の接続先アドレスを指定します。 <!--O <tag/hw <type> <addr>/this parameter allows you to set the hardware address of certain types of network devices. This is not often useful for ethernet, but is useful for other network types such as AX.25. --> <tag/hw <type> <アドレス>/ このパラメータは特定の種類のネットワークデバイスのハードウェアアドレス を設定します。イーサネットの場合はそれほど役に立ちませんが、AX.25 のよ うなネットワークの場合には便利です。 </descrip> <!--O <p>You may use the <em/ifconfig/ command on any network interface. Some user programs such as <em/pppd/ and <em/dip/ automatically configure the network devices as they create them, so manual use of <em/ifconfig/ is unnecessary. --> <p><em>ifconfig</em> コマンドはあらゆるネットワークインターフェイスに 使用可能です。<em>pppd</em>や <em>dip</em> といったユーザレベルのプロ グラムには、必要なデバイスを作成すると自動的にそれらを設定するものがあります。 この場合 <em>ifconfig</em> を手動で使う必要はありません。 <!-- ==================================================================== --> <!--O <sect1><heading>Configuring your Name Resolver. --> <sect1><heading>リゾルバの設定 <!--O <p>The `<em/Name Resolver/' is a part of the linux standard library. Its prime function is to provide a service to convert human-friendly hostnames like `<tt/ftp.funet.fi/' into machine friendly IP addresses such as <tt/128.214.248.6/. --> <p><em>リゾルバ(Name Resolver)</em> は Linux の標準ライブラリの一部で す。リゾルバの主な機能は、人間にとって分かりやすい <tt>ftp.funet.fi</tt> のようなホスト名を <tt>128.214.248.6</tt> のよう な IP アドレスに変換することです。 <!-- ==================================================================== --> <!--O <sect2><heading>What's in a name ? --> <sect2><heading>名前に含まれるものは? <!--O <p>You will probably be familiar with the appearance of Internet host names, but may not understand how they are constructed, or deconstructed. Internet domain names are hierarchical in nature, that is, they have a tree-like structure. A `<em/domain/' is a family, or group of names. A `<em/domain/' may be broken down into `<em/subdomain/'. A `<em/toplevel domain/' is a domain that is not a subdomain. The Top Level Domains are specified in RFC-920. Some examples of the most common top level domains are: --> <p>すでにインターネットのホスト名については御存知だと思いますが、それらが どういう意味で、どのように構成されているかについては御存知ないかもしれ ません。インターネットのドメイン名は階層構造、すなわち木のような構造に なっています。<bf>ドメイン</bf> とは、一つのまとまり、すなわち複数の ホスト名を一つのグループにまとめたものです。<bf>ドメイン</bf> は<bf>サ ブドメイン</bf> に分割されているかもしれません。 <bf>トップレベルドメイン</bf> とはサブドメインではないドメインです。 トップレベルドメインについては RFC-920 で規定されています。非常に有名 なトップレベルドメインを以下に示します: <!-- FIXME: add .firm and other top-level domains --> <!--O <descrip> <tag/COM/Commercial Organizations <tag/EDU/Educational Organizations <tag/GOV/Government Organizations <tag/MIL/Military Organizations <tag/ORG/Other organizations <tag/NET/Internet-Related Organizations <tag/Country Designator/these are two letters codes that represent a particular country. </descrip> --> <descrip> <tag/COM/ 営利組織 <tag/EDU/ 教育機関 <tag/GOV/ 政府機関 <tag/MIL/ 軍事機関 <tag/ORG/ その他の組織 <tag/NET/ インターネット関連の組織 <tag/Country Designator/ 特定の国を示す 2 文字のコード </descrip> <!--O <p>For historical reasons most domains belonging to one of the non-country based top level domains were used by organizations within the United States, although the United States also has its own country code `<tt/.us/'. This is not true any more for <tt/.com/ and <tt/.org/ domains, which are commonly used by non-us companies. --> <p>歴史的経緯から、国を表さないトップレベルドメインに属するほとんどの ドメインはアメリカ合衆国にある組織が使っています。ただし、 アメリカ合衆国も独自の国コードである `<tt/.us/' を持っています。現在で は、この話は <tt/.com/ や <tt/.org/ には当てはまりません。アメリカ国外 の会社もこれらのドメインを使っています。 <!--O <p>Each of these top level domains has subdomains. The top level domains based on country name are often next broken down into subdomains based on the <tt/com/, <tt/edu/, <tt/gov/, <tt/mil/ and <tt/org/ domains. So for example you end up with: <tt/com.au/ and <tt/gov.au/ for commercial and government organizations in Australia; note that this is not a general rule, as actual policies depend on the naming authority for each domain. --> これらのトップレベルドメインそれぞれにはサブドメインがあります。国 を示す 2 文字のコードがトップレベルドメインになっている場合、 サブドメインとして<tt/com/ や <tt/edu/, <tt/gov/, <tt/mil/, <tt/org/ といった組織の種別を示すドメインが来ます。例えば <tt>com.au</tt> と <tt>gov.au</tt> はオーストラリアの営利組織と政府機関です。これは一般的 な決まりではない点に注意してください。というのも、実際の方針は それぞれのドメインのドメイン名管理機関によって異なるからです。 <!--O <p>The next level of division usually represents the name of the organization. Further subdomains vary in nature, often the next level of subdomain is based on the departmental structure of the organization but it may be based on any criterion considered reasonable and meaningful by the network administrators for the organization. --> <p>次のレベルはたいていその組織や団体の名称になります。それより細かい レベルのドメインはそれぞれの組織によって異なりますが、よくあるのは部門 別にサブドメインを設定する方法です。しかし、このレベル以下はどのような サブドメインを作ることも可能なので、それぞれの組織ごとに、ネットワーク の管理者がふさわしい分け方を設定しています。 <!--O <p>The very left-most portion of the name is always the unique name assigned to the host machine and is called the `<em/hostname/', the portion of the name to the right of the hostname is called the `<em/domainname/' and the complete name is called the `<em/Fully Qualified Domain Name/'. --> <p>もっとも左に位置する名前が、たいていの場合、そのマシンに付けられた 独自の名前で、<bf>ホスト名</bf>と呼ばれます。ホスト名よりも右側の部分 を<bf>ドメイン名</bf>と呼び、両者を合せた完全な名前を「<em>完全に記述 された名前(Fully Qualified Domain Name(FQDN))</em>」と呼びます。 <!--O <p>To use Terry's host as an example, the fully qualified domain name is `<tt/perf.no.itg.telstra.com.au/'. This means that the host name is `<tt/perf/' and the domain name is `<tt/no.itg.telstra.com.au/'. The domain name is based on a top level domain based on his country, Australia and as his email address belongs to a commercial organization, `<tt/.com/' is there as the next level domain. The name of the company is (was) `<tt/telstra/' and their internal naming structure is based on organizational structure, in this case the machine belongs to the Information Technology Group, Network Operations section. --> <p>Terry のホストを例にしましょう。完全に記述された名前は `<tt/perf.no.itg.telstra.com.au/' です。この場合、ホスト名は `<tt>perf</tt>' でドメイン名は <tt>no.itg.telstra.com.au</tt> です。 ドメイン名のうち、トップドメイン名は彼の国であるオーストラリアを示し、 彼のメールアドレスは営利組織なので次のレベルのドメインは <tt>.com</tt> です。会社の名前は `<tt>telestra</tt>' で、それ以下のサブドメイン名の 構造は組織の構造を反映したものになっています。ここに示した例では、彼の マシンはネットワーク管理部門(<tt>no</tt>, Network Operations)の 情報技術グループ(<tt>itg</tt>, Information Technology Group)に属してい ます。 <!--O <p>Usually, the names are fairly shorter; for example, my ISP is called ``<tt/systemy.it/'' and my non-profit organization is called ``<tt/linux.it/'', without any <tt/com/ and <tt/org/ subdomain, so that my own host is just called ``<tt/morgana.systemy.it/'' and <tt/rubini@linux.it/ is a valid email address. Note that the owner of a domain has the rights to register hostnames as well as subdomains; for example, the LUG I belong to uses the domain <tt/pluto.linux.it/, because the owners of <tt/linux.it/ agreed to open a subdomain for the LUG. --> <p>普通、名前はずっと短くなっています。例えば、筆者の ISP は ``<tt/systemy.it/'' ですし、筆者が所属する非営利の組織は ``<tt/linux.it/'' です。どちらにも <tt/com/ や <tt/org/ といったサブドメインはないので、 筆者のホストは単に ``<tt/morgana.systemy.it/'' であり、 <tt/rubini@linux.it/ が有効なメールアドレスです。ドメインの所有者には ホスト名やサブドメインを登録する権利がある点に注意してください。 例えば、筆者が属する LUG は <tt/pluto.linux.it/ というドメインを使って います。なぜなら、<tt/linux.it/ の所有者が LUG のためにサブドメインを 開放してくれたからです。 <!-- ==================================================================== --> <!--O <sect2><heading>What information you will need. --> <sect2><heading> 必要な情報 <p> <!--O You will need to know what domain your hosts name will belong to. The name resolver software provides this name translation service by making requests to a `<em/Domain Name Server/', so you will need to know the IP address of a local nameserver that you can use. --> まず、あなたのホストがどういうドメインに属しているかを知る必要がありま す。リゾルバは名前の変換サービスを `<em>ドメインネームサーバ(DNS)</em>' に問い合わせるので、利用可能なネームサーバの IP アドレスも知っておく必 要があります。 <p> <!--O There are three files you need to edit, I'll cover each of these in turn. --> 関連するファイルは 3 つあり、それらを順に見ていくことにします。 <!-- ==================================================================== --> <sect2><heading>/etc/resolv.conf <!--O <p>The <tt>/etc/resolv.conf</tt> is the main configuration file for the name resolver code. Its format is quite simple. It is a text file with one keyword per line. There are three keywords typically used, they are: --> <p><tt>/etc/resolv.conf</tt> はリゾルバの使う一番重要な設定ファイルで す。このファイルの書式はごく簡単で、各行に 1 つのキーワードを配した テキストファイルになっています。よく使われるキーワードは以下の 3 種です: <descrip> <!--O <tag/domain/this keyword specifies the local domain name. --> <tag/domain/ このキーワードはローカルのドメイン名を設定します。 <!--O <tag/search/this keyword specifies a list of alternate domain names to search for a hostname --> <tag/search/ このキーワードはホスト名を検索する際に用いるドメイン名のリストを指定し ます。 <!--O <tag/nameserver/this keyword, which may be used many times, specifies an IP address of a domain name server to query when resolving names --> <tag/nameserver/ このキーワードは、名前を解決する際に使うドメインネームサーバの IP ア ドレスを指定します。複数のサーバを指定できます。 </descrip> <!--O <p>An example <tt>/etc/resolv.conf</tt> might look something like: --> <p>例として、以下の <tt>/etc/resolv.conf</tt> を見てみましょう: <tscreen><verb> domain maths.wu.edu.au search maths.wu.edu.au wu.edu.au nameserver 192.168.10.1 nameserver 192.168.12.1 </verb></tscreen> <!--O <p>This example specifies that the default domain name to append to unqualified names (ie hostnames supplied without a domain) is <tt/maths.wu.edu.au/ and that if the host is not found in that domain to also try the <tt/wu.edu.au/ domain directly. Two nameservers entry are supplied, each of which may be called upon by the name resolver code to resolve the name. --> <p>この例ではドメイン名を付けずにホスト名のみ指定した場合に、デフォル トで追加するドメイン名として <tt>maths.wu.edu.au</tt> を指定しています。 ホスト名に <tt>maths.wu.edu.au</tt> を付けた FQDN が見つからなかった場 合、ドメイン名を <tt>wu.edu.au</tt> にして再度調べます。ネームサーバの エントリは 2 つ設定してあり、リゾルバは 2 つのネームサーバに問い合わせます。 <!-- ==================================================================== --> <sect2><heading>/etc/host.conf <!--O <p>The <tt>/etc/host.conf</tt> file is where you configure some items that govern the behaviour of the name resolver code. The format of this file is described in detail in the `<tt/resolv+/' man page. In nearly all circumstances the following example will work for you: --> <p><tt>/etc/host.conf</tt> ファイルはリゾルバの動作方法を設定する ファイルです。このファイルのフォーマットの詳細は `<tt>resolv+</tt>' の man ページにあります。ほとんど全ての環境では、以下の設定のままでいいで しょう: <tscreen><verb> order hosts,bind multi on </verb></tscreen> <!--O <p>This configuration tells the name resolver to check the <tt>/etc/hosts</tt> file before attempting to query a nameserver and to return all valid addresses for a host found in the <tt>/etc/hosts</tt> file instead of just the first. --> <p>この設定の場合、リゾルバはネームサーバに問い合わせる前に、まず自分 自身の持つ <tt>/etc/hosts</tt> ファイルをチェックします(order hosts,bind)。 そして、<tt>/etc/hosts</tt> ファイルに複数の IP アドレスが登録されてい た場合、最初のアドレスだけでなく、全てのアドレスを報告します(multi on)。 <!-- ==================================================================== --> <sect2><heading>/etc/hosts <!--O <p>The <tt>/etc/hosts</tt> file is where you put the name and IP address of local hosts. If you place a host in this file then you do not need to query the domain name server to get its IP Address. The disadvantage of doing this is that you must keep this file up to date yourself if the IP address for that host changes. In a well managed system the only hostnames that usually appear in this file are an entry for the loopback interface and the local hosts name. --> <p><tt>/etc/hosts</tt> ファイルは、ローカルのホストの IP アドレスを登 録しておく表です。この表に登録されているホストの IP アドレスについては DNS を引く必要がありません。<tt>/etc/hosts</tt> の欠点は、登録している ホストの IP アドレスが変わった場合、手動でこのファイルを更新しなければ ならないことです。きちんと管理されたシステムでは、このファイルに登録さ れるホスト名は loopback インターフェイスを示すアドレスとローカルの ホストのアドレスのみです。 <tscreen><verb> # /etc/hosts 127.0.0.1 localhost loopback 192.168.0.1 this.host.name </verb></tscreen> <!--O <p>You may specify more than one host name per line as demonstrated by the first entry, which is a standard entry for the loopback interface. --> <p>一行目が示すように、一つの行に複数のホスト名を登録できます。この例 では 127.0.0.1 はループバックインターフェイスの IP アドレスです。 <!-- ==================================================================== --> <!--O <sect2><heading>Running a name server --> <sect2><heading>ネームサーバの実行 <!--O <p>If you want to run a local nameserver, you can do it easily. Please refer to the <htmlurl url="DNS-HOWTO.html" name="DNS-HOWTO"> and to any documents included in your version of <em/BIND/ (Berkeley Internet Name Domain). --> <p>ローカルでネームサーバを実行したければ、これを行うのは簡単です。 <url url="DNS-HOWTO.html" name="DNS-HOWTO"> と、 お使いのバージョンの <em/BIND/ (Berkeley Internet Name Domain)に含まれ ている文書を読んでください。 [訳注: DNS-HOWTO の日本語訳は <url url="http://www.linux.or.jp/JF/JFdocs/DNS-HOWTO.html" name="DNS-HOWTO"> にあります] <!-- ==================================================================== --> <!--O <sect1><heading>Configuring your loopback interface. --> <sect1><heading>ループバックインターフェイスの設定 <p> <!--O The `<tt/loopback/' interface is a special type of interface that allows you to make connections to yourself. There are various reasons why you might want to do this, for example, you may wish to test some network software without interfering with anybody else on your network. By convention the IP address `<tt/127.0.0.1/' has been assigned specifically for loopback. So no matter what machine you go to, if you open a telnet connection to <tt/127.0.0.1/ you will always reach the local host. --> ループバックインターフェイスとは、自分自身に接続するために用意された特 別な種類のインターフェイスです。このようなインターフェイスを用意してい るのにはいくつかの理由があります。例えば、実際のネットワークに接続せず にネットワーク用のソフトウェアをテストするなどの目的に使えます。慣例と して、ループバックインターフェイスには `<tt>127.0.0.1</tt>' というアドレス が使われます。ですから、どんなマシンを使っていようとも telnet で <tt>127.0.0.1</tt> に接続すれば、自分自身に接続することになります。 <p> <!--O Configuring the loopback interface is simple and you should ensure you do (but note that this task is usually performed by the standard initialization scripts). --> ループバックインターフェイスの設定は簡単で、次のようにするだけです(た だし、普通はこの作業は標準の初期化スクリプトが実行することに注意してく ださい)。 <tscreen><verb> root# ifconfig lo 127.0.0.1 root# route add -host 127.0.0.1 lo </verb></tscreen> <!--O <p>We'll talk more about the <em/route/ command in the next section. --> <p><em>route</em> コマンドについては次節で説明します。 <!-- ==================================================================== --> <!--O <sect1><heading>Routing. --> <sect1><heading> 経路制御(ルーティング) <!--o <p>Routing is a big topic. It is easily possible to write large volumes of text about it. Most of you will have fairly simple routing requirements, some of you will not. I will cover some basic fundamentals of routing only. If you are interested in more detailed information then I suggest you refer to the references provided at the start of the document. --> <p>経路制御は大きな話題であり、それだけで分厚い本を書くことができます。 一部の人を別にすれば、ほとんどの人はごく単純な経路制御しか必要ないと思 いますので、以下ではごく基本的な話題についてのみ扱うことにします。より 詳細な情報が必要ならば、この文書の最初に示した各種の文献に当たってくだ さい。 <!--O <p>Let's start with a definition. What is IP routing ? Here is one that I'm using: --> <p>まず定義から始めましょう。IP 経路制御とは何でしょう? 私が使ってい る定義を以下に示します: <!--O <p><quote>IP Routing is the process by which a host with multiple network connections decides where to deliver IP datagrams it has received.</quote> --> <p><quote> IP 経路制御とは、複数のネットワークに接続しているホストが受けとった IP データグラムをどのネットワークに送るかを決めることです。 </quote> <!--O <p>It might be useful to illustrate this with an example. Imagine a typical office router, it might have a PPP link off the Internet, a number of ethernet segments feeding the workstations and another PPP link off to another office. When the router receives a datagram on any of its network connections, routing is the mechanism that it uses to determine which interface it should send the datagram to next. Simple hosts also need to route, all Internet hosts have two network devices, one is the loopback interface described above and the other is the one it uses to talk to the rest of the network, perhaps an ethernet, perhaps a PPP or SLIP serial interface. --> <p>例を使って示した方がいいでしょう。よくあるオフィス用のルータを想像して ください。このルータはインターネットへの PPP 接続や、ワークステーション の繋がっている多数のイーサネットセグメントや、別のオフィスへの PPP 接続などを備えていること でしょう。このルータがデータグラムを受けとった際、そのデータグラ ムを次にどのポートへ送り出すかを決めるのが IP 経路制御です。ルータでは ない普通のホストにも経路制御が必要です。なぜなら、ネットワークに接続し ている全てのホストは上述した自分自身を指すループバックインターフェイス とネットワーク上にある他のマシンと接続するためのインターフェイス(それ はイーサネットだったり、シリアルポートを使った PPP や SLIP だったりしま す)の 2 つのインターフェイスを持っているため、どちらのインターフェイス にパケットを送り出すか決める必要があるからです。 <p> <!--O Ok, so how does routing work ? Each host keeps a special list of routing rules, called a routing table. This table contains rows which typically contain at least three fields, the first is a destination address, the second is the name of the interface to which the datagram is to be routed and the third is optionally the IP address of another machine which will carry the datagram on its next step through the network. In linux you can see this table by using the following command: --> さて、実際の経路制御はどのように行なわれるのでしょう? それぞれのホスト は経路情報を登録した経路表(ルーティングテーブル)と呼ばれるリストを持っ ています。この表の各行には通常 3 つの欄があります。最初の欄は目的地と なるアドレス、2 つめはデータグラムが送られるべきインターフェイス名、3 つめは必須ではありませんが、お隣のネットワークへデータグラムを転送するホスト の IP アドレスです。最後の欄はゲートウェイフィールドと言います。Linux で は <tt>/proc/net/route</tt> に経路表が登録されているため、以下のコマン ドで経路表を見ることができます: <tscreen><verb> user% cat /proc/net/route </verb></tscreen> <!--O <p>or by using either of the following commands: --> <p>あるいは以下のコマンドも使えます: <tscreen><verb> user% /sbin/route -n user% netstat -r </verb></tscreen> <!--O <p>The routing process is fairly simple: an incoming datagram is received, the destination address (who it is for) is examined and compared with each entry in the table. The entry that best matches that address is selected and the datagram is forwarded to the specified interface. If the gateway field is filled then the datagram is forwarded to that host via the specified interface, otherwise the destination address is assumed to be on the network supported by the interface. --> <p>経路制御の方法自体はごく簡単です。データグラムを受けとれば、その目的地 アドレス(誰宛に送られたのか)をチェックして、経路表の各行と比較します。 そのアドレスにもっともよく一致する行が選択され、データグラムはその行が 指定するインターフェイスへ送られます。 その行にゲートウェイフィールドが登録されていれば、データグラムは指定さ れたインターフェイスを経由してそのホストに送られます。ゲートウェイフィー ルドが無い場合、目的地アドレスはその行が指定したインターフェイスが接続 しているネットワーク上にあるものとみなされます。 <p> <!--O To manipulate this table a special command is used. This command takes command line arguments and converts them into kernel system calls that request the kernel to add, delete or modify entries in the routing table. The command is called `<em/route/'. --> この経路表を操作するには `<em>route</em>' という専用のコマンドを使いま す。このコマンドは引数をカーネルのシステムコールに変換して、カーネルの 経路表に追加したり、削除したり、変更したりします。 <p> <!--O A simple example. Imagine you have an ethernet network. You've been told it is a class-C network with an address of <tt/192.168.1.0/. You've been supplied with an IP address of <tt/192.168.1.10/ for your use and have been told that <tt/192.168.1.1/ is a router connected to the Internet. --> 簡単な例を示します。イーサネットのネットワークを使っていると想像してく ださい。ネットワークはクラス C で、ネットワークアドレスは <tt>192.168.1.0</tt> です。あなたのマシンの IP アドレスは <tt>192.168.1.10</tt> 、インターネットに接続しているルータのアドレス は <tt>192.168.1.1</tt> になっています。 <p> <!--O The first step is to configure the interface as described earlier. You would use a command like: --> インターフェイスを設定するための最初のステップは、上述した通り `<tt>ifconfig</tt>' です。 <tscreen><verb> root# ifconfig eth0 192.168.1.10 netmask 255.255.255.0 up </verb></tscreen> <!--O <p>You now need to add an entry into the routing table to tell the kernel that datagrams for all hosts with addresses that match <tt/192.168.1.*</tt> should be sent to the ethernet device. You would use a command similar to: --> <p>次に、経路表にエントリを登録して、「目的地アドレスとして <tt>192.168.1.*</tt> に一致するデータグラム が届いたら、イーサネットデバイスに送る」ということをカーネルに教える必 要があります。そのためには以下のコマンドを使います。 <tscreen><verb> root# route add -net 192.168.1.0 netmask 255.255.255.0 eth0 </verb></tscreen> <!--O <p>Note the use of the `<tt/-net/' argument to tell the route program that this entry is a network route. Your other choice here is a `<tt/-host/' route which is a route that is specific to one IP address. --> <p>`<tt>-net</tt>' という引数に注意してください。この指定で <tt>route</tt> プログラムはこのアドレスがネットワークであると認識しま す。ここで <tt>-host</tt> を指定すると、一つの IP アドレスのみを指定し た経路になります。 <p> <!--O This route will enable you to establish IP connections with all of the hosts on your ethernet segment. But what about all of the IP hosts that aren't on your ethernet segment ? --> この経路を登録することで、あなたのいるイーサネットセグメント上にいる全 てのホストと IP 接続できます。しかし、同じセグメント上にいないホストの 場合はどうするのでしょう? <p> <!--O It would be a very difficult job to have to add routes to every possible destination network, so there is a special trick that is used to simplify this task. The trick is called the `<tt/default/' route. The <tt/default/ route matches every possible destination, but poorly, so that if any other entry exists that matches the required address it will be used instead of the <tt/default/ route. The idea of the <tt/default/ route is simply to enable you to say "and everything else should go here". In the example I've contrived you would use an entry like: --> 起りうる全てのネットワークへの経路を登録することは不可能ですので、特別 の仕組みが用意されています。この仕組みを「既定の経路(デフォルトルート)」 と呼びます。「既定の経路」は全ての目的地アドレスにマッチしますが、優先 順位が低く、他にマッチする行があった場合、そちらの方が優先されることに なります。「既定の経路」の考え方は単純で、「その他全てをここに送る」と いうことです。今考えているネットワークでは以下のように「既定の経路」を 設定します: <tscreen><verb> root# route add default gw 192.168.1.1 eth0 </verb></tscreen> <!--O <p>The `<tt/gw/' argument tells the route command that the next argument is the IP address, or name, of a gateway or router machine which all datagrams matching this entry should be directed to for further routing. --> <p>`<tt>gw</tt>' の指定により、 <tt>route</tt> コマンドはその次の引数が ゲートウェイまたはルータの IP アドレスまたはホスト名であると認識します。 このエントリに一 致する全てのデータグラムはこのアドレスに送られ、以降の経路制御はこのゲー トウェイかルータが考えることになります。 <p> <!--O So, your complete configuration would look like: --> 以上をまとめると次のようになります: <tscreen><verb> root# ifconfig eth0 192.168.1.10 netmask 255.255.255.0 up root# route add -net 192.168.1.0 netmask 255.255.255.0 eth0 root# route add default gw 192.168.1.1 eth0 </verb></tscreen> <!--O <p>If you take a close look at your network `<tt/rc/' files you will find that at least one of them looks very similar to this. This is a very common configuration. --> ネットワークを設定している `<tt>rc</tt>' ファイルを詳細に調べると少な くともその一つにこれとよく似た設定が見つかるはずです。これはごく一般的 な設定です。 <p> <!--O Let's now look at a slightly more complicated routing configuration. Let's imagine we are configuring the router we looked at earlier, the one supporting the PPP link to the Internet and the lan segments feeding the workstations in the office. Lets imagine the router has three ethernet segments and one PPP link. Our routing configuration would look something like: --> 次に多少複雑な経路の設定を見てみましょう。先に考えたルータを設定してい ると想像してください。このルータは PPP でインターネットに接続し、複数 の LAN セグメントが接続されています。具体的には 3 つのイーサネットセグメ ントと 1 つの PPP 接続があると考えましょう。その場合、経路設定は以下の ようになるでしょう。 <tscreen><verb> root# route add -net 192.168.1.0 netmask 255.255.255.0 eth0 root# route add -net 192.168.2.0 netmask 255.255.255.0 eth1 root# route add -net 192.168.3.0 netmask 255.255.255.0 eth2 root# route add default ppp0 </verb></tscreen> <!--O <p>Each of the workstations would use the simpler form presented above, only the router needs to specify each of the network routes separately because for the workstations the <tt/default/ route mechanism will capture all of them letting the router worry about splitting them up appropriately. You may be wondering why the default route presented doesn't specify a `<tt/gw/'. The reason for this is simple, serial link protocols such as PPP and slip only ever have two hosts on their network, one at each end. To specify the host at the other end of the link as the gateway is pointless and redundant as there is no other choice, so you do not need to specify a gateway for these types of network connections. Other network types such as ethernet, arcnet or token ring do require the gateway to be specified as these networks support large numbers of hosts on them. --> <p>このルータのつながったネットワークを使っているそれぞれのワークステー ションは、先に述べた、より簡単な形式の設定になり、ルータのみがネットワーク への経路を別々に登録することになります。それぞれのワークステーションの場 合、「既定の経路」を使ってルータにデータグラムを送りますが、ルータの場 合はそれらを適切な経路に送り出す必要があります。 上記のルータの設定でデフォルトの経路の設定に`<tt>gw</tt>' が無いのを不 思議に思うかもしれませんが、その理由は簡単で、PPP や SLIP といったシリ アル経由の接続は一対一の接続になっているからです。接続先が一台のマシン になっているため、他に選択の余地が無く、そのマシンをゲートウェイとして 設定する意味は無いわけです。イーサネットや arcnet、トークンリングといっ た種類のネットワークの場合、それらのネットワーク上には多数のホストがあ るので <tt>gw</tt> オプションを指定する必要があります。 <!-- ==================================================================== --> <!--O <sect2><heading>So what does the <em/routed/ program do ? --> <sect2><heading>さて、routed プログラムは何をしているのでしょう? <p> <!--O The routing configuration described above is best suited to simple network arrangements where there are only ever single possible paths to destinations. When you have a more complex network arrangement things get a little more complicated. Fortunately for most of you this won't be an issue. --> 上述した経路設定は単純なネットワーク構成に適しており、取り得る経路は一 つしかありませんでした。もっと複雑なネットワーク構成になれば設定はもう 少し複雑になります。幸いなことに、大部分の人はそのような設定を使う必要 はありません。 <p> <!--O The big problem with `manual routing' or `static routing' as described, is that if a machine or link fails in your network then the only way you can direct your datagrams another way, if another way exists, is by manually intervening and executing the appropriate commands. Naturally this is clumsy, slow, impractical and hazard prone. Various techniques have been developed to automatically adjust routing tables in the event of network failures where there are alternate routes, all of these techniques are loosely grouped by the term `dynamic routing protocols'. --> 上述してきた「手動経路設定」すなわち「静的経路設定」の大きな問題点は、 ネットワークの中のマシンやどこかの接続がダウンした場合、データグラムを 別の経路へ送るようにするには、(別の経路がある場合だけですが)設定を変更 するために必要なコマンドを手動で実行しなければならないことです。通常、この 作業は面倒で、手間がかかり、非実用的で、トラブルの原因になりがちです。 そのため、ネットワークにトラブルが生じた場合、別の経路を探して自動的に 経路表を変更するための様々な技術が開発されてきました。これらはまとめて 「動的経路制御プロトコル」と呼ばれています。 <p> <!--O You may have heard of some of the more common dynamic routing protocols. The most common are probably RIP (Routing Information Protocol) and OSPF (Open Shortest Path First Protocol). The Routing Information Protocol is very common on small networks such as small-medium sized corporate networks or building networks. OSPF is more modern and more capable at handling large network configurations and better suited to environments where there is a large number of possible paths through the network. Common implementations of these protocols are: `<em/routed/' - RIP and `<em/gated/' - RIP, OSPF and others. The `<em/routed/' program is normally supplied with your Linux distribution or is included in the `NetKit' package detailed above. --> 一般的な動的経路制御プロトコルのいくつかについては御存知かもしれません。 多分、これらのプロトコルの中で最も有名なものは RIP(Routing Information Protocol) と OSPF(Open Shortest Path First Protocol)でしょう。RIP は小〜 中規模な組織や、一つのビルの中といった小規模なネットワークで最も広く使 われているプロトコルです。OSPF は新しく開発されたプロトコルで、大規模 なネットワークの設定やネットワークの中に多数の経路がありうる場合により 適しています。 これらのプロトコルを実装したプログラムとして、`<em>routed</em>' - RIP のみ、と `<em>gated</em>' - RIP と OSPF、その他に対応、があります。 `<em>routed</em>' プログラムはたいていの Linux の配布パッケージに含ま れており、上述した `NetKit' パッケージにも入っています。 <p> <!--O An example of where and how you might use a dynamic routing protocol might look something like the following: --> 具体的な例を使って動的経路制御プロトコルがどのように働くのか見てみましょ う。以下のようなネットワークを考えます。 <tscreen><verb> 192.168.1.0 / 192.168.2.0 / 255.255.255.0 255.255.255.0 - - | | | /-----\ /-----\ | | | |ppp0 // ppp0| | | eth0 |---| A |------//---------| B |---| eth0 | | | // | | | | \-----/ \-----/ | | \ ppp1 ppp1 / | - \ / - \ / \ / \ / \ / \ / \ / \ / \ / ppp0\ /ppp1 /-----\ | | | C | | | \-----/ |eth0 | |---------| 192.168.3.0 / 255.255.255.0 </verb></tscreen> <!--O <p>We have three routers A, B and C. Each supports one ethernet segment with a Class C IP network (netmask 255.255.255.0). Each router also has a PPP link to each of the other routers. The network forms a triangle. --> <p>図のように、A、B、C の 3 つのルータがあります。それぞれのルータにはク ラス C の IP ネットワーク(ネットマスク 255.255.255.0)が設定された一つ のイーサネットのセグメントが接続されています。また、PPP を使って他のルー タに接続され、ネットワークは三角形になっています。 <p> <!--O It should be clear that the routing table at router A could look like: --> ルータ A の経路表が以下のようになるのは明らかなはずです: <tscreen><verb> root# route add -net 192.168.1.0 netmask 255.255.255.0 eth0 root# route add -net 192.168.2.0 netmask 255.255.255.0 ppp0 root# route add -net 192.168.3.0 netmask 255.255.255.0 ppp1 </verb></tscreen> <!--O <p>This would work just fine until the link between router A and B should fail. If that link failed then with the routing entry shown above hosts on the ethernet segment of A could not reach hosts on the ethernet segment on B because their datagram would be directed to router A's ppp0 link which is broken. They could still continue to talk to hosts on the ethernet segment of C and hosts on the C's ethernet segment could still talk to hosts on B's ethernet segment because the link between B and C is still intact. --> <P>この設定はルータ A と B の間の接続が切れない限り正しく動きます。A と B の間の接続が切れると、A に接続されたイーサネット上のホストから B に接続 されたイーサネット上のホストへは接続できなくなります。なぜなら、ルータ A から B への経路は A の ppp0 を使うことになっており、この接続が切れてい るためです。一方、A と C の間の接続は生きているので、A のイーサネット上 のホストから C のイーサネット上のホストへは通信できます。一方、B と C の 間の接続は生きているので C のイーサネット上のホストから B のイーサネット上 のホストへも通信できます。 <p> <!--O But wait, if A can talk to C and C can still talk to B, why shouldn't A route its datagrams for B via C and let C send them to B ? This is exactly the sort of problem that dynamic routing protocols like RIP were designed to solve. If each of the routers A, B and C were running a routing daemon then their routing tables would be automatically adjusted to reflect the new state of the network should any one of the links in the network fail. To configure such a network is simple, at each router you need only do two things. In this case for Router A: --> さて、ここで A は C と通信でき、C は B に通信できるとしたら、A から B へのデータグラムは C を経由して B に送ることが可能なはずです。このよう な問題を解決するために RIP のような動的経路制御プロトコルが開発されま した。A、B、C それぞれのルータで経路制御デーモンが動いていれば、どれか 一つの接続が切れても、そのネットワークの状態を反映するように自動的に経 路表が調整されます。経路制御デーモンの設定は簡単で、それぞれのルータで 2 つのことをするだけです。ルータ A の場合、 <tscreen><verb> root# route add -net 192.168.1.0 netmask 255.255.255.0 eth0 root# /usr/sbin/routed </verb></tscreen> <!--O <p>The `<em/routed/' routing daemon automatically finds all active network ports when it starts and sends and listens for messages on each of the network devices to allow it to determine and update the routing table on the host. --> <p>経路制御デーモン <em>routed</em> は起動時に使用可能なネットワーク ポート全てを自動的に探して、そのホストの経路表を更新できるようにそれぞ れのネットワークデバイスへメッセージを送ると同時に、他のホストから送ら れてくるメッセージを受けとります。 <p> <!--O This has been a very brief explanation of dynamic routing and where you would use it. If you want more information then you should refer to the suggested references listed at the top of the document. --> 以上はごく簡単な動的経路制御の説明ですが、充分使えるはずです。より詳細 な説明が必要ならばこの文書の最初に挙げた参考文献を参照してください。 <p> <!--O The important points relating to dynamic routing are: --> 動的経路制御についての重要なポイントは以下の通りです: <enum> <!--O <item>You only need to run a dynamic routing protocol daemon when your Linux machine has the possibility of selecting multiple possible routes to a destination. An example of this would be if you plan to use IP Masquerading. --> <item>目的地まで複数の経路があり、その中から一つの経路を選ばなければな らない状況にないかぎり、あなたの Linux マシンで動的経路制御デーモンを 動かす必要はありません。これは例えば、IP マスカレードを使おうとしてい る場合などです。 <!--O <item>The dynamic routing daemon will automatically modify your routing table to adjust to changes in your network. --> <item>動的経路制御デーモンは、ネットワークの状態の変化に応じて自動的に 経路表を変更します。 <!--O <item>RIP is suited to small to medium sized networks. --> <item>RIP は小〜中規模のネットワークに適しています。 </enum> <!-- ==================================================================== --> <!--O <sect1><heading>Configuring your network servers and services. --> <sect1><heading>ネットワーク経由の各種サービスとサーバの設定 <p> <!--O Network servers and services are those programs that allow a remote user to make user of your Linux machine. Server programs listen on network ports. Network ports are a means of addressing a particular service on any particular host and are how a server knows the difference between an incoming telnet connection and an incoming ftp connection. The remote user establishes a network connection to your machine and the server program, the network daemon program, listening on that port accepts the connection and executes. There are two ways that network daemons may operate. Both are commonly employed in practice. The two ways are: --> ネットワーク経由の各種サービスとそのためのサーバを起動すれば、遠隔地に いるユーザが、ネットワーク経由であなたの Linux マシンを使うことができ ます。サーバプログラムはネットワークポートを監視します。ネットワークポート は特定のホストの特定のサービスを示す手段であり、telnet によるアクセス と ftp によるアクセスをサーバが区別する方法です。遠隔地のユーザが サーバマシンとの接続を確立すると、そのポートを監視しているサーバプログラム (ネットワークデーモンプログラム)は接続を受け付けて動作します。 ネットワークデーモンの動作方法には 2 つの種類があり、どちらの方法も実 際に用いられています。これらを以下に示します: <descrip> <!--O <p><tag>standalone</tag>the network daemon program listens on the designated network port and when an incoming connection is made it manages the network connection itself to provide the service. --> <p><tag>スタンドアローン型</tag> ネットワークサービス用のプログラムは予め起動されて受け持ちの ポートを監視しており、接続があれば自分で必要なサービスを提供します。 <!--O <p><tag>slave to the <em/inetd/ server</tag>the <em/inetd/ server is a special network daemon program that specializes in managing incoming network connections. It has a configuration file which tells it what program needs to be run when an incoming connection is received. Any service port may be configured for either of the tcp or udp protcols. The ports are described in another file that we will talk about soon. --> <p><tag>inetd 経由で起動するタイプ</tag> <em>ined</em> サーバはネットワーク接続を受けつけるための特別のデーモン プログラムです。このプログラムは接続を受け付けたとき、必要とされる プログラムを設定ファイルに従って起動します。どのサービスポートも tcp プロトコルと udp プロトコルのどちらを使うようにも設定できます。 ポートは別のファイルに記述されますが、これについては後述します。 </descrip> <!--O <p>There are two important files that we need to configure. They are the <tt>/etc/services</tt> file which assigns names to port numbers and the <tt>/etc/inetd.conf</tt> file which is the configuration file for the <em/inetd/ network daemon. --> <p>設定すべき重要なファイルは 2 つあります。ポート番号をサービス名に 対応づける <tt>/etc/services</tt> と、<em>inetd</em> デーモンの 設定ファイルである <tt>/etc/inetd.conf</tt> ファイルです。 <!-- ==================================================================== --> <sect2><heading><tt>/etc/services</tt> <p> <!--O The <tt>/etc/services</tt> file is a simple database that associates a human friendly name to a machine friendly service port. Its format is quite simple. The file is a text file with each line representing and entry in the database. Each entry is comprised of three fields separated by any number of whitespace (tab or space) characters. The fields are: --> <p><tt>/etc/services</tt> ファイルは、人間にとって分かりやすいサービス 名と計算機が扱いやすいポート番号を対応させる単純なデータベースです。 このファイルの書式はごく単純で、普通のテキストファイルの各行に データベースのエントリが記述されています。それぞれのエントリは任意の数 の空白文字(タブかスペース)で分離された 3 つのフィールドから構成されま す。また、#から後はコメントとして無視されます。フィールドの構成は 以下のようになっています: <verb> name port/protocol aliases # comment </verb> <descrip> <!--O <p><tag>name</tag>a single word name that represents the service being described. --> <p><tag>name</tag> は一語で書かれ、記述するサービスを示します。 <!--O <p><tag>port/protocol</tag>this field is split into two subfields. --> <p><tag>port/protocol</tag> このフィールドはさらに 2 つの部分に分かれます。 <!--O <p><tag>port</tag>a number that specifies the port number the named service will be available on. Most of the common services have assigned service numbers. These are described in <tt>RFC-1340</tt>. --> <p><tag>port</tag>この行が示すサービスを提供するためのポート番号で す。よく使われるサービスには予めポート番号が割り当てられてい ます。詳しくは <tt>RFC-1340</tt> をご覧ください。 <!--O <p><tag>protocol</tag>this subfield may be set to either <tt>tcp</tt> or <tt>udp</tt>. --> <p><tag>protocol</tag> このフィールドには <tt>tcp</tt> または <tt>udp</tt> を指定します。 <!--O It is important to note that an entry of <tt>18/tcp</tt> is very different from an entry of <tt>18/udp</tt> and that there is no technical reason why the same service needs to exist on both. Normally common sense prevails and it is only if a particular service is available via both <tt>tcp</tt> and <tt>udp</tt> that you will see an entry for both. --> 注意しておかなければならないことは、<tt>18/tcp</tt> と <tt>18/udp</tt> は全く異なる意味を持つということです。1つのサービスが同じポートの tcp と udp を使わなければならない技術的な理由はありません。普通はこの常識 通りに指定が行われ、<tt>/etc/services</tt> に両方のエントリが現れるの は特定のサービスが <tt>tcp</tt> でも <tt>udp</tt> でも使える場合だけで す。 <!--O <p><tag>aliases</tag>other names that may be used to refer to this service entry. --> <p><tag>aliases</tag> はこのサービスの参照に使える別名を設定します。 </descrip> <!--O <p>Any text appearing in a line after a `<tt/#/' character is ignored and treated as a comment. --> <p>ある行の `<tt>#</tt> 以降に書かれた部分はコメントとして無視されます。 <!-- .................................................................... --> <!--O <sect3>An example <tt>/etc/services</tt> file. --> <sect3>/etc/services ファイルの実例 <p> <!--O All modern linux distributions provide a good <tt>/etc/services</tt> file. Just in case you happen to be building a machine from the ground up, here is a copy of the <tt>/etc/services</tt> file supplied with an old <htmlurl url="http://www.debian.org/" name="Debian"> distribution: --> 最近の Linux の各種ディストリビューションでは <tt>/etc/services</tt> ファイルが予め用意されています。もし 0 からシステムを組みあげなけれ ばならない場合のために、古い <url url="http://www.debian.org/" name="Debian"> ディストリビューションからコピーした <tt>/etc/services</tt> の例を以下 に紹介します: <tscreen><verb> # /etc/services: # $Id: NET3-4-HOWTO.sgml,v 1.14 2000/12/18 02:12:43 morimoto Exp $ # # Network services, Internet style # # Note that it is presently the policy of IANA to assign a single well-known # port number for both TCP and UDP; hence, most entries here have two entries # even if the protocol doesn't support UDP operations. # Updated from RFC 1340, ``Assigned Numbers'' (July 1992). Not all ports # are included, only the more common ones. tcpmux 1/tcp # TCP port service multiplexer echo 7/tcp echo 7/udp discard 9/tcp sink null discard 9/udp sink null systat 11/tcp users daytime 13/tcp daytime 13/udp netstat 15/tcp qotd 17/tcp quote msp 18/tcp # message send protocol msp 18/udp # message send protocol chargen 19/tcp ttytst source chargen 19/udp ttytst source ftp-data 20/tcp ftp 21/tcp ssh 22/tcp # SSH Remote Login Protocol ssh 22/udp # SSH Remote Login Protocol telnet 23/tcp # 24 - private smtp 25/tcp mail # 26 - unassigned time 37/tcp timserver time 37/udp timserver rlp 39/udp resource # resource location nameserver 42/tcp name # IEN 116 whois 43/tcp nicname re-mail-ck 50/tcp # Remote Mail Checking Protocol re-mail-ck 50/udp # Remote Mail Checking Protocol domain 53/tcp nameserver # name-domain server domain 53/udp nameserver mtp 57/tcp # deprecated bootps 67/tcp # BOOTP server bootps 67/udp bootpc 68/tcp # BOOTP client bootpc 68/udp tftp 69/udp gopher 70/tcp # Internet Gopher gopher 70/udp rje 77/tcp netrjs finger 79/tcp www 80/tcp http # WorldWideWeb HTTP www 80/udp # HyperText Transfer Protocol link 87/tcp ttylink kerberos 88/tcp kerberos5 krb5 # Kerberos v5 kerberos 88/udp kerberos5 krb5 # Kerberos v5 supdup 95/tcp # 100 - reserved hostnames 101/tcp hostname # usually from sri-nic iso-tsap 102/tcp tsap # part of ISODE. csnet-ns 105/tcp cso-ns # also used by CSO name server csnet-ns 105/udp cso-ns rtelnet 107/tcp # Remote Telnet rtelnet 107/udp pop-2 109/tcp postoffice # POP version 2 pop-2 109/udp pop-3 110/tcp # POP version 3 pop-3 110/udp sunrpc 111/tcp portmapper # RPC 4.0 portmapper TCP sunrpc 111/udp portmapper # RPC 4.0 portmapper UDP auth 113/tcp authentication tap ident sftp 115/tcp uucp-path 117/tcp nntp 119/tcp readnews untp # USENET News Transfer Protocol ntp 123/tcp ntp 123/udp # Network Time Protocol netbios-ns 137/tcp # NETBIOS Name Service netbios-ns 137/udp netbios-dgm 138/tcp # NETBIOS Datagram Service netbios-dgm 138/udp netbios-ssn 139/tcp # NETBIOS session service netbios-ssn 139/udp imap2 143/tcp # Interim Mail Access Proto v2 imap2 143/udp snmp 161/udp # Simple Net Mgmt Proto snmp-trap 162/udp snmptrap # Traps for SNMP cmip-man 163/tcp # ISO mgmt over IP (CMOT) cmip-man 163/udp cmip-agent 164/tcp cmip-agent 164/udp xdmcp 177/tcp # X Display Mgr. Control Proto xdmcp 177/udp nextstep 178/tcp NeXTStep NextStep # NeXTStep window nextstep 178/udp NeXTStep NextStep # server bgp 179/tcp # Border Gateway Proto. bgp 179/udp prospero 191/tcp # Cliff Neuman's Prospero prospero 191/udp irc 194/tcp # Internet Relay Chat irc 194/udp smux 199/tcp # SNMP Unix Multiplexer smux 199/udp at-rtmp 201/tcp # AppleTalk routing at-rtmp 201/udp at-nbp 202/tcp # AppleTalk name binding at-nbp 202/udp at-echo 204/tcp # AppleTalk echo at-echo 204/udp at-zis 206/tcp # AppleTalk zone information at-zis 206/udp z3950 210/tcp wais # NISO Z39.50 database z3950 210/udp wais ipx 213/tcp # IPX ipx 213/udp imap3 220/tcp # Interactive Mail Access imap3 220/udp # Protocol v3 ulistserv 372/tcp # UNIX Listserv ulistserv 372/udp # # UNIX specific services # exec 512/tcp biff 512/udp comsat login 513/tcp who 513/udp whod shell 514/tcp cmd # no passwords used syslog 514/udp printer 515/tcp spooler # line printer spooler talk 517/udp ntalk 518/udp route 520/udp router routed # RIP timed 525/udp timeserver tempo 526/tcp newdate courier 530/tcp rpc conference 531/tcp chat netnews 532/tcp readnews netwall 533/udp # -for emergency broadcasts uucp 540/tcp uucpd # uucp daemon remotefs 556/tcp rfs_server rfs # Brunhoff remote filesystem klogin 543/tcp # Kerberized `rlogin' (v5) kshell 544/tcp krcmd # Kerberized `rsh' (v5) kerberos-adm 749/tcp # Kerberos `kadmin' (v5) # webster 765/tcp # Network dictionary webster 765/udp # # From ``Assigned Numbers'': # #> The Registered Ports are not controlled by the IANA and on most systems #> can be used by ordinary user processes or programs executed by ordinary #> users. # #> Ports are used in the TCP [45,106] to name the ends of logical #> connections which carry long term conversations. For the purpose of #> providing services to unknown callers, a service contact port is #> defined. This list specifies the port used by the server process as its #> contact port. While the IANA can not control uses of these ports it #> does register or list uses of these ports as a convenience to the #> community. # ingreslock 1524/tcp ingreslock 1524/udp prospero-np 1525/tcp # Prospero non-privileged prospero-np 1525/udp rfe 5002/tcp # Radio Free Ethernet rfe 5002/udp # Actually uses UDP only bbs 7000/tcp # BBS service # # # Kerberos (Project Athena/MIT) services # Note that these are for Kerberos v4 and are unofficial. Sites running # v4 should uncomment these and comment out the v5 entries above. # kerberos4 750/udp kdc # Kerberos (server) udp kerberos4 750/tcp kdc # Kerberos (server) tcp kerberos_master 751/udp # Kerberos authentication kerberos_master 751/tcp # Kerberos authentication passwd_server 752/udp # Kerberos passwd server krb_prop 754/tcp # Kerberos slave propagation krbupdate 760/tcp kreg # Kerberos registration kpasswd 761/tcp kpwd # Kerberos "passwd" kpop 1109/tcp # Pop with Kerberos knetd 2053/tcp # Kerberos de-multiplexor zephyr-srv 2102/udp # Zephyr server zephyr-clt 2103/udp # Zephyr serv-hm connection zephyr-hm 2104/udp # Zephyr hostmanager eklogin 2105/tcp # Kerberos encrypted rlogin # # Unofficial but necessary (for NetBSD) services # supfilesrv 871/tcp # SUP server supfiledbg 1127/tcp # SUP debugging # # Datagram Delivery Protocol services # rtmp 1/ddp # Routing Table Maintenance Protocol nbp 2/ddp # Name Binding Protocol echo 4/ddp # AppleTalk Echo Protocol zip 6/ddp # Zone Information Protocol # # Debian GNU/Linux services rmtcfg 1236/tcp # Gracilis Packeten remote config server xtel 1313/tcp # french minitel cfinger 2003/tcp # GNU Finger postgres 4321/tcp # POSTGRES mandelspawn 9359/udp mandelbrot # network mandelbrot # Local services </verb></tscreen> <!--O <p>In the real world, the actual file is always growing as new services are being created. If you fear your own copy is incomplete, I'd suggest to copy a new <tt>/etc/services</tt> from a recent distribution. --> <p>実際には、新しいサービスが作られるたびに <tt>/etc/services</tt> ファ イルは大きくなっていきます。自分が使っている <tt>/etc/services</tt> が 不完全かもしれないと不安であれば、新しいディストリビューションから <tt>/etc/services</tt> をコピーしてくるとよいでしょう。 <!-- ==================================================================== --> <sect2><heading><tt>/etc/inetd.conf</tt> <p> <!--O The <tt>/etc/inetd.conf</tt> file is the configuration file for the <em/inetd/ server daemon. Its function is to tell <em/inetd/ what to do when it receives a connection request for a particular service. For each service that you wish to accept connections for you must tell <em/inetd/ what network server daemon to run and how to run it. --> <tt>/etc/inetd.conf</tt> ファイルは <tt>inetd</tt> サーバデーモンの設 定ファイルです。このファイルはあるサービスへの要求が来たとき、 <em>inetd</em> がどのように処理するかを指定します。受けつけるサービス それぞれについて、どのネットワークデーモンをどのよ うに起動するかについて <tt>inetd</tt> に指定してやらねばなりません。 <p> <!--O Its format is also fairly simple. It is a text file with each line describing a service that you wish to provide. Any text in a line following a `<tt/#/' is ignored and considered a comment. Each line contains seven fields separated by any number of whitespace (tab or space) characters. The general format is as follows: --> このファイルも書式はごく単純です。普通のテキストファイルで各行に提供す べきサービスが記述してあります。<tt>#</tt> 以降の部分はコメントと して無視されます。各行には任意の数の空白文字(タブかスペース)で区切られ た 7 つの欄があります。一般的な書式は以下の通りです: <tscreen><verb> service socket_type proto flags user server_path server_args </verb></tscreen> <descrip> <!--O <p><tag>service</tag>is the service relevant to this configuration as taken from the <tt>/etc/services</tt> file. --> <p><tag>service</tag> <tt>/etc/services</tt> ファイルに指定したそれぞ れのサービス名です。 <!--O <p><tag>socket_type</tag>this field describes the type of socket that this entry will consider relevant, allowable values are: <tt/stream/, <tt/dgram/, <tt/raw/, <tt/rdm/, or <tt/seqpacket/. This is a little technical in nature, but as a rule of thumb nearly all <tt/tcp/ based services use <tt/stream/ and nearly all <tt/udp/ based services use <tt/dgram/. It is only very special types of server daemons that would use any of the other values. --> <p><tag>socket_type</tag> この欄はこのエントリが使用するソケットの種類です。 使えるのは <tt>stream</tt>, <tt>dgram</tt>, <tt>raw</tt>, <tt>rdm</tt>, <tt>seqpacket</tt> です。詳細は技術的な話になるので省略しますが、経験 則で言うと、<tt>tcp</tt> を使ったほぼ全てのサービスは <tt>stream</tt> を使い、<tt>udp</tt> を使ったほぼ全てのサービスは <tt>dgram</tt> を使 います。これ以外のソケットを使うのはごく限られた特殊なサーバだけです。 <!--O <p><tag>proto</tag>the protocol to considered valid for this entry. This should match the appropriate entry in the <tt>/etc/services</tt> file and will typically be either <tt/tcp/ or <tt/udp/. Sun RPC (Remote Procedure Call) based servers will use <tt>rpc/tcp</tt> or <tt>rpc/udp</tt>. --> <p><tag>proto</tag> このエントリが使うプロトコルを示します。ここでの指 定は <tt>/etc/services</tt> の対応するエントリと一致しておらねばならず、 たいていは <tt>tcp</tt> か <tt>udp</tt> のどちらかです。Sun の RPC(Remoto Procedure Call)を使ったサービスでは <tt>rpc/tcp</tt> か <tt>rpc/udp</tt> を使うことがあります。 <!--O <p><tag>flags</tag>there are really only two possible settings for this field. This field setting tells <em/inetd/ whether the network server program frees the socket after it has been started and therefore whether <em/inetd/ can start another one on the next connection request, or whether <em/inetd/ should wait and assume that any server daemon already running will handle the new connection request. Again this is a little tricky to work out, but as a rule of thumb all <tt/tcp/ servers should have this entry set to <tt/nowait/ and most <tt/udp/ servers should have this entry set to <tt/wait/. Be warned there are some notable exceptions to this, so let the example guide you if you are not sure. --> <p><tag>flags</tag> このフィールドには 2 種類しか設定がありません。 <tt>wait</tt> か <tt>nowait</tt> かのどちらかです。 この欄は、<tt>inetd</tt> が起動したネットワークサービス用デーモンが 起動後すぐにソケットを解放して、即座に次の接続リクエストが受付け可能となる のか、ネットワークサービス用デーモンが動いている間は新しい接続 を受けつけずに待つのか、を指定します。この項目の指定方法を説明するのもちょっ と難しいのですが、経験則で言うと <tt>tcp</tt> を使ったサーバでは <tt>nowait</tt> に、<tt>udp</tt> を使ったサーバでは <tt>wait</tt> になっ ているはずです。いくつか例外もありますので、不確実な場合は例 を見てください。 <!--O <p><tag>user</tag>this field describes which user account from <tt>/etc/passwd</tt> will be set as the owner of the network daemon when it is started. This is often useful if you want to safeguard against security risks. You can set the user of an entry to the <tt/nobody/ user so that if the network server security is breached the possible damage is minimized. Typically this field is set to <tt/root/ though, because many servers require root privileges in order to function correctly. --> <p><tag>user</tag> このフィールドには、指定したネットワークサービスを起動する ユーザ名を指定します。このユーザ名は <tt>/etc/passwd</tt> に登録されて いなければなりません。ユーザを指定しておくのはセキュリティ上も役立ちま す。起動するユーザを <tt>nobody</tt> にしておけば、ネットワークサーバ のセキュリティが破られても被害を最小限に留めることが可能です。もっとも、 この欄はたいていの場合 <tt>root</tt> になっています。なぜならば、ほ とんどのサービスでは正しく機能するためにルート権限が必要だからです。 <!--O <p><tag>server_path</tag>this field is pathname to the actual server program to execute for this entry. --> <p><tag>server_path</tag> この欄は実際に実行するサーバプログラムを絶対パスで指定します。 <!--O <p><tag>server_args</tag>this field comprises the rest of the line and is optional. This field is where you place any command line arguments that you wish to pass to the server daemon program when it is launched. --> <p><tag>server_args</tag> この欄は行の残りの部分全てからなり、なくても 構いません。この欄はサーバデーモンプログラムを起動する際に渡す コマンドライン引数を指定するために使います。 </descrip> <!-- .................................................................... --> <!--O <sect3>An example <tt>/etc/inetd.conf</tt> --> <sect3>/etc/inetd.conf の例 <p> <!--O As for the <tt>/etc/services</tt> file all modern distributions will include a good <tt>/etc/inetd.conf</tt> file for you to work with. Here, for completeness is the <tt>/etc/inetd.conf</tt> file from the <htmlurl url="http://www.debian.org/" name="Debian"> distribution. --> <tt>/etc/services</tt> ファイルと同じく、最近の Linux ディストリビューションには充分な <tt>/etc/inetd.conf</tt> ファイルが付 属しています。ここでも <url url="http://www.debian.org/" name="Debian"> ディストリビューション からコピーしてきた <tt>/etc/inetd.conf</tt> の例を示すことにしましょう。 <tscreen><verb> # /etc/inetd.conf: see inetd(8) for further informations. # # Internet server configuration database # # # Modified for Debian by Peter Tobias <tobias@et-inf.fho-emden.de> # # <service_name> <sock_type> <proto> <flags> <user> <server_path> <args> # # Internal services # #echo stream tcp nowait root internal #echo dgram udp wait root internal discard stream tcp nowait root internal discard dgram udp wait root internal daytime stream tcp nowait root internal daytime dgram udp wait root internal #chargen stream tcp nowait root internal #chargen dgram udp wait root internal time stream tcp nowait root internal time dgram udp wait root internal # # These are standard services. # telnet stream tcp nowait root /usr/sbin/tcpd /usr/sbin/in.telnetd ftp stream tcp nowait root /usr/sbin/tcpd /usr/sbin/in.ftpd #fsp dgram udp wait root /usr/sbin/tcpd /usr/sbin/in.fspd # # Shell, login, exec and talk are BSD protocols. # shell stream tcp nowait root /usr/sbin/tcpd /usr/sbin/in.rshd login stream tcp nowait root /usr/sbin/tcpd /usr/sbin/in.rlogind #exec stream tcp nowait root /usr/sbin/tcpd /usr/sbin/in.rexecd talk dgram udp wait root /usr/sbin/tcpd /usr/sbin/in.talkd ntalk dgram udp wait root /usr/sbin/tcpd /usr/sbin/in.ntalkd # # Mail, news and uucp services. # smtp stream tcp nowait root /usr/sbin/tcpd /usr/sbin/in.smtpd #nntp stream tcp nowait news /usr/sbin/tcpd /usr/sbin/in.nntpd #uucp stream tcp nowait uucp /usr/sbin/tcpd /usr/lib/uucp/uucico #comsat dgram udp wait root /usr/sbin/tcpd /usr/sbin/in.comsat # # Pop et al # #pop-2 stream tcp nowait root /usr/sbin/tcpd /usr/sbin/in.pop2d #pop-3 stream tcp nowait root /usr/sbin/tcpd /usr/sbin/in.pop3d # # `cfinger' is for the GNU finger server available for Debian. (NOTE: The # current implementation of the `finger' daemon allows it to be run as `root'.) # #cfinger stream tcp nowait root /usr/sbin/tcpd /usr/sbin/in.cfingerd #finger stream tcp nowait root /usr/sbin/tcpd /usr/sbin/in.fingerd #netstat stream tcp nowait nobody /usr/sbin/tcpd /bin/netstat #systat stream tcp nowait nobody /usr/sbin/tcpd /bin/ps -auwwx # # Tftp service is provided primarily for booting. Most sites # run this only on machines acting as "boot servers." # #tftp dgram udp wait nobody /usr/sbin/tcpd /usr/sbin/in.tftpd #tftp dgram udp wait nobody /usr/sbin/tcpd /usr/sbin/in.tftpd /boot #bootps dgram udp wait root /usr/sbin/bootpd bootpd -i -t 120 # # Kerberos authenticated services (these probably need to be corrected) # #klogin stream tcp nowait root /usr/sbin/tcpd /usr/sbin/in.rlogind -k #eklogin stream tcp nowait root /usr/sbin/tcpd /usr/sbin/in.rlogind -k -x #kshell stream tcp nowait root /usr/sbin/tcpd /usr/sbin/in.rshd -k # # Services run ONLY on the Kerberos server (these probably need to be corrected) # #krbupdate stream tcp nowait root /usr/sbin/tcpd /usr/sbin/registerd #kpasswd stream tcp nowait root /usr/sbin/tcpd /usr/sbin/kpasswdd # # RPC based services # #mountd/1 dgram rpc/udp wait root /usr/sbin/tcpd /usr/sbin/rpc.mountd #rstatd/1-3 dgram rpc/udp wait root /usr/sbin/tcpd /usr/sbin/rpc.rstatd #rusersd/2-3 dgram rpc/udp wait root /usr/sbin/tcpd /usr/sbin/rpc.rusersd #walld/1 dgram rpc/udp wait root /usr/sbin/tcpd /usr/sbin/rpc.rwalld # # End of inetd.conf. ident stream tcp nowait nobody /usr/sbin/identd identd -i </verb></tscreen> <!-- ==================================================================== --> <!--O <sect1><heading>Other miscellaneous network related configuration files. --> <sect1><heading>その他のネットワークに関連した設定ファイル <p> <!--O There are a number of miscellaneous files relating to network configuration under linux that you might be interested in. You may never have to modify these files, but it is worth describing them so you know what they contain and what they are for. --> 他にもさまざまなネットワークに関する設定ファイルがあります。通常これ らを修正する必要はありませんが、どのようなファイルが存在し、それらは何 を設定しているかを知っておいても損は無いでしょう。 <!-- ==================================================================== --> <sect2><heading><tt>/etc/protocols</tt> <p> <!--O The <tt>/etc/protocols</tt> file is a database that maps protocol id numbers against protocol names. This is used by programmers to allow them to specify protocols by name in their programs and also by some programs such as <em>tcpdump</em> to allow them to display names instead of numbers in their output. The general syntax of the file is: --> <tt>/etc/protocols</tt> ファイルは、 TCP/IP パケットに埋めこまれている各 種プロトコルの識別番号とプロトコルを結びつけるデータベースです。 このファイルを使えば、プログラムから特定のプロトコルを識別番号では なく名前で参照できるようになり、<em>tcpdump</em> のようなプ ログラムも、番号ではなくプロトコル名で出力するようになります。この ファイルの一般的な書式は以下の通りです: <tscreen><verb> protocolname number aliases </verb></tscreen> <!--O <p>The <tt>/etc/protocols</tt> file supplied with the <htmlurl url="http://www.debian.org/" name="Debian"> distribution is as follows: --> <p><url url="http://www.debian.org/" name="Debian"> ディストリビューション に付属の <tt>/etc/protocols</tt> ファイルは以下の通りです: <tscreen><verb> # /etc/protocols: # $Id: NET3-4-HOWTO.sgml,v 1.14 2000/12/18 02:12:43 morimoto Exp $ # # Internet (IP) protocols # # from: @(#)protocols 5.1 (Berkeley) 4/17/89 # # Updated for NetBSD based on RFC 1340, Assigned Numbers (July 1992). ip 0 IP # internet protocol, pseudo protocol number icmp 1 ICMP # internet control message protocol igmp 2 IGMP # Internet Group Management ggp 3 GGP # gateway-gateway protocol ipencap 4 IP-ENCAP # IP encapsulated in IP (officially ``IP'') st 5 ST # ST datagram mode tcp 6 TCP # transmission control protocol egp 8 EGP # exterior gateway protocol pup 12 PUP # PARC universal packet protocol udp 17 UDP # user datagram protocol hmp 20 HMP # host monitoring protocol xns-idp 22 XNS-IDP # Xerox NS IDP rdp 27 RDP # "reliable datagram" protocol iso-tp4 29 ISO-TP4 # ISO Transport Protocol class 4 xtp 36 XTP # Xpress Tranfer Protocol ddp 37 DDP # Datagram Delivery Protocol idpr-cmtp 39 IDPR-CMTP # IDPR Control Message Transport rspf 73 RSPF # Radio Shortest Path First. vmtp 81 VMTP # Versatile Message Transport ospf 89 OSPFIGP # Open Shortest Path First IGP ipip 94 IPIP # Yet Another IP encapsulation encap 98 ENCAP # Yet Another IP encapsulation </verb></tscreen> <!-- ==================================================================== --> <sect2><heading><tt>/etc/networks</tt> <p> <!--O The <tt>/etc/networks</tt> file has a similar function to that of the <tt>/etc/hosts</tt> file. It provides a simple database of network names against network addresses. Its format differs in that there may be only two fields per line and that the fields are coded as: --> <tt>/etc/networks</tt> ファイルは <tt>/etc/hosts</tt> ファイルとよく似 た機能を持っており、ネットワークアドレスとネットワーク名の対応表になっ ています。<tt>/etc/hosts</tt> ファイルとの違いは各行に 2 つの欄しか無 いことで、各行は以下のように構成されます: <tscreen><verb> networkname networkaddress </verb></tscreen> <!--O An example might look like: --> 例えばこのようになります: <tscreen><verb> loopnet 127.0.0.0 localnet 192.168.0.0 amprnet 44.0.0.0 </verb></tscreen> <!--O <p>When you use commands like the <em>route</em> command, if a destination is a network and that network has an entry in the <tt>/etc/networks</tt> file then the route command will display that network name instead of its address. --> <p><em>route</em> コマンドを使う際、目的地がネットワークで、そのネットワー クアドレスが <tt>/etc/networks</tt> に登録されていれば、<tt>route</tt> コマンドの出力はアドレスではなく名前になります。 <!-- ==================================================================== --> <!--O <sect1><heading>Network Security and access control. --> <sect1><heading>ネットワークのセキュリティとアクセス制御 <p> <!--O Let me start this section by warning you that securing your machine and network against malicious attack is a complex art. I do not consider myself an expert in this field at all and while the following mechanisms I describe will help, if you are serious about security then I recommend you do some research of your own into the subject. There are many good references on the Internet relating to the subject, including the <htmlurl url="Security-HOWTO.html" name="Security-HOWTO"> --> まず最初に注意しておきますが、悪意を持った攻撃からマシンとネットワーク のセキュリティを守るのは複雑な技術が必要になります。私自身この分野につ いてはとてもエキスパートとは言えません。そのため、以下に有益であろう手 段を紹介しますが、もしセキュリティについて真剣に考えるならば自分自身で 調べてみることをお勧めします。 <url url="Security-HOWTO.html" name="Security-HOWTO"> を含めて、 インターネット上にはこの問題についての情報が豊富にあります。 <p> <!--O An important rule of thumb is: `<bf>Don't run servers you don't intend to use</bf>'. Many distributions come configured with all sorts of services configured and automatically started. To ensure even a minimum level of safety you should go through your <tt>/etc/inetd.conf</tt> file and comment out (<em>place a `#' at the start of the line</em>) any entries for services you don't intend to use. Good candidates are services such as: <tt/shell/, <tt/login/, <tt/exec/, <tt/uucp/, <tt/ftp/ and informational services such as <tt/finger/, <tt/netstat/ and <tt/systat/. --> 重要な経験則は 「<bf>使うつもりのないサーバは起動しない</bf>」 ことです。Linux の各種ディストリビューションでは予め全てのサービスが設 定され、それらが自動的に起動するようになっています。最低限の安全を確保 するために、まず <tt>/etc/inted.conf</tt> に目を通して、使うつもりのな いサービスをコメントアウト(行頭に # を付ける)しておきましょう。 コメントアウトしておいた方がいいサービスは <tt>shell</tt>、<tt>login</tt>、 <tt>exec</tt>、<tt>uucp</tt>、<tt>ftp</tt> といったサービスと、 <tt>finger</tt>, <tt>netstat</tt>, <tt>systat</tt> といった情報提供 用サービスです。 <p> <!--O There are all sorts of security and access control mechanisms, I'll describe the most elementary of them. --> セキュリティとアクセス制御のメカニズムにはさまざまな種類がありますので、 以下ではごく基本的なものだけを説明します。 <!-- ==================================================================== --> <sect2><heading>/etc/ftpusers <p> <!--O The <tt>/etc/ftpusers</tt> file is a simple mechanism that allows you to deny certain users from logging into your machine via ftp. The <tt>/etc/ftpusers</tt> file is read by the ftp daemon program (<em/ftpd/) when an incoming ftp connection is received. The file is a simple list of those users who are disallowed from logging in. It might looks something like: --> <tt>/etc/ftpusers</tt> ファイルは、特定のユーザを ftp 経由でログインさせない ための簡単な仕組みです。<tt>/etc/ftpusers</tt> は ftp 接 続があった際に ftp デーモンプログラム <em>ftpd</em> が読みこみます。こ のファイルは単に ftp を許可しないユーザを列挙しただけのものです。この ファイルは以下のような内容です: <tscreen><verb> # /etc/ftpusers - users not allowed to login via ftp root uucp bin mail </verb></tscreen> <!-- ==================================================================== --> <sect2><heading>/etc/securetty <p> <!--O The <tt>/etc/securetty</tt> file allows you to specify which <tt/tty/ devices <tt/root/ is allowed to login on. The <tt>/etc/securetty</tt> file is read by the login program (usually <em>/bin/login</em>). Its format is a list of the tty devices names allowed, on all others <tt/root/ login is disallowed: --> <tt>/etc/securetty</tt> ファイルを使うと、どの <tt>tty</tt> デバイスから <tt>root</tt> がログオンできるかを指定できます。 <tt>/etc/securetty</tt> ファイルは login プログラム(通常は <em>/bin/login</em>)が読みます。このファイルにはルートのアクセスを許可 する tty を列挙します。その他の tty からはルートでアクセスできません。 <tscreen><verb> # /etc/securetty - tty's on which root is allowed to login tty1 tty2 tty3 tty4 </verb></tscreen> <!-- ==================================================================== --> <!--O <sect2><heading>The <em>tcpd</em> hosts access control mechanism. --> <sect2><heading>tcpd を使ったホスト別アクセス制御機構 <p> <!--O The <em>tcpd</em> program you will have seen listed in the same <tt>/etc/inetd.conf</tt> provides logging and access control mechanisms to services it is configured to protect. --> <em>tcpd</em> プログラムは <tt>/etc/inetd.conf</tt> で見たように、指定 されたサービスをより安全に実行するために、ログインとアクセス制御の機能 を提供します。 <p> <!--O When it is invoked by the <em>inetd</em> program it reads two files containing access rules and either allows or denies access to the server it is protecting accordingly. --> <em>inetd</em> から起動されると、<tt>tcpd</tt> は指定したサービスへの アクセスを許可するか拒否するかを記述した 2 つのファイルを読み込みます。 <p> <!--O It will search the rules files until the first match is found. If no match is found then it assumes that access should be allowed to anyone. The files it searches in sequence are: <tt>/etc/hosts.allow</tt>, <tt>/etc/hosts.deny</tt>. I'll describe each of these in turn. For a complete description of this facility you should refer to the appropriate <em>man</em> pages (<tt>hosts_access(5)</tt> is a good starting point). --> <tt>tcpd</tt> は <tt>/etc/hosts.allow</tt> と <tt>/etc/hosts.deny</tt> の 2 つのファイルをこの順に調べ、一致する記述があるかどうかをチェック します。一致する記述がなければそのサービスは全ての人に許可しているもの とみなします。以下では、これらのファイルについて順に説明していきます。 詳しくはそれぞれの man ページを読んでください(まず <tt>hosts_access(5)</tt> から始めるのがよいでしょう)。 <!-- .................................................................... --> <sect3><heading>/etc/hosts.allow <p> <!--O The <tt>/etc/hosts.allow</tt> file is a configuration file of the <em>/usr/sbin/tcpd</em> program. The <tt>hosts.allow</tt> file contains rules describing which hosts are <em>allowed</em> access to a service on your machine. --> <tt>/etc/hosts.allow</tt> ファイルは <em>/usr/sbin/tcpd</em> 用の設定 ファイルです。<tt>hosts.allow</tt> ファイルにはどのマシンからの接続を 許可するかの設定を記述します。 <p> <!--O The file format is quite simple: --> このファイルの書式はごく単純です。 <tscreen><verb> # /etc/hosts.allow # # <service list>: <host list> [: command] </verb></tscreen> <descrip> <!--O <p><tag><tt/service list/ </tag>is a comma delimited list of server names that this rule applies to. Example server names are: <tt/ftpd/, <tt/telnetd/ and <tt/fingerd/. --> <p><tag><tt/service list/</tag> は、このルールを適用するサーバプログラムをコンマで区切って記述します。 サーバプログラムには <tt>ftpd</tt> <tt>telnetd</tt> <tt>fingerd</tt> などがあります。 <!--O <p><tag><tt/host list/ </tag>is a comma delimited list of host names. You may also use IP addresses here. You may additionally specify hostnames or addresses using wildcard characters to match groups of hosts. Examples include: <tt/gw.vk2ktj.ampr.org/ to match a specific host, <tt>.uts.edu.au</tt> to match any hostname ending in that string, <tt>44.</tt> to match any IP address commencing with those digits. There are some special tokens to simplify configuration, some of these are: <tt/ALL/ matches every host, <tt/LOCAL/ matches any host whose name does not contain a `<tt/./' ie is in the same domain as your machine and <tt/PARANOID/ matches any host whose name does not match its address (name spoofing). There is one last token that is also useful. The <tt/EXCEPT/ token allows you to provide a list with exceptions. This will be covered in an example later. --> <p><tag><tt/host list/ </tag> ホスト名をコンマで区切って記述します。ホスト名の代わりに IP アドレスを 使うことも可能です。ワイルドカードキャラクタを使って複数のホストや IP アドレスを指定可能です。例えば、<tt>gw.vk2ktj.ampr.org</tt> と書くと 1 つのホストを指定したことになりますが、<tt>.uts.edu.au</tt> とするとこの文字列で終るホスト(このドメインに属するホスト)全てを指定し たことになります。<tt>44.</tt> とすると、この IP アドレスで始まるホス ト全てに一致します。設定を簡単にするためにいくつか特別のキーワードが用 意してあります。例えば <tt>ALL</tt> は全てのホスト名にマッチし、 <tt>LOCAL</tt> は <tt>.</tt> を含まないホスト名、すなわちそのマシンと 同じドメインにあるマシンにマッチし、<tt>PARANOID</tt> は登録されている ホスト名と IP アドレスがマッチしない全てのマシン(名前を詐称しているマ シン)に一致します。もう一つ、役に立つキーワードに <tt>EXCEPT</tt> があ ります。これは例外リストになります。例については後述します。 <!--O <p><tag><tt/command/ </tag>is an optional parameter. This parameter is the full pathname of a command that would be executed everytime this rule is matched. It could for example run a command that would attempt to identify who is logged onto the connecting host, or to generate a mail message or some other warning to a system administrator that someone is attempting to connect. There are a number of expansions that may be included, some common examples are: <tt/%h/ expands to the name of the connecting host or address if it doesn't have a name, <tt/%d/ the daemon name being called. --> <p><tag><tt/command/</tag> 省略してもよいパラメータで、この行の規則が適用された際に実行されるコ マンドへのフルパスを指定します。この機能を使えば、接続してきたホストに 誰がログインしているかを調べたり、誰かが接続しようとしたときにメールなどの 手段を用いて管理者に報せることが可能です。ここには様々な変数が用意され ており、たとえば <tt>%h</tt> は接続してきたホスト名(ホスト名が分らな い場合には IP アドレス)に変換され、<tt>%d </tt> は呼び出されたデーモン 名に変換されます。 </descrip> <!--O <p>An example: --> <p>例を示します: <tscreen><verb> # /etc/hosts.allow # # Allow mail to anyone in.smtpd: ALL # All telnet and ftp to only hosts within my domain and my host at home. telnetd, ftpd: LOCAL, myhost.athome.org.au # Allow finger to anyone but keep a record of who they are. fingerd: ALL: (finger @%h | mail -s "finger from %h" root) </verb></tscreen> <!-- .................................................................... --> <sect3><heading>/etc/hosts.deny <p> <!--O The <tt>/etc/hosts.deny</tt> file is a configuration file of the <em>/usr/sbin/tcpd</em> program. The <tt>hosts.deny</tt> file contains rules describing which hosts are <em>disallowed</em> access to a service on your machine. --> <tt>/etc/hosts.deny</tt> も <em>/usr/sbin/tcpd</em> プログラムの設定ファ イルであり、どのホストからの接続を<em>拒否</em>するかを設定します。 <p> <!--O A simple sample would look something like this: --> 以下に簡単な例を示します: <tscreen><verb> # /etc/hosts.deny # # Disallow all hosts with suspect hostnames ALL: PARANOID # # Disallow all hosts. ALL: ALL </verb></tscreen> <!--O <p>The <tt>PARANOID</tt> entry is really redundant because the other entry traps everything in any case. Either of these entry would make a reasonable default depending on your particular requirement. --> <tt>PARANOID</tt> の指定は実際のところ不要です。なぜならば、その次の エントリで全ての接続を拒否しているからです。必要に応じてこれらのエント リのどちらかをデフォルトにするのもいいでしょう。 <p> <!--O Having an <tt>ALL: ALL</tt> default in the <tt>/etc/hosts.deny</tt> and then specifically enabling on those services and hosts that you want in the <tt>/etc/hosts.allow</tt> file is the safest configuration. --> <tt>/etc/hosts.deny</tt> で <tt>ALL:ALL</tt> を設定しておき、 有効にしたいサービスとホストだけを <tt>/etc/hosts.allow</tt> で許可す るのが最も安全な設定でしょう。 <!-- ==================================================================== --> <sect2><heading>/etc/hosts.equiv <p> <!--O The <tt/hosts.equiv/ file is used to grant certain hosts and users access rights to accounts on your machine without having to supply a password. This is useful in a secure environment where you control all machines, but is a security hazard otherwise. Your machine is only as secure as the least secure of the trusted hosts. To maximize security, don't use this mechanism and encourage your users not to use the <tt/.rhosts/ file as well. --> <tt>hosts.equiv</tt> ファイルは、パスワード無しにあなたのマシンにアク セスできるホストとユーザを指定します。この機能は全てのマシンがあなたの 管轄下にある安全な環境では便利ですが、それ以外の状況ではセキュリティ的 には危険です。あなたのマシンのセキュリティは、このファイルに登録したホ ストの中のセキュリティが最も弱いマシンと同じレベルになってしまいます。 セキュリティを高めるためにはこの機能は使わないようにして、 各ユーザにも <tt>.rhosts</tt> ファイルを使わないようにさせましょう。 <!-- ==================================================================== --> <!--O <sect2><heading>Configure your <em/ftp/ daemon properly. --> <sect2><heading>ftp デーモンの適切な設定 <p> <!--O Many sites will be interested in running an anonymous <em/ftp/ server to allow other people to upload and download files without requiring a specific userid. If you decide to offer this facility make sure you configure the <em/ftp/ daemon properly for anonymous access. Most <em/man/ pages for <tt>ftpd(8)</tt> describe in some length how to go about this. You should always ensure that you follow these instructions. An important tip is to not use a copy of your <tt>/etc/passwd</tt> file in the anonymous account <tt>/etc</tt> directory, make sure you strip out all account details except those that you must have, otherwise you will be vulnerable to brute force password cracking techniques. --> 多くのサイトで、匿名(anonymous) <em>ftp</em> サーバを動かして、特定の ユーザ ID が無い人々にもファイルのダウンロードやアップロードを許可して います。この機能を使う場合は <em>ftp</em> デーモンが匿名アクセスを正し く処理できるように設定されているかを確認してください。 <tt>ftpd(8)</tt> の man ページは、この設定のためにかなりの紙幅を費やし ているので、それらの指示に従って設定しているか、常に注意してください。 重要なポイントは <tt>/etc/passwd</tt> ファイルのコピーを匿名 ftp 用の <tt>/etc/</tt> ディレクトリで使わないことです。絶対に必要なアカウント 以外は passwd ファイルから削除しておきましょう。そうしないと総当たり式 の攻撃でパスワードを解読されてしまう危険性があります。 <!-- ==================================================================== --> <!--O <sect2><heading>Network Firewalling. --> <sect2><heading>ファイアウォール <p> <!--O Not allowing datagrams to even reach your machine or servers is an excellent means of security. This is covered in depth in the <htmlurl url="Firewall-HOWTO.html" name="Firewall-HOWTO">, and (more concisely) in a later section of this document. --> あなたのマシンやサーバにまでデータグラムが届きさえしないようにすること はセキュリティ的に優れた方法です。この方法については <url url="Firewall-HOWTO.html" name="Firewall-HOWTO"> で詳しく説明されています。(それよりずっと簡単ですが)本文書でも後述します。 <!-- ==================================================================== --> <!--O <sect2><heading>Other suggestions. --> <sect2><heading>その他のお勧め <p> <!--O Here are some other, potentially religious suggestions for you to consider. --> 宗教的なところもありますが、その他の注意しておくべきポイントを述べてお きます。 <descrip> <!--O <p><tag>sendmail</tag>despite its popularity the <em/sendmail/ daemon appears with frightening regularity on security warning announcements. Its up to you, but I choose not to run it. --> <p><tag><em>sendmail</em> デーモン</tag>これは有名なプログラムですが、 しばしばセキュリティ 的な問題についても報告されます。どうするかはおまかせしますが、私は <tt>sendmail</tt> は動かさないことにしました。 <!--O <p><tag>NFS and other Sun RPC services</tag>be wary of these. There are all sorts of possible exploits for these services. It is difficult finding an option to services like NFS, but if you configure them, make sure you are careful with who you allow mount rights to. --> <p><tag>NFS とその他 Sun の RPC を使うサービス</tag>これについても慎重になる べきです。これらのサービスはさまざまな方法で悪用可能です。NFS のような サービスの代わりを見つけるのは困難ですが、これらを設定する際には誰にマウ ント許可を与えるかに充分注意する必要があります。 </descrip> <!-- FIXME: check everything from here onwards --> <!--######################################################################--> <!--O <sect><heading>IP- and Ethernet-Related Information --> <sect><heading>IP 関係、イーサネット関係の情報 <!--O <p>This section covers information specific to Ethernet and IP. These subsections have been grouped together because I think they are the most interesting ones in the formerly-called ``Technology Specific'' Section. Anyone with a LAN should be able to benefit from these goodies. --> <p>この章では、イーサネットと IP に固有の情報を説明します。この章に含 まれる内容は、以前の版で「それぞれのネットワーク技術についての情報」 という章に含まれていた内容から、筆者が特に面白いと思ったものを ピックアップして別個にまとめたものです。 LAN を引いている人なら誰でも、この章の内容は役に立つはずです。 <!-- ==================================================================== --> <!--O <sect1><heading>Ethernet --> <sect1><heading>イーサネット <p> <!--O Ethernet device names are `<tt/eth0/', `<tt/eth1/', `<tt/eth2/' etc. The first card detected by the kernel is assigned `<tt/eth0/' and the rest are assigned sequentially in the order they are detected. --> イーサネットのデバイス名は `<tt>eth0</tt>', `<tt>eth1</tt>', `<tt>eth2</tt>'のようになります。カーネルが検出した最初のカードが `<tt>eth0</tt>'で、以下カードが検出する順に番号が振られていきます。 <p> <!--O By default, the Linux kernel only probes for one Ethernet device, you need to pass command line arguments to the kernel in order to force detection of furter boards. --> デフォルトでは Linux カーネルはイーサネットデバイスを一つしか検出しな いので、それ以上のボードをカーネルに検出させるためには、コマンドライン 引数で指定する必要があります。 <p> <!--O To learn how to make your ethernet card(s) working under Linux you should refer to the <htmlurl url="Ethernet-HOWTO.html" name="Ethernet-HOWTO">. --> Linux でイーサネットカードを使う方法の詳細については <url url="Ethernet-HOWTO.html" name="Ethernet-HOWTO"> を参照してください。 <p> <!--O Once you have your kernel properly built to support your ethernet card then configuration of the card is easy. --> お使いのイーサネットカードをサポートするようにカーネルをきちんと再構築 してしまえば設定そのものは簡単です。 <p> <!--O Typically you would use something like (which most distributions already do for you, if you configured them to support your ethernet): --> 設定は通常、以下のようになります(ほとんどのディストリビューションは、 イーサネットをサポートするように設定すれば自動的にこの設定も行う はずです): <p> <tscreen><verb> root# ifconfig eth0 192.168.0.1 netmask 255.255.255.0 up root# route add -net 192.168.0.0 netmask 255.255.255.0 eth0 </verb></tscreen> <p> <!--O Most of the ethernet drivers were developed by Donald Becker, <tt/becker@CESDIS.gsfc.nasa.gov/. --> ほとんどのイーサネットデバイスは Donald Becker <tt/becker@CESDIS.gsfc.nasa.gov/ が開発しました。 <!-- ==================================================================== --> <!--O <sect1><heading>EQL - multiple line traffic equaliser --> <sect1><heading>EQL - 複数回線のトラフィックイコライザ <p> <!--O The EQL device name is `<tt/eql/'. With the standard kernel source you may have only one EQL device per machine. EQL provides a means of utilizing multiple point to point lines such as PPP, slip or plip as a single logical link to carry tcp/ip. Often it is cheaper to use multiple lower speed lines than to have one high speed line installed. --> EQL のデバイス名は `<tt>eql</tt>' です。標準のカーネルソースでは一台の マシンで一つの EQL デバイスしか使えないかもしれません。EQL を使えば、 PPP や slip、plip といった二点間接続を複数用意して、それらを一つの論理 的な接続のように利用できます。たいていの場合、高速の専用線よりも低速回 線を複数まとめた方が安価に回線速度を稼げます。 <!--O <p><bf/Kernel Compile Options/: --> <bf/カーネルのコンパイルオプション/: <tscreen><verb> Network device support ---> [*] Network device support <*> EQL (serial line load balancing) support </verb></tscreen> <p> <!--O To support this mechanism the machine at the other end of the lines must also support EQL. Linux, Livingstone Portmasters and newer dial-in servers support compatible facilities. --> この機能を使うためには、接続先のマシンも EQL 機能を持っていなければい けません。Linux、 Livingstone Portmaster シリーズ以降のダイアルイン サーバなどがこの機能をサポートしています。 <p> <!--O To configure EQL you will need the eql tools which are available from: <htmlurl url="ftp://metalab.unc.edu/pub/linux/system/Serial/eql-1.2.tar.gz" name="metalab.unc.edu">. --> EQL を設定するには、 <url url="ftp://metalab.unc.edu/pub/linux/system/Serial/eql-1.2.tar.gz" name="metalab.unc.edu"> から入手できる EQL 用ツールが必要になります。 <p> <!--O Configuration is fairly straightforward. You start by configuring the eql interface. The eql interface is just like any other network device. You configure the IP address and mtu using the <em/ifconfig/ utility, so something like: --> EQL の設定はごく簡単です。まず最初に eql インターフェイスを設定します。 eql インターフェースは他のネットワークデバイスとほとんど同じです。 IP アドレスや mtu は <em>ifconfig</em> を用いて下記のように設定します。 <tscreen><verb> root# ifconfig eql 192.168.10.1 mtu 1006 </verb></tscreen> <p> <!--O Next you need to manually initiate each of the lines you will use. These may be any combination of point to point network devices. How you initiate the connections will depend on what sort of link they are, refer to the appropriate sections for further information. --> 次に、使おうとしている回線それぞれを手動で起動します。二点間接 続を複数用意することになるでしょう。どのように起動するかは使う接続の種 類に依存しますので、詳しい情報はそれぞれの接続形態について説明した章を ご覧ください。 <p> <!--O Lastly you need to associate the serial link with the EQL device, this is called `enslaving' and is done with the <em/eql_enslave/ command as shown: --> 最後にシリアル接続を EQL デバイスに結びつけます。これは「スレーブ化 (enslalving)」と呼ばれ、<em>eql_enslave</em> コマンドによって 以下のように行います: <tscreen><verb> root# eql_enslave eql sl0 28800 root# eql_enslave eql ppp0 14400 </verb></tscreen> <!--O <p>The `<em>estimated speed</em>' parameter you supply <em/eql_enslave/ doesn't do anything directly. It is used by the EQL driver to determine what share of the datagrams that device should receive, so you can fine tune the balancing of the lines by playing with this value. --> <p><em>eql_enslave</em> コマンドに与える「推定回線速度(estimated speed)」 パラメータは、直接には何もしません。このパラメータは EQL デバイス がデータグラムをそれぞれの回線からどのような割合で受けるかを決定するた めに使われるので、この数字をうまく調整して最適値を探してください。 <!--O To disassociate a line from an EQL device you use the <em/eql_emancipate/ command as shown: --> EQL デバイスから回線を開放するには、以下のように <em>eql_emancipate</em> コマンドを使います: <tscreen><verb> root# eql_emancipate eql sl0 </verb></tscreen> <p> <!--O You add routing as you would for any other point to point link, except your routes should refer to the <tt/eql/ device rather than the actual serial devices themselves, typically you would use: --> 他の二点間接続と同じく、EQL デバイスを使った経路制御も可能ですが、 その場合実際のシリアルデバイスではなく <tt>eql</tt> デバイスを経路に 使います。例えば、以下のように経路を設定できます: <tscreen><verb> root# route add default eql </verb></tscreen> <p> <!--O The EQL driver was developed by Simon Janes, <tt/simon@ncm.com/. --> EQL ドライバは Simon Janes <tt/simon@ncm.com/ が開発しました。 <!-- ==================================================================== --> <!--O <sect1><heading>IP Accounting (for Linux-2.0) --> <sect1><heading>IP パケット統計情報の取得(Linux 2.0 用) <p> <!--O The IP accounting features of the Linux kernel allow you to collect and analyze some network usage data. The data collected comprises the number of packets and the number of bytes accumulated since the figures were last reset. You may specify a variety of rules to categorize the figures to suit whatever purpose you may have. This option has been removed in kernel 2.1.102, because the old ipfwadm-based firewalling was replaced by ``ipfwchains''. --> カーネルに IP パケット統計情報の取得機能(IP accounting 機能)を組み込め ば、ネットワークの使用記録を取ることができます。記録できるデータは、最 後にカウンタをリセットしてからやりとりしたパケット数とデータのバイト数 です。カテゴリごとに異なるルールを指定でき、目的に応じた設定が可能です。 このオプションはカーネル 2.1.102 でなくなりました。古い ipfwadm ベース のファイアウォールが ``ipfwchains'' によって置き換えられたからです。 <!--O <p><bf/Kernel Compile Options/: --> <p><bf/カーネルのコンパイルオプション/: <tscreen><verb> Networking options ---> [*] IP: accounting </verb></tscreen> <!--O <p>After you have compiled and installed the kernel you need to use the <em/ipfwadm/ command to configure IP accounting. There are many different ways of breaking down the accounting information that you might choose. I've picked a simple example of what might be useful to use, you should read the <em/ipfwadm/ man page for more information. --> <p>カーネルに必要な機能を組み込んで再起動した後、<em>ipfwadm</em> コマン ドを使って IP パケット統計取得機能を設定します。IP パケットの統計情報 を細分するための方法はいろいろあります。以下に実際に使えそうな簡単な設 定例を示してみます。詳細については <em>ipfwadm</em> の man ページを読 んでください。 <p> <!--O Scenario: You have a ethernet network that is linked to the internet via a PPP link. On the ethernet you have a machine that offers a number of services and that you are interested in knowing how much traffic is generated by each of ftp and world wide web traffic, as well as total tcp and udp traffic. --> 状況設定: PPP 経由でインターネットに接続されたイーサネットのネットワークが あるとします。イーサネットのネットワーク上にはさまざまなサービスを提供 しているマシンがあり、ftp や WWW といったトラフィックがどれくらい生じ ているかを知りたいとします。また tcp, udp 全体についても同様のことを 知りたいとします。 <p> <!--O You might use a command set that looks like the following, which is shown as a shell script: --> 以下のようなコマンド群を実行することになります。シェルスクリプト の形にまとめて示します: <tscreen><verb> #!/bin/sh # # Flush the accounting rules ipfwadm -A -f # # Set shortcuts localnet=44.136.8.96/29 any=0/0 # Add rules for local ethernet segment ipfwadm -A in -a -P tcp -D $localnet ftp-data ipfwadm -A out -a -P tcp -S $localnet ftp-data ipfwadm -A in -a -P tcp -D $localnet www ipfwadm -A out -a -P tcp -S $localnet www ipfwadm -A in -a -P tcp -D $localnet ipfwadm -A out -a -P tcp -S $localnet ipfwadm -A in -a -P udp -D $localnet ipfwadm -A out -a -P udp -S $localnet # # Rules for default ipfwadm -A in -a -P tcp -D $any ftp-data ipfwadm -A out -a -P tcp -S $any ftp-data ipfwadm -A in -a -P tcp -D $any www ipfwadm -A out -a -P tcp -S $any www ipfwadm -A in -a -P tcp -D $any ipfwadm -A out -a -P tcp -S $any ipfwadm -A in -a -P udp -D $any ipfwadm -A out -a -P udp -S $any # # List the rules ipfwadm -A -l -n # </verb></tscreen> <!--O <p>The names ``ftp-data'' and ``www'' refer to lines in <tt>/etc/services</tt>. The last command lists each of the Accounting rules and displays the collected totals. --> <p>``ftp-data'' や ``www'' といった名前は <tt>/etc/services</tt> にお ける設定を参照します。最後のコマンドはそれぞれの IP パケット統計の取得 規則を列挙し、集めたデータの合計値を表示します。 <!--O <p>An important point to note when analyzing IP accounting is that <bf/totals for all rules that match will be incremented/ so that to obtain differential figures you need to perform appropriate maths. For example if I wanted to know how much data was not ftp nor www I would substract the individual totals from the rule that matches all ports. --> <P>IP パケット統計情報を解析する際に注意すべきなのは、<bf>マッチしたす べての規則における各合計エリアに対して(転送バイト数やパケット数が)それ ぞれ足しこまれる</bf>ということです。このため、差として現れる値を得る には多少の計算が必要です。例えば、ftp でも www でもないデータ量を知る ためには、全てのポートにマッチする規則より得た転送量から、ftp や www といった個々のプロトコルで転送したデータ量を引く必要があります。 <tscreen><verb> root# ipfwadm -A -l -n IP accounting rules pkts bytes dir prot source destination ports 0 0 in tcp 0.0.0.0/0 44.136.8.96/29 * -> 20 0 0 out tcp 44.136.8.96/29 0.0.0.0/0 20 -> * 10 1166 in tcp 0.0.0.0/0 44.136.8.96/29 * -> 80 10 572 out tcp 44.136.8.96/29 0.0.0.0/0 80 -> * 252 10943 in tcp 0.0.0.0/0 44.136.8.96/29 * -> * 231 18831 out tcp 44.136.8.96/29 0.0.0.0/0 * -> * 0 0 in udp 0.0.0.0/0 44.136.8.96/29 * -> * 0 0 out udp 44.136.8.96/29 0.0.0.0/0 * -> * 0 0 in tcp 0.0.0.0/0 0.0.0.0/0 * -> 20 0 0 out tcp 0.0.0.0/0 0.0.0.0/0 20 -> * 10 1166 in tcp 0.0.0.0/0 0.0.0.0/0 * -> 80 10 572 out tcp 0.0.0.0/0 0.0.0.0/0 80 -> * 253 10983 in tcp 0.0.0.0/0 0.0.0.0/0 * -> * 231 18831 out tcp 0.0.0.0/0 0.0.0.0/0 * -> * 0 0 in udp 0.0.0.0/0 0.0.0.0/0 * -> * 0 0 out udp 0.0.0.0/0 0.0.0.0/0 * -> * </verb></tscreen> <!-- ==================================================================== --> <!--O <sect1><heading>IP Accounting (for Linux-2.2) --> <sect1><heading>IPパケット統計取得(Linux 2.2 用) <!-- FIXME: describe the new accounting code --> <!--O <p>The new accounting code is accessed via ``IP Firewall Chains''. See <htmlurl url="http://www.adelaide.net.au/~rustcorp/ipfwchains/ipfwchains.html" name="the IP chains home page"> for more information. Among other things, you'll now need to use <em/ipchains/ instead of <tt/ipfwadm/ to configure your filters. (From <tt>Documentation/Changes</tt> in the latest kernel sources). --> <p>新しい IP パケット統計取得機能は「IP Firewall Chains」を通じて利用 します。詳しくは <url url="http://www.adelaide.net.au/~rustcorp/ipfwchains/ipfwchains.html" name="IP chains のホームページ"> を見てください。特に注意すべきなのは、フィルタの設定には <tt/ipfwadm/ ではなく <em/ipchains/ を使う必要がある点です(最新版カーネルの <tt>Documentation/Changes</tt> より)。 <!-- ==================================================================== --> <!--O <sect1><heading>IP Aliasing --> <sect1><heading>IP エイリアス <!--O <p>There are some applications where being able to configure multiple IP addresses to a single network device is useful. Internet Service Providers often use this facility to provide a `customized' to their World Wide Web and ftp offerings for their customers. You can refer to the ``IP-Alias mini-HOWTO'' for more information than you find here. --> <p>1 つのネットワークデバイスに複数個の IP アドレスを設定できると便利 な用途がいくつかあります。インターネットサービスプロバイダ(ISP)はよく この機能を用いて、顧客に合わせて「カスタマイズした」WWW サービスや ftp サービスを提供しています。ここに書いている以上の情報については、 ``IP-Alias mini-HOWTO'' をご覧ください。 <!--O <p><bf/Kernel Compile Options/: --> <p><bf/カーネルのコンパイルオプション/: <tscreen><verb> Networking options ---> .... [*] Network aliasing .... <*> IP: aliasing support </verb></tscreen> <!--O <p>After compiling and installing your kernel with IP_Alias support configuration is very simple. The aliases are added to virtual network devices associated with the actual network device. A simple naming convention applies to these devices being <tt><devname>:<virtual dev num></tt>, e.g. <tt/eth0:0/, <tt/ppp0:10/ etc. Note that the the ifname:number device can only be configured <em>after</em> the main interface has been set up. --> <p>IP_Alias 機能を組み込んだカーネルを構築してインストールしてしまえば、 この機 能を設定するのはごく簡単です。alias 機能は、実際のネットワークデバイス に仮想的なネットワークデバイスを関連づけて追加します。仮想的なデバイスに割りあ てる名前は、<tt><devname>:<virtual dev num></tt> の形で、 <tt/eth0:0/、<tt/ppp0:10/ のようになります。ifname:number 形式のデバイス は、メインのインタフェースの設定<em>後</em>でなければ設定できない点に 注意してください。 <p> <!--O For example, assume you have an ethernet network that supports two different IP subnetworks simultaneously and you wish your machine to have direct access to both, you could use something like: --> たとえば、 2 つの異なった IP サブネットワークをサポートしている イーサネットネットワークに接続 したマシンがあるとして、同時に双方のサブネットにアクセスしたい場合、 以下のようにします。 <tscreen><verb> root# ifconfig eth0 192.168.1.1 netmask 255.255.255.0 up root# route add -net 192.168.1.0 netmask 255.255.255.0 eth0 root# ifconfig eth0:0 192.168.10.1 netmask 255.255.255.0 up root# route add -net 192.168.10.0 netmask 255.255.255.0 eth0:0 </verb></tscreen> <!--O <p>To delete an alias you simply add a `<tt/-/' to the end of its name and refer to it and is as simple as: --> <p>エイリアスを削除する場合、仮想的なデバイス名の後に `<tt/-/' を付けて <tt>ifconfig</tt> します。 <tscreen><verb> root# ifconfig eth0:0- 0 </verb></tscreen> <!--O <p>All routes associated with that alias will also be deleted automatically. --> <p>仮想デバイスを削除すれば、関連した経路も全て自動的に削除されます。 <!-- ==================================================================== --> <!--O <sect1><heading>IP Firewall (for Linux-2.0) --> <sect1><heading>IP ファイアウォール(Linux 2.0 用) <p> <!--O IP Firewall and Firewalling issues are covered in more depth in the <htmlurl url="Firewall-HOWTO.html" name="Firewall-HOWTO">. IP Firewalling allows you to secure your machine against unauthorized network access by filtering or allowing datagrams from or to IP addresses that you nominate. There are three different classes of rules, incoming filtering, outgoing filtering and forwarding filtering. Incoming rules are applied to datagrams that are received by a network device. Outgoing rules are applied to datagrams that are to be transmitted by a network device. Forwarding rules are applied to datagrams that are received and are not for this machine, ie datagrams that would be routed. --> IP ファイアウォールとファイアウォール全般については <url url="Firewall-HOWTO.html" name="Firewall-HOWTO"> の方がずっと詳しく扱っています。IP ファイアウォールを使えば、許可した IP アドレスからのデータグラム以外は通さないように設定できます。 ファイアウォールの設定には、入ってくるデータグラムに対するもの、出てい くデータグラムに対するもの、内部で転送(forward)するデータグラムに対す るものの 3 種類があります。 入ってくるデータグラムに対するルールはネットワークデバイスが受けとった データグラムに対して適用され、出ていくデータグラムに対するルールはネッ トワークデバイスが送出するデータグラムに適用されます。転送するデータグラム に対するルールは、受けとったものの、自分宛てではないデータグラム、すな わち別の経路に送り出すデータグラムに適用されます。 <!--O <p><bf/Kernel Compile Options/: --> <p><bf/カーネルのコンパイルオプション/: <tscreen><verb> Networking options ---> [*] Network firewalls .... [*] IP: forwarding/gatewaying .... [*] IP: firewalling [ ] IP: firewall packet logging </verb></tscreen> <!--O <p>Configuration of the IP firewall rules is performed using the <em/ipfwadm/ command. As I mentioned earlier, security is not something I am expert at, so while I will present an example you can use, you should do your own research and develop your own rules if security is important to you. --> <p>IP ファイアウォール機能は <em>ipfwadm</em> コマンドを使って設定します。 以前にも述べましたが、私はセキュリティについての専門家ではありません。 以下に応用可能な簡単な例を紹介しますが、セキュリティが重要な問題ならば、 ご自分で研究して必要な設定を開発してください。 <p> <!--O Probably the most common use of IP firewall is when you are using your linux machine as a router and firewall gateway to protect your local network from unauthorized access from outside your network. --> IP ファイアウォール機能の最も一般的な使い方は、Linux マシンをルータや ファイアウォールゲートウェイとして用い、ローカルネットワークを ネットワーク外部からの許可されていないアクセスから守ることでしょう。 <p> <!--O The following configuration is based on a contribution from Arnt Gulbrandsen, <tt><agulbra@troll.no></tt>. --> 以下の設定は Arnt Gulbrandsen <tt><agulbra@troll.no></tt> が報告 してくれたものに基づいています。 <p> <!--O The example describes the configuration of the firewall rules on the Linux firewall/router machine illustrated in this diagram: --> 以下に用いる例では、下図のような設定で、Linux マシンをファイアウォール /ルータにしています。 <tscreen><verb> - - \ | 172.16.37.0 \ | /255.255.255.0 \ --------- | | 172.16.174.30 | Linux | | NET =================| f/w |------| ..37.19 | PPP | router| | -------- / --------- |--| Mail | / | | /DNS | / | -------- - - </verb></tscreen> <!--O <p>The following commands would normally be placed in an <tt/rc/ file so that they were automatically started each time the system boots. For maximum security they would be performed after the network interfaces are configured, but before the interfaces are actually brought up to prevent anyone gaining access while the firewall machine is rebooting. --> <p>ファイアウォールを設定するためのコマンドは、通常 <tt>rc</tt> ファイルに まとめて、システムの起動時に自動的に実行するように設定します。セキュリ ティを最大限に強化するには、ネットワークインターフェイスが設定されてか らこれらの設定を行うべきですが、ファイアウォールマシンをリブートした際 に誰かがイタズラするのを防ぐため、ネットワーク設定の前に実行する必 要があるかもしれません。 <tscreen><verb> #!/bin/sh # Flush the 'Forwarding' rules table # Change the default policy to 'accept' # /sbin/ipfwadm -F -f /sbin/ipfwadm -F -p accept # # .. and for 'Incoming' # /sbin/ipfwadm -I -f /sbin/ipfwadm -I -p accept # First off, seal off the PPP interface # I'd love to use '-a deny' instead of '-a reject -y' but then it # would be impossible to originate connections on that interface too. # The -o causes all rejected datagrams to be logged. This trades # disk space against knowledge of an attack of configuration error. # /sbin/ipfwadm -I -a reject -y -o -P tcp -S 0/0 -D 172.16.174.30 # Throw away certain kinds of obviously forged packets right away: # Nothing should come from multicast/anycast/broadcast addresses # /sbin/ipfwadm -F -a deny -o -S 224.0/3 -D 172.16.37.0/24 # # and nothing coming from the loopback network should ever be # seen on a wire # /sbin/ipfwadm -F -a deny -o -S 127.0/8 -D 172.16.37.0/24 # accept incoming SMTP and DNS connections, but only # to the Mail/Name Server # /sbin/ipfwadm -F -a accept -P tcp -S 0/0 -D 172.16.37.19 25 53 # # DNS uses UDP as well as TCP, so allow that too # for questions to our name server # /sbin/ipfwadm -F -a accept -P udp -S 0/0 -D 172.16.37.19 53 # # but not "answers" coming to dangerous ports like NFS and # Larry McVoy's NFS extension. If you run squid, add its port here. # /sbin/ipfwadm -F -a deny -o -P udp -S 0/0 53 \ -D 172.16.37.0/24 2049 2050 # answers to other user ports are okay # /sbin/ipfwadm -F -a accept -P udp -S 0/0 53 \ -D 172.16.37.0/24 53 1024:65535 # Reject incoming connections to identd # We use 'reject' here so that the connecting host is told # straight away not to bother continuing, otherwise we'd experience # delays while ident timed out. # /sbin/ipfwadm -F -a reject -o -P tcp -S 0/0 -D 172.16.37.0/24 113 # Accept some common service connections from the 192.168.64 and # 192.168.65 networks, they are friends that we trust. # /sbin/ipfwadm -F -a accept -P tcp -S 192.168.64.0/23 \ -D 172.16.37.0/24 20:23 # accept and pass through anything originating inside # /sbin/ipfwadm -F -a accept -P tcp -S 172.16.37.0/24 -D 0/0 # deny most other incoming TCP connections and log them # (append 1:1023 if you have problems with ftp not working) # /sbin/ipfwadm -F -a deny -o -y -P tcp -S 0/0 -D 172.16.37.0/24 # ... for UDP too # /sbin/ipfwadm -F -a deny -o -P udp -S 0/0 -D 172.16.37.0/24 </verb></tscreen> <!--O <p>Good firewall configurations are a little tricky. This example should be a reasonable starting point for you. The <em/ipfwadm/ manual page offers some assistance in how to use the tool. If you intend to configure a firewall, be sure to ask around and get as much advice from sources you consider reliable and get someone to test/sanity check your configuration from the outside. --> よいファイアウォールの設定は多少トリッキーになっているものですが、ここ に示した例は出発点として十分役に立つはずです。 設定方法の詳細については <em>ipfwadm</em> の man ページを参照してくだ さい。ファイアウォールを設定する場合、周囲の人にたずねて、信頼するに足 る情報源からのアドバイスを可能な限り受けてください。そして、設定が正し く機能しているかどうか、外部から確認してもらいましょう。 <!-- ==================================================================== --> <!--O <sect1><heading>IP Firewall (for Linux-2.2) --> <sect1><heading>IP ファイアウォール (Linux 2.2 用) <!-- FIXME: describe the new firewalling code --> <!--O <p>The new firewalling code is accessed via ``IP Firewall Chains''. See <htmlurl url="http://www.adelaide.net.au/~rustcorp/ipfwchains/ipfwchains.html" name="the IP chanins home page"> for more information. Among other things, you'll now need to use <em/ipchains/ instead of <tt/ipfwadm/ to configure your filters. (From <tt>Documentation/Changes</tt> in the latest kernel sources). --> <p>新しいファイアウォール機能は ``IP Firewall Chains'' を使って利用で きます。詳しくは <url url="http://www.adelaide.net.au/~rustcorp/ipfwchains/ipfwchains.html" name="IP chains のホームページ"> を見てください。特に注意すべきなのは、フィルタの設定には <tt/ipfwadm/ ではなく <em/ipchains/ を使う必要がある点です(最新版カーネルの <tt>Documentation/Changes</tt> より)。 <p> <!--O We are aware that this is a sorely out of date statement and we are currently working on getting this section more current. You can expect a newer version in August of 1999. --> この説明は非常に古くなっていることは筆者らもわかっており、この節を書き 直すべく現在作業中です。1999 年の 8 月には新しい版を出すのでお待ちくだ さい。 <!--NAKANO まだじゃん(笑)--> <!-- ==================================================================== --> <!--O <sect1><heading>IPIP Encapsulation --> <sect1><heading>IPIP カプセル化 <p> <!--O Why would you want to encapsulate IP datagrams within IP datagrams? It must seem an odd thing to do if you've never seen an application of it before. Ok, here are a couple of common places where it is used: Mobile-IP and IP-Multicast. What is perhaps the most widely spread use of it though is also the least well known, Amateur Radio. --> IP データグラムの中に IP データグラムをカプセル化して入れると、なんの役に立つん でしょうか? 前もって使い途を知っていなければ、この手法はきっと奇妙に思 えることでしょう。では、これがよく使われる目的を 2 つ示しましょう。 モバイル IP と IP マルチキャストです。もっとも広く使われているけ れど、ほとんど知られていない利用目的としてはアマチュア無線があります。 <!--O <p><bf/Kernel Compile Options/: --> <p><bf/カーネルのコンパイルオプション/: <tscreen><verb> Networking options ---> [*] TCP/IP networking [*] IP: forwarding/gatewaying .... <*> IP: tunneling </verb></tscreen> <p> <!--O IP tunnel devices are called `<tt/tunl0/', `<tt/tunl1/' etc. --> IP トンネルデバイスは `<tt/tunl0/', `<tt/tunl1/' 等となります。 <p> <!--O "But why ?". Ok, ok. Conventional IP routing rules mandate that an IP network comprises a network address and a network mask. This produces a series of contiguous addresses that may all be routed via a single routing entry. This is very convenient, but it means that you may only use any particular IP address while you are connected to the particular piece of network to which it belongs. In most instances this is ok, but if you are a mobile netizen then you may not be able to stay connected to the one place all the time. IP/IP encapsulation (IP tunneling) allows you to overcome this restriction by allowing datagrams destined for your IP address to be wrapped up and redirected to another IP address. If you know that you're going to be operating from some other IP network for some time you can set up a machine on your home network to accept datagrams to your IP address and redirect them to the address that you will actually be using temporarily. --> 「でも、どうしてこんなものを使うの?」かって? はいはい、説明しましょう。 今までの IP 経路制御では、IP ネットワークはネットワークアドレスと ネットワークマスクから構成されることになっていました。これにより、連続 した一連のアドレスの全てに対して 1 つの経路制御エントリを使った経路制御 が行えました。これは大変便利ですが、ある特定のネットワークの一部に接続 している間は特定の IP アドレスしか使えないということでもあります。ほと んどの場合はこれでも大丈夫なのですが、あなたがモバイル派であれば、ずっ と 1 つの場所に接続したままというわけにはいかないと思います。 IP/IP カプセル化(IP トンネリング)を使うと、自分の IP アドレス宛の データグラムに IP の皮をかぶせて別の IP アドレスに送ることによって、こ の制限を克服できます。しばらく別の IP ネットワークで作業をすることが分 かっていれば、自分の元々のネットワーク上のマシンがあなたの IP アドレス 宛のデータグラムを受け付け、これを現在一時的に使っているアドレスに送る ように設定できます。 <!-- ==================================================================== --> <!--O <sect2><heading>A tunneled network configuration. --> <sect2><heading>トンネリングを行うネットワーク設定 <p> <tscreen><verb> 192.168.1/24 192.168.2/24 - - | ppp0 = ppp0 = | | aaa.bbb.ccc.ddd fff.ggg.hhh.iii | | | | /-----\ /-----\ | | | | // | | | |---| A |------//---------| B |---| | | | // | | | | \-----/ \-----/ | | | - - </verb></tscreen> <!--O The diagram illustrates another possible reason to use IPIP encapsulation, virtual private networking. This example presupposes that you have two machines each with a simple dial up internet connection. Each host is allocated just a single IP address. Behind each of these machines are some private local area networks configured with reserved IP network addresses. Suppose that you want to allow any host on network A to connect to any host on network B, just as if they were properly connected to the Internet with a network route. IPIP encapsulation will allow you to do this. Note, encapsulation does not solve the problem of how you get the hosts on networks A and B to talk to any other on the Internet, you still need tricks like IP Masquerade for that. Encapsulation is normally performed by machine functioning as routers. --> この図は、IPIP カプセル化が必要となる別の理由、すなわち 仮想プライベートネットワーク(virtual private networking, VPN)を示して います。この例では、ダイアルアップによる単純なインターネット接続をして いるマシンが 2 台あることを前提とします。それぞれのホストは IP アドレ スを 1 つだけ割り当てられています。これらのマシンの後ろには、予約済み の IP ネットワークアドレスを使う設定のプライベートな LAN がいくつかあ ります。このとき、ネットワーク A 上のホストとネットワーク B 上のホスト を、あるネットワーク経路を使って正しくインターネットに接続しているかの ように接続したいとします。IPIP カプセル化を使うとこれが可能になります。 カプセル化では、ネットワーク A と B のホストをインターネット上の別のホ ストと通信させるという問題は解決されないので注意してください。 これを 行うには、さらに IP マスカレード等の技が必要となります。カプセル化は普 通、マシンをルータのように機能させることで実現します。 <p> <!--O Linux router `<tt/A/' would be configured with a script like the following: --> Linux によるルータ `<tt/A/' は、以下のようなスクリプトを使って設定しま す: <tscreen><verb> #!/bin/sh PATH=/sbin:/usr/sbin mask=255.255.255.0 remotegw=fff.ggg.hhh.iii # # Ethernet configuration ifconfig eth0 192.168.1.1 netmask $mask up route add -net 192.168.1.0 netmask $mask eth0 # # ppp0 configuration (start ppp link, set default route) pppd route add default ppp0 # # Tunnel device configuration ifconfig tunl0 192.168.1.1 up route add -net 192.168.2.0 netmask $mask gw $remotegw tunl0 </verb></tscreen> <p> <!--O Linux router `<tt/B/' would be configured with a similar script: --> Linux によるルータ `<tt/B/' も同様のスクリプトを使って設定します: <tscreen><verb> #!/bin/sh PATH=/sbin:/usr/sbin mask=255.255.255.0 remotegw=aaa.bbb.ccc.ddd # # Ethernet configuration ifconfig eth0 192.168.2.1 netmask $mask up route add -net 192.168.2.0 netmask $mask eth0 # # ppp0 configuration (start ppp link, set default route) pppd route add default ppp0 # # Tunnel device configuration ifconfig tunl0 192.168.2.1 up route add -net 192.168.1.0 netmask $mask gw $remotegw tunl0 </verb></tscreen> <p> <!--O The command: --> 以下のコマンド <tscreen><verb> route add -net 192.168.1.0 netmask $mask gw $remotegw tunl0 </verb></tscreen> <!--O reads: `Send any datagrams destined for <tt>192.168.1.0/24</tt> inside an IPIP encap datagram with a destination address of <tt/aaa.bbb.ccc.ddd/'. --> は、「<tt>192.168.1.0/24</tt>宛の全てのデータグラムを、終点アドレスが <tt/aaa.bbb.ccc.ddd/ である IPIP カプセル化データグラムの中に送ること」 と読みます。 <p> <!--O Note that the configurations are reciprocated at either end. The tunnel device uses the `<tt/gw/' in the route as the <em/destination/ of the IP datagram in which it will place the datagram it has received to route. That machine must know how to decapsulate IPIP datagrams, that is, it must also be configured with a tunnel device. --> 設定は両端で対になる点に注意してください。トンネルデバイスは、経路を指 定するために受け取ったデータグラムを入れた IP データグラムの<em/終点/ として、経路の中で `<tt/gw/' を使います。そのマシンは IPIP データグラム のカプセル化解除の方法を知っていなければなりません。 つまり、トンネルデバイスが設定されていなければなりません。 <!-- ==================================================================== --> <!--O <sect2><heading>A tunneled host configuration. --> <sect2><heading>トンネリングを行うホストの設定 <p> <!--O It doesn't have to be a whole network you route. You could for example route just a single IP address. In that instance you might configure the <tt/tunl/ device on the `remote' machine with its home IP address and at the A end just use a host route (and Proxy Arp) rather than a network route via the tunnel device. Let's redraw and modify our configuration appropriately. Now we have just host `<tt/B/' which to want to act and behave as if it is both fully connected to the Internet and also part of the remote network supported by host `<tt/A/': --> ネットワーク全体でまとめて経路制御を行う必要はありません。例えば、1 つ の IP アドレスだけの経路を指定することもできます。この場合には、「リモー ト」のマシンの<tt/tunl/ デバイスにホームの IP アドレスを設定し、A 側で はトンネルデバイスを通じて、ネットワークの経路制御ではなくホストの経路 制御(および Proxy Arp)を行うだけです。構成図を正しく書き直してみましょ う。今度の場合は、両方がインターネットに完全に接続し、かつホスト `<tt/A/' がサポートしているリモートのネットワークの一部であるかのよう に動作させたいホスト `<tt/B/' があるだけです: <p> <tscreen><verb> 192.168.1/24 - | ppp0 = ppp0 = | aaa.bbb.ccc.ddd fff.ggg.hhh.iii | | /-----\ /-----\ | | | // | | |---| A |------//---------| B | | | | // | | | \-----/ \-----/ | also: 192.168.1.12 - </verb></tscreen> <p> <!--O Linux router `<tt/A/' would be configured with: --> Linux によるルータ `<tt/A/' は以下のシェルスクリプトを使って設定します: <tscreen><verb> #!/bin/sh PATH=/sbin:/usr/sbin mask=255.255.255.0 remotegw=fff.ggg.hhh.iii # # Ethernet configuration ifconfig eth0 192.168.1.1 netmask $mask up route add -net 192.168.1.0 netmask $mask eth0 # # ppp0 configuration (start ppp link, set default route) pppd route add default ppp0 # # Tunnel device configuration ifconfig tunl0 192.168.1.1 up route add -host 192.168.1.12 gw $remotegw tunl0 # # Proxy ARP for the remote host arp -s 192.168.1.12 xx:xx:xx:xx:xx:xx pub </verb></tscreen> <!--O <p>Linux host `<tt/B/' would be configured with: --> <p>Linux ホスト `<tt/B/' は以下のシェルスクリプトを使って設定します: <tscreen><verb> #!/bin/sh PATH=/sbin:/usr/sbin mask=255.255.255.0 remotegw=aaa.bbb.ccc.ddd # # ppp0 configuration (start ppp link, set default route) pppd route add default ppp0 # # Tunnel device configuration ifconfig tunl0 192.168.1.12 up route add -net 192.168.1.0 netmask $mask gw $remotegwtunl0 </verb></tscreen> <!--O <p>This sort of configuration is more typical of a Mobile-IP application. Where a single host wants to roam around the Internet and maintain a single usable IP address the whole time. You should refer to the Mobile-IP section for more information on how that is handled in practice. --> <p>このような設定は、モバイル IP を考えるとよりはっきりします。 モバイル IP では、1 つのホストがインターネット上であちこちに移動しつつ、 その間ずっと 1 つの IP アドレスを使い続けられると便利です。実際の モバイル IP の扱い方については、モバイル IP の節を参照してください。 <!-- ==================================================================== --> <!--O <sect1><heading>IP Masquerade --> <sect1><heading>IP マスカレード(IP Masquerade) <p> <!--O Many people have a simple dialup account to connect to the Internet. Nearly everybody using this sort of configuration is allocated a single IP address by the Internet Service Provider. This is normally enough to allow only one host full access to the network. IP Masquerade is a clever trick that enables you to have many machines make use of that one IP address, by causing the other hosts to look like, hence the term masquerade, the machine supporting the dialup connection. There is a small caveat and that is that the masquerade function nearly always works only in one direction, that is the masqueraded hosts can make calls out, but they cannot accept or receive network connections from remote hosts. This means that some network services do not work such as <em/talk/ and others such as <em/ftp/ must be configured to operate in passive (PASV) mode to operate. Fortunately the most common network services such as <em/telnet/, World Wide Web and <em/irc/ do work just fine. --> インターネットに接続するためにダイアルアップ接続を使っている人もたくさ んいることでしょう。こういった接続を用いているほとんどの人は、 ISP から IP アドレスを 1 つしかもらえません。 1 台のホストが完全 にネットワークにアクセスするには、普通は IP アドレスが 1 つあれば十分だからで す。IP マスカレード(IP Masquerade)というのは、1 つの IP アドレスを複数 のコンピュータで使うためのうまい仕掛けです。IP マスカレードを使えば、 「マスカレード(masquerade, 変装)」という言葉の通り、他のホストを ダイアルアップ接続しているマシンに見せかけて IP アドレスを共有できます。 ただし注意点も少しあって、マスカレード機能はほぼ確実に片方向の通信でし か動作しません。つまり、マスカレードされているホストは自分からの接続は 行えますが、リモートホストからの接続を受け付けることはできません。 したがって、<em/talk/ 等のネットワークサービスは動作しませんし、 <em/ftp/ 等のサービスはパッシブ(PASV)モードで動作するように設定しなけ ればなりません。幸運なことに、<em/telnet/, WWW, <em/irc/ を含む大部分 のネットワークサービスはうまく動作します。 <!--O <p><bf/Kernel Compile Options/: --> <p><bf/カーネルのコンパイルオプション/: <tscreen><verb> Code maturity level options ---> [*] Prompt for development and/or incomplete code/drivers Networking options ---> [*] Network firewalls .... [*] TCP/IP networking [*] IP: forwarding/gatewaying .... [*] IP: masquerading (EXPERIMENTAL) </verb></tscreen> <!--O <p>Normally you have your linux machine supporting a slip or PPP dialup line just as it would if it were a standalone machine. Additionally it would have another network device configured, perhaps an ethernet, configured with one of the reserved network addresses. The hosts to be masqueraded would be on this second network. Each of these hosts would have the IP address of the ethernet port of the linux machine set as their default gateway or router. --> <p>普通の場合、あなたの Linux マシンには slip か PPP ダイアルアップ 接続機能が組み込まれている事でしょう (あたかもスタンドアロンのマシンで あるかのように)。さらに、そのマシンには別のネットワークデバイス (多分 イーサネット) が設定されていて、ネットワークが一つ割り振られていることに なっているでしょう。 マスカレード経由で接続するホストはこの 2 つめのネットワーク上にあります。イーサネットネットワーク上にある各 マシンのデフォルトの経路には、 IP マスカレードを組み込んでインターネット とのゲートウェイになっている、この Linux マシンを指定します。 <p> <!--O A typical configuration might look something like this: --> よくある IP マスカレードの設定は下図のようになります: <tscreen><verb> - - \ | 192.168.1.0 \ | /255.255.255.0 \ --------- | | | Linux | .1.1 | NET =================| masq |------| | PPP/slip | router| | -------- / --------- |--| host | / | | | / | -------- - - </verb></tscreen> <!--O <em>Masquerading with IPFWADM</em> --> <em>IPFWADM を使った IP マスカレード</em> <!--O <p>The most relevant commands for this configuration are: --> <p>この設定を行うため最も適切なコマンドは以下のようになります: <tscreen><verb> # Network route for ethernet route add -net 192.168.1.0 netmask 255.255.255.0 eth0 # # Default route to the rest of the internet. route add default ppp0 # # Cause all hosts on the 192.168.1/24 network to be masqueraded. ipfwadm -F -a m -S 192.168.1.0/24 -D 0.0.0.0/0 </verb></tscreen> <p> <!--O <em>Masquerading with IPCHAINS</em> --> <em>ipchains を使った IP マスカレード</em> <!--O <p>This is similar to using IPFWADM but the command structure has changed: --> <p>これは ipfwadm を使う場合と似ていますが、コマンドの構造が変わって います: <tscreen><verb> # Network route for ethernet route add -net 192.168.1.0 netmask 255.255.255.0 eth0 # # Default route to the rest of the internet. route add default ppp0 # # Cause all hosts on the 192.168.1/24 network to be masqueraded. ipchains -A forward -s 192.168.1.0/24 -j MASQ </verb></tscreen> <!--O <p>You can get more information on the Linux IP Masquerade feature from the <htmlurl url="http://www.hwy401.com/achau/ipmasq/" name="IP Masquerade Resource Page">. Also, a <em/very/ detailed document about masquesrading is the ``IP-Masquerade mini-HOWTO'' (which also intructs to configure other OS's to run with a Linux masquerade server). --> IP マスカレード機能の詳しい説明は <url url="http://www.hwy401.com/achau/ipmasq/" name="IP Masquerade Resource Page"> にあります。 また、IP マスカレードに関する<em/非常に/詳しい説明として、 ``IP-Masquerade mini-HOWTO'' があります。この文書には、Linux を使った IP マスカレードサーバと他の OS を組み合わせて使うための設定も載ってい ます。 <!-- 以下 morimoto 2000/12/18 追記 --> (注: 上記 uri は 2000/12 現在到達不能なようです。 代りに <url url="http://ipmasq.cjb.net/" name="Linux IP Masquerade Resource"> をご覧ください。) <!-- Subject: [JF:12800] ドキュメント内でのデットリンクについて From: Shota Wong <bananafish@nori.im.kindai.ac.jp> To: JF@linux.or.jp Date: Mon, 18 Dec 2000 03:36:53 +0900 はじめまして。ショウタ@電算研です。 Linux Networking-HOWTO内のIP Masquerade Resource Page へのリンクが http://www.hwy401.com/achau/ipmasq/ のままなのですが、 http://ipmasq.cjb.net/ へ変更したほうが僕としては便利なんですが。。。 ドキュメント内でのURLの変更って、ここで報告していいのでしょうか? --> <!-- 追記おわり --> <p> <!-- ==================================================================== --> <!--O <sect1><heading>IP Transparent Proxy --> <sect1><heading>IP 透過プロキシ(IP Transparent Proxy) <p> <!--O IP transparent proxy is a feature that enables you to redirect servers or services destined for another machine to those services on this machine. Typically this would be useful where you have a linux machine as a router and also provides a proxy server. You would redirect all connections destined for that service remotely to the local proxy server. --> IP transparent proxy 機能を使えば、別のマシンへのサービスリクエストや サーバへのアクセスをこのマシンにリダイレクトすることができます。この機 能は、Linux マシンをルータ兼プロキシサーバとして使っている場合に便利で、 外部のネットワークへ要求されたリクエストを全てローカルのプロキシサーバ で処理できるようになります。 <!--O <p><bf/Kernel Compile Options/: --> <p><bf/カーネルのコンパイルオプション/: <tscreen><verb> Code maturity level options ---> [*] Prompt for development and/or incomplete code/drivers Networking options ---> [*] Network firewalls .... [*] TCP/IP networking .... [*] IP: firewalling .... [*] IP: transparent proxy support (EXPERIMENTAL) </verb></tscreen> <!--O <p>Configuration of the transparent proxy feature is performed using the <em/ipfwadm/ command --> <p>透過プロキシ機能は <em>ipfwadm</em> コマンドで設定します。 <P> <!--O An example that might be useful is as follows: --> 役立ちそうな設定例を以下に示しておきます: <tscreen><verb> root# ipfwadm -I -a accept -D 0/0 telnet -r 2323 </verb></tscreen> <!--O <p>This example will cause any connection attempts to port <tt/telnet/ (23) on any host to be redirected to port 2323 on this host. If you run a service on that port, you could forward telnet connections, log them or do whatever fits your need. --> <p>この例を実行した場合、任意のホストの <tt/telnet/(23 番)ポートに接続 しようとすると、透過プロキシホストの 2323 番ポートにリダイレクトされます。 このポートでサービスを実行すれば、telnet 接続を転送したりログを残す等、 必要に応じた動作をさせられます。 <p> <!--O A more interesting example is redirecting all <tt/http/ traffic through a local cache. However, the protocol used by proxy servers is different from native http: where a client connects to <tt/www.server.com:80/ and asks for <tt>/path/page</tt>, when it connects to the local cache it contacts <tt/proxy.local.domain:8080/ and asks for <tt>www.server.com/path/page</tt>. --> さらに面白い例として、全ての <tt/http/ トラフィックをローカルの キャッシュにリダイレクトすることもできます。しかし、プロキシサーバが使 うプロトコルはネイティブの http: とは異なります。つまり、http クライアント は <tt/www.server.com:80/ に接続して <tt>/path/page</tt> を要求しますが、 ローカルキャッシュに接続した場合は <tt/proxy.local.domain:8080/ に接続 して <tt>www.server.com/path/page</tt> を要求しなければなりません。 <p> <!--O To filter an <tt/http/ request through the local proxy, you need to adapt the protocol by inserting a small server, called <tt/transproxy/ (you can find it on the world wide web). You can choose to run <tt/transproxy/ on port 8081, and issue this command: --> <tt/http/ リクエストにローカルプロキシのフィルタをかけるには、 <tt/transproxy/ と呼ばれる小さなサーバ(WWW で入手できます)を間に置いて、 プロトコルを一致させる必要があります。<tt/transproxy/ を 8081 番ポートで動作させるには、以下のコマンドを実行します: <tscreen><verb> root# ipfwadm -I -a accept -D 0/0 80 -r 8081 </verb></tscreen> <!--O The <tt/transproxy/ program, then, will receive all connections meant to reach external servers and will pass them to the local proxy after fixing protocol differences. --> こうすると、<tt/transproxy/ は外部サーバにアクセスしようとする全ての接続を 受け取り、プロトコルの相違点を直した後に、これをローカルのプロキシに渡 します。 <!-- FIXME: talk about the cisco trick --> <!-- ==================================================================== --> <sect1><heading>IPv6 <p> <!-- FIXME: describe IPV6 --> <!--O Just when you thought you were beginning to understand IP networking the rules get changed! IPv6 is the shorthand notation for version 6 of the Internet Protocol. IPv6 was developed primarily to overcome the concerns in the Internet community that there would soon be a shortage of IP addresses to allocate. IPv6 addresses are 16 bytes long (128 bits). IPv6 incorporates a number of other changes, mostly simplifications, that will make IPv6 networks more managable than IPv4 networks. --> やっと IP ネットワークについて理解し始めたところだというのに、ルールが 変ってしまうなんて…、と思われるかもしれません。IPv6 とは Internet Protocol Version 6 の省略形です。IPv6 は、現在インターネットコミュニティ が直面している IP アドレスの枯渇問題に対応することを主目的に開発されて います。IPv6 のアドレスは 16 バイト長(128 ビット)になっています。それ以 外にも、IPv6 では主として単純化のためのさまざまな変更が施されて、既存 の IPv4 ネットワークよりも管理しやすいようになっています。 <p> <!--O Linux already has a working, but not complete, IPv6 implementation in the <tt/2.2.*/ series kernels. --> Linux <tt>2.2.*</tt>シリーズには、既に IPv6 の実装が動作していますが、 まだ完全ではありません。 <p> <!--O If you wish to experiment with this next generation Internet technology, or have a requirement for it, then you should read the IPv6-FAQ which is available from <htmlurl url="http://www.terra.net/ipv6/" name="www.terra.net">. --> この次世代のインターネット技術を試してみたい場合や必要な場合は、 <url url="http://www.terra.net/ipv6/" name="www.terra.net"> から入手できる IPv6-FAQ をまず読んでみましょう。 <!-- ==================================================================== --> <!--O <sect1><heading>Mobile IP --> <sect1><heading>モバイル IP(Mobile IP) <p> <!--O The term "IP mobility" describes the ability of a host that is able to move its network connection from one point on the Internet to another without changing its IP address or losing connectivity. Usually when an IP host changes its point of connectivity it must also change its IP address. IP Mobility overcomes this problem by allocating a fixed IP address to the mobile host and using IP encapsulation (tunneling) with automatic routing to ensure that datagrams destined for it are routed to the actual IP address it is currently using. --> 「IP の可搬性(IP mobility)」とは、ある場所でインターネットに接続してい るホストが、別の場所に移っても IP アドレスを変更せずに接続できたり、接 続を切らずに場所を移動できることです。通常、IP アドレスを割り当てられ ているホストは、接続場所を変更すれば IP アドレスも変更しなければなりま せん。IP mobility 機能を使えば、ポータブルマシンにも決まった IP アドレ スを割り当て、自動ルーティング機能とIP カプセル化(トンネリング)機能を 使い、ポータブルマシン宛のデータグラムを、そのマシンが現在実際に使って いる IP アドレスに送ることができます。 <p> <!--O A project is underway to provide a complete set of IP mobility tools for Linux. The Status of the project and tools may be obtained from the: <htmlurl url="http://anchor.cs.binghamton.edu/~mobileip/" name="Linux Mobile IP Home Page">. --> Linux 用に IP mobility ツール一式を開発しようというプロジェクトが進行 中です。プロジェクトの進行状況とツールは <url url="http://anchor.cs.binghamton.edu/~mobileip/" name="Linux Mobile IP Home Page"> から入手できます。 <!-- ==================================================================== --> <!--O <sect1><heading>Multicast --> <sect1><heading>マルチキャスト <p> <!--O IP Multicast allows an arbitrary number of IP hosts on disparate IP networks to have IP datagrams simultaneously routed to them. This mechanism is exploited to provide Internet wide "broadcast" material such as audio and video transmissions and other novel applications. --> 通常、TCP/IP は接続先のマシンを指定した一対一の接続形態を取りますが、 IP マルチキャスト機能を使えば、異なる IP ネットワーク上にある任意の数 のホストへ、同時に IP データグラムを送ることが可能になります。この機能 は、インターネット全体へ音声やビデオの素材を「放送」するなど、 さまざまな新しいアプリケーションのために開発されました。 <p> <!--O <bf/Kernel Compile Options/: --> <bf/カーネルのコンパイルオプション/: <tscreen><verb> Networking options ---> [*] TCP/IP networking .... [*] IP: multicasting </verb></tscreen> <p> <!--O A suite of tools and some minor network configuration is required. Please check the <htmlurl url="Multicast-HOWTO.html" name="Multicast-HOWTO"> for more information on Multicast support in Linux. --> IP マルチキャストを使うには、ツール一式と多少のネットワークの設定が必 要です。Linux のマルチキャスト対応に関する詳しい情報については <url url="Multicast-HOWTO.html" name="Multicast-HOWTO"> をご覧ください。 <!-- ==================================================================== --> <!--O <sect1><heading>NAT - Network Address Translation --> <sect1><heading>NAT - ネットワークアドレス変換(Network Address Translation) <p> <!--O The IP Network Address Translation facility is pretty much the standardized big brother of the Linux IP Masquerade facility. It is specified in some detail in RFC-1631 at your nearest RFC archive. NAT provides features that IP-Masquerade does not that make it eminently more suitable for use in corporate firewall router designs and larger scale installations. --> IP ネットワークアドレス変換機能(NAT)は、Linux の IP マスカレード機能の 兄貴分が標準化されたもの、と思ってだいたいかまいません。NAT は RFC-1631 で詳しく仕様が決められています(RFC 文書はお近くの RFC アーカイブから入 手してください)。NAT にできて IP マスカレードにはできない機能があるの で、会社規模のファイアウォールの経路設計や大規模な設備で用いるには NAT の方がずっと適切です。 <p> <!--O An alpha implementation of NAT for Linux 2.0.29 kernel has been developed by Michael.Hasenstein, <tt/Michael.Hasenstein@informatik.tu-chemnitz.de/. Michaels documentation and implementation are available from: --> Linux 2.0.29 用の NAT のアルファ版の実装は Michael.Hasenstein <tt/Michael.Hasenstein@informatik.tu-chemnitz.de/ が開発しました。 Michaels が作成した文書と実装は以下の場所から入手できます: <url name="Linux IP Network Address Web Page" url="http://www.csn.tu-chemnitz.de/HyperNews/get/linux-ip-nat.html"> <p> <!--O Newer Linux 2.2.x kernels also include some NAT functionality in the routing algorithm. --> 新しい Linux 2.2.x でも、経路制御アルゴリズムに NAT 機能の一部が入って います。 <!-- ==================================================================== --> <!--O <sect1><heading>Traffic Shaper - Changing allowed bandwidth --> <sect1><heading>Traffic Shaper - 許可する帯域幅の変更 <!--O <p>The traffic shaper is a driver that creates new interface devices, those devices are traffic-limited in a user-defined way, they rely on physical network devices for actual transmission and can be used as outgoing routed for network traffic. --> <!-- fujiwara: traffic shaper の訳語はどうしよう…。 --> <p>traffic shaper は、ユーザが定義したようにトラフィックを制限するイン タフェースデバイスを新しく作成するドライバです。このデバイスは、実際の 送信を行う物理的なネットワークデバイスに依存します。また、ネットワーク トラフィックに対しては送信用の routed として使えます。 <!--O <p>The shaper was introduced in Linux-2.1.15 and was backported to Linux-2.0.36 (it appeared in <tt/2.0.36-pre-patch-2/ distributed by Alan Cox, the author of the shaper device and maintainer of Linux-2.0). --> <p>traffic shaper は Linux 2.1.15 で導入され、Linux 2.0.36 に バックポート(訳注: 開発版カーネルの機能を安定版カーネルに移植すること) されました(traffic shaper は、Alan Cox が配布している <tt/2.0.36-pre-patch-2/ に含まれています。Alan Cox は Linux 2.0 用の shaper デバイスの作者でありメンテナです)。 <!--O <p>The traffic shaper can only be compiled as a module and is configured by the <em/shapecfg/ program with commands like the following: --> <p>traffic shaper はモジュールとしてコンパイルしなければなりません。 このデバイスは <em/shapecfg/ コマンドを以下のように使って設定します: <tscreen><verb> shapecfg attach shaper0 eth1 shapecfg speed shaper0 64000 </verb></tscreen> <!--O <p>The shaper device can only control the bandwidth of outgoing traffic, as packets are transmitted via the shaper only according to the routing tables; therefore, a ``route by source address'' functionality could help in limiting the overall bandwidth of specific hosts using a Linux router. --> <p>shaper デバイスは送信するトラフィックの帯域幅の制御しかできません。 というのも、パケットは経路表に従って shaper デバイス経由で送信されるか らです。したがって、「始点アドレスを使った経路制御」機能を利用すれば、 Linux ルータを使っている特定のホストの全体の帯域幅を制限できます。 <!--O <p>Linux-2.2 already has support for such routing, if you need it for Linux-2.0 please check the patch by Mike McLagan, at <tt/ftp.invlogic.com/. Refer to <tt/Documentation/networking/shaper.txt for further information about the shaper. --> <p>Linux 2.2 は最初からこのような経路制御に対応しています。Linux 2.0 でこの機能が必要ならば Mike McLagan によるパッチを調べてください。 このパッチは <tt/ftp.invlogic.com/ にあります。shaper デバイスに関する の詳しい情報については、<tt/Documentation/networking/shaper.txt/ を 見てください。 <!--O <p>If you want to try out a (tentative) shaping for incoming packets, try out <tt>rshaper-1.01</tt> (or newer), from <htmlurl url="ftp://ftp.systemy.it/pub/develop" name="ftp.systemy.it">. --> <p>受信するパケットの(試験的な)調整を試してみたければ、 <tt>rshaper-1.01</tt> を試すとよいでしょう(さらに新しいバージョンがあ るかもしれません)。これは <url url="ftp://ftp.systemy.it/pub/develop" name="ftp.systemy.it"> から入手できます。 <!-- ==================================================================== --> <!--O <sect1><heading>Routing in Linux-2.2 --> <sect1><heading>Linux 2.2 における経路制御 <p> <!--O The latest versions of Linux, 2.2 offer a lot of flexibility in routing policy. Unfortunately, you have to wait for the next version of this howto, or go read the kernel sources. --> 最新版の Linux であるバージョン 2.2 では、経路制御のポリシーは非常に柔 軟に設定できます。申し訳ありませんが、解説については本文書の次の版を待 つか、カーネルのソースを読むかしてください。 <p> <!-- FIXME: routing in linux-2.2 --> <!--######################################################################--> <!--O <sect><heading>Using common PC hardware --> <sect><heading>一般的な PC ハードウェアの使用 <p> <!-- ==================================================================== --> <sect1><heading>ISDN <p> <!--O The Integrated Services Digital Network (ISDN) is a series of standards that specify a general purpose switched digital data network. An ISDN `call' creates a synchronous point to point data service to the destination. ISDN is generally delivered on a high speed link that is broken down into a number of discrete channels. There are two different types of channels, the `B Channels' which will actually carry the user data and a single channel called the `D channel' which is used to send control information to the ISDN exchange to establish calls and other functions. In Australia for example, ISDN may be delivered on a 2Mbps link that is broken into 30 discrete 64kbps B channels with one 64kbps D channel. Any number of channels may be used at a time and in any combination. You could for example establish 30 separate calls to 30 different destinations at 64kbps each, or you could establish 15 calls to 15 different destinations at 128kbps each (two channels used per call), or just a small number of calls and leave the rest idle. A channel may be used for either incoming or outgoing calls. The original intention of ISDN was to allow Telecommunications companies to provide a single data service which could deliver either telephone (via digitised voice) or data services to your home or business without requiring you to make any special configuration changes. --> <p> ISDN(Integrated Services Digital Network)とは、汎用のディジタル・スイッ チ・ネットワークの規格の一種です。ISDN の `call' は、目的地との一対一 の同期的な接続を張ります。ISDN のデータは、通常、複数のチャネルに分割 された高速回線を経由して運ばれます。ISDN のチャネルには 2 つの種類があ ります。 `B チャネル' は実際のデータを転送します (同時に複数チャネルを 利用できます)。一方 `D チャネル' と呼ばれる回線は、 接続確立などの各種の制御情報を ISDN 交換機に送信します (一本だけ使われます)。 オーストラリアを例にとると、ISDN は 2Mbps の回線を使って送られますが、 その回線は 30 本の 64kbps B チャネルと 1 本の 64kbps D チャネルに分割 されており、これらのチャネルを同時にいくつでも使用可能です。すなわち、 30 本のチャネルをバラバラに使って 30 の接続先に 64kbps で接続可能です し、2 本のチャネルを同時使って 15 の接続先に 128kbps で接続することも 可能です。また、数本のチャネルだけを使って、残りはアイドルのままにして おくこともできます。一つのチャネルは送信にも受信にも使えます。ISDN の 元々の目的は、電話会社が同じ回線で、特別な設定変更をしなくても、(音声を ディジタル化した)一般の電話と、家庭や会社へのデータ通信サービスを 行えるようにすることでした。 [訳注: 日本の NTT では、一般ユーザ用には 64kbps の B チャネル 2 本と 16kbps の D チャネルをまとめた「INSネット64」を、企業向けには B チャネル 23 本と D チャネル 1 本をまとめた「INSネット 1500」を提供しています。] <!--O There are a few different ways to connect your computer to an ISDN service. One way is to use a device called a `Terminal Adaptor' which plugs into the Network Terminating Unit that you telecommunications carrier will have installed when you got your ISDN service and presents a number of serial interfaces. One of those interfaces is used to enter commands to establish calls and configuration and the others are actually connected to the network devices that will use the data circuits when they are established. Linux will work in this sort of configuration without modification, you just treat the port on the Terminal Adaptor like you would treat any other serial device. Another way, which is the way the kernel ISDN support is designed for allows you to install an ISDN card into your Linux machine and then has your Linux software handle the protocols and make the calls itself. --> コンピュータを ISDN サービスに接続するにはいくつかの方法がありますが、 TA(Terminal Adaptor)を使うのもその一つです。TA とは、ISDN サービスを 契約した際に回線業者が設置してくれるネットワークの終端ユニットに接続し て、複数のシリアルインターフェイスを提供する装置です。これらのインター フェイスの一つを使って回線接続や設定用のコマンドをやりとりし、 残りのインターフェイスが実際のネットワークデバイスに接続して、接続の確 立後にデータをやりとりするために使われます。この種の設定の場合、Linux は特別の設定無しに ISDN を使えます。 TA のポートを、他のシリ アルデバイスと同様に扱えばよいのです。もう一つ、Linux マシンに ISDN カードを装 着して、カーネルに ISDN 機能を組み込み、Linux から直接プロトコルを操 作して接続を行うこともできます(ただし、日本国内で使用可能な ISDN カー ドはサポートされていません)。 <!--O <p><bf/Kernel Compile Options/: --> <p><bf/カーネルのコンパイルオプション/: <tscreen><verb> ISDN subsystem ---> <*> ISDN support [ ] Support synchronous PPP [ ] Support audio via ISDN < > ICN 2B and 4B support < > PCBIT-D support < > Teles/NICCY1016PC/Creatix support </verb></tscreen> <!--O <p>The Linux implementation of ISDN supports a number of different types of internal ISDN cards. These are those listed in the kernel configuration options: --> <p>Linux の ISDN 機能は以下に示すような内蔵 ISDN カードをサポートして います。以下のカードがカーネルの設定時の選択肢として表示されます: <!--O <itemize> <item/ICN 2B and 4B/ <item/Octal PCBIT-D/ <item/Teles ISDN-cards and compatibles/ </itemize> --> <itemize> <item/ICN 2B と 4B/ <item/Octal PCBIT-D/ <item/Teles ISDN カードとその互換カード/ </itemize> <!--O <p>Some of these cards require software to be downloaded to them to make them operational. There is a separate utility to do this with. --> <p>必要なソフトウェアをダウンロードしなければならないカードもありますが、 そのためには専用のプログラムが別に必要です。 <p> <!--O Full details on how to configure the Linux ISDN support is available from the <tt>/usr/src/linux/Documentation/isdn/</tt> directory and an FAQ dedicated to <em>isdn4linux</em> is available at <htmlurl url="http://www.lrz-muenchen.de/~ui161ab/www/isdn/" name="www.lrz-muenchen.de">. (You can click on the english flag to get an english version). --> Linux の ISDN 機能をどのように設定するかの詳細については <tt>/usr/src/linux/Documentation/isdn/</tt> にある各文書と <url url="http://www.lrz-muenchen.de/~ui161ab/www/isdn/" name="www.lrz-muenchen.de"> にある <em>isdn4linux</em> という FAQ をご覧ください(英語版を見るため には English を選ぶことをお忘れなく)。 <p> <!--O <bf/A note about PPP/. The PPP suite of protocols will operate over either asynchronous or synchronous serial lines. The commonly distributed PPP daemon for Linux `<em/pppd/' supports only asynchronous mode. If you wish to run the PPP protocols over your ISDN service you need a specially modified version. Details of where to find it are available in the documentation referred to above. --> <bf>PPP についてのメモ</bf>。PPP プロトコルは非同期、同期を問わずに使 えますが、現在広く使われている Linux 用の PPP デーモン <em>pppd</em> は非同期モードしかサポートしていません。PPP を ISDN 経由で使いたい場合、 特別に修正したバージョンが必要になります。そのバージョンがどこで入手で きるかも上記の文書で紹介されています。 <!-- ==================================================================== --> <!--O <sect1><heading>PLIP for Linux-2.0 --> <sect1><heading>PLIP (Linux 2.0 の場合) <p> <!--O PLIP device names are `<tt/plip0/', `<tt/plip1/ and <tt/plip2/. --> PLIP のデバイス名は `<tt/plip0/', `<tt/plip1/, <tt/plip2/ です。 <!--O <p><bf/Kernel Compile Options/: --> <p><bf/カーネルのコンパイルオプション/: <tscreen><verb> Network device support ---> <*> PLIP (parallel port) support </verb></tscreen> <!--O <p><em/plip/ (Parallel Line IP), is like SLIP, in that it is used for providing a <em/point to point/ network connection between two machines, except that it is designed to use the parallel printer ports on your machine instead of the serial ports (a cabling diagram in included in the cabling diagram section later in this document). Because it is possible to transfer more than one bit at a time with a parallel port, it is possible to attain higher speeds with the <em/plip/ interface than with a standard serial device. In addition, even the simplest of parallel ports, printer ports, can be used in lieu of you having to purchase comparatively expensive 16550AFN UART's for your serial ports. PLIP uses a lot of CPU compared to a serial link and is most certainly not a good option if you can obtain some cheap ethernet cards, but it will work when nothing else is available and will work quite well. You should expect a data transfer rate of about 20 kilobytes per second when a link is running well. --> <p><em/plip/(Parallel Line IP)は、SLIP と同様に、2 台のマシンの間で <em/一対一/ 接続の機能を提供します。ただし、シリアルポートではなくプリ ンタ用のパラレルポートを使って接続する点が異なります(ケーブルの結線表 については、後述する結線表の節を参照してください)。パラレルポートは一 度に複数ビットを転送できるので、<em/plip/ を使えば通常のシリアルポート を使った接続よりは高速な接続が可能になります。また、最も単純な パラレルポートであるプリンタポートといえど、 16550AFN UART シリアル ポートを十分代替できるので、比較的高価な後者を購入せずにすみます (内蔵のシリアルポートが動作の遅い 16450 UART の時に必要)。 PLIP はシリアル接続と比べて CPU を消費するので、イーサネットカードを何 枚か安価に入手できる場合にはきっと使わない方がよいでしょう。しかし、他 に使えるものがない場合には非常に役立つでしょう。接続がうまくできている 場合、転送速度としては 20KB/秒 程度が期待できるはずです。 <p> <!--O The PLIP device drivers competes with the parallel device driver for the parallel port hardware. If you wish to use both drivers then you should compile them both as modules to ensure that you are able to select which port you want to use for PLIP and which ports you want for the printer driver. Refer to the ``Mudules mini-HOWTO'' for more information on kernel module configuration. --> PLIP デバイスドライバは、パラレルデバイスドライバとパラレルポートの ハードウェアを取り合います。どちらのドライバも使いたければ、両方のドラ イバをモジュールとしてコンパイルして、PLIP 用に使いたいポートとプリン タドライバ用に使いたいポートを選べるようにしましょう。カーネルモジュール の設定については ``Mudules mini-HOWTO'' を見てください。 <p> <!--O Please note that some laptops use chipsets that will not work with PLIP because they do not allow some combinations of signals that PLIP relies on, that printers don't use. --> ラップトップ機の中には、プリンタでは使っていないけれど PLIP には必要 な信号を扱えないようなチップを使っていて、PLIP が使用できないようなもの もあります。 <p> <!--O The Linux <em/plip/ interface is compatible with the <em/Crynwyr Packet Driver PLIP/ and this will mean that you can connect your Linux machine to a DOS machine running any other sort of tcp/ip software via <em/plip/. --> Linux の <em/plip/ インターフェイスは <em/Crynwyr Packet Driver PLIP/ と互換性があるので、Linux マシンと DOS マシンを PLIP 経由で接続して、 さまざまな TCP/IP ソフトウェアを使うことができます。 <p> <!-- In the 2.0.* series kernel the plip devices are mapped to i/o port and IRQ as follows: --> 2.0.* 系列のカーネルでは、plip デバイスは以下のように I/O ポートと IRQ に対応します: <tscreen><verb> device i/o IRQ ------ ----- --- plip0 0x3bc 5 plip1 0x378 7 plip2 0x278 2 </verb></tscreen> <!--O <p>If your parallel ports don't match any of the above combinations then you can change the IRQ of a port using the <em/ifconfig/ command using the `<tt/irq/' parameter (be sure to enable IRQ's on your printer ports in your ROM BIOS if it supports this option). As an alternative, you can specify ``<tt/io=/'' annd ``<tt/irq=/'' options on the <em/insmod/ command line, if you use modules. For example: --> <p>お使いのパラレルポートの設定が上記の組み合わせと異なる場合、 <em>ifconfig</em> コマンドの `<tt>irq</tt>' オプションを使ってポートの IRQ を変えることができます(ROM BIOS でプリンタポートが IRQ を使うか否 かを設定できる場合、忘れずに IRQ を使うように設定しておいてください)。 別の方法としては、モジュールを使っているならば <em/insmod/ のコマンドラインで ``<tt/io=/'' と ``<tt/irq=/'' を指定で きます。以下に例を示します: <tscreen><verb> root# insmod plip.o io=0x288 irq=5 </verb></tscreen> <!--O <p>PLIP operation is controlled by two timeouts, whose default values are probably ok in most cases. You will probably need to increase them if you have an especially slow computer, in which case the timers to increase are actually on the <bf/other/ computer. A program called <em/plipconfig/ exists that allows you to change these timer settings without recompiling your kernel. It is supplied with many Linux distributions. --> <p>PLIP の動作は 2 つのタイムアウト値によって制御されます。 ほとんどの場合はデフォルト値のままで大丈夫でしょう。 コンピュータが非常に遅い場合には、タイムアウト値を増やす必要があるかも しれませんが、この場合に実際に増やすのは<bf/通信相手/のコンピュータ のタイムアウト値です。カーネルを再コンパイルせずにタイマ設定を変更でき る <em/plipconfig/ というプログラムがあります。これは多くの Linux ディストリビューションに付属しています。 <!--O <p>To configure a <em/plip/ interface, you will need to invoke the following commands (or <bf/add/ them to your initialization scripts): --> <p><em/plip/ インタフェースを設定するには、以下のコマンドを実行する (またはシステムの起動スクリプトに追加する)必要があります: <tscreen><verb> root# /sbin/ifconfig plip1 localplip pointopoint remoteplip root# /sbin/route add remoteplip plip1 </verb></tscreen> <!--O <p>Here, the port being used is the one at I/O address 0x378; <em/localplip/ amd <em/remoteplip/ are the names or IP addresses used over the PLIP cable. I personally keep them in my <tt>/etc/hosts</tt> database: --> <!-- typo: `amd' --> <p>ここで、使われるポートの I/O アドレスは 0x378 です。 <em/localplip/ と <em/remoteplip/ の部分は PLIP ケーブル上の通信で使わ れるホスト名か IP アドレスです。筆者は、localplip と remoteplip を <tt>/etc/hosts</tt> データベースに登録しています。 <tscreen><verb> # plip entries 192.168.3.1 localplip 192.168.3.2 remoteplip </verb></tscreen> <!--O <p>The <em/pointopoint/ parameter has the same meaning as for SLIP, in that it specifies the address of the machine at the other end of the link. --> <em/pointtopoint/ パラメータは SLIP の場合と同じ意味で、接続のもう 一方の端にいるマシンのアドレスを設定します。 <p> <!--O In almost all respects you can treat a <em/plip/ interface as though it were a <em/SLIP/ interface, except that neither <em/dip/ nor <em/slattach/ need be, nor can be, used. --> ほとんどの場合、<em/plip/ インターフェイスは <em/SLIP/ インターフェイス と同様に使えます。ただし <em/plip/ は <em/dip/ や <em/slattach/ を使う 必要もなければ、使うこともできません。 <p> <!--O Further information on PLIP may be obtained from the ``PLIP mini-HOWTO''. --> PLIP に関する詳しい情報は ``PLIP mini-HOWTO'' に載っています。 <!-- FIXME: where did this go? And the Modules-HOWTO? --> <!-- ==================================================================== --> <!--O <sect1><heading>PLIP for Linux-2.2 --> <sect1><heading>PLIP (Linux 2.2 の場合) <!--O <p>During development of the 2.1 kernel versions, support for the parallel port was changed to a better setup. --> <p>バージョン 2.1 のカーネルの開発中に、パラレルポートのサポートが 変更され、設定がもっとうまくできるようになりました。 <!--O <p><bf/Kernel Compile Options/: --> <p><bf/カーネルのコンパイルオプション/: <tscreen><verb> General setup ---> [*] Parallel port support Network device support ---> <*> PLIP (parallel port) support </verb></tscreen> <!--O <p>The new code for PLIP behaves like the old one (use the same <em/ifconfig/ and <em/route/ commands as in the previous section, but initialization of the device is different due to the advanced parallel port support. --> 新しい PLIP コードは古いコードのように動作しますが(前の節の説明と同様 に <em/ifconfig/ コマンドと <em/route/ コマンドを使います)、パラレルポート のサポートが改良されたためにデバイスの初期化方法は変わっています。 <!--O <p>The ``first'' PLIP device is always called ``plip0'', where first is the first device detected by the system, similarly to what happens for Ethernet devices. The actual parallel port being used is one of the available ports, as shown in <tt>/proc/parport</tt>. For example, if you have only one parallel port, you'll only have a directory called <tt>/proc/parport/0</tt>. --> <p>「最初」の PLIP デバイスは常に ``plip0'' になります。ここで「最初」 と言っているのはシステムが最初に検出したという意味で、これは イーサネットデバイスの動作と似ています。実際に使われている パラレルポートは、<tt>/proc/parport</tt> に示されている利用可能な ポートのどれかです。例えば、パラレルポートが 1 つしかなければ、 <tt>/proc/parport/0</tt> というディレクトリしかないはずです。 <!--O <p>If your kernel didn't detect the IRQ number used by your port, ``<tt>insmod plip</tt>'' will fail; in this case just write the right number to <tt>/proc/parport/0/irq</tt> and reinvoke <em/insmod/. --> <p>パラレルポートが使っている IRQ 番号をカーネルが検出できなかった場合 には、``<tt>insmod plip</tt>'' は失敗します。この場合には、 <tt>/proc/parport/0/irq</tt> に正しい番号を書き込んで、<em/insmod/ を 再び実行すれば大丈夫です。 <!--O <p>Complete information about parallel port management is available in the file <tt>Documentation/parport.txt</tt>, part of your kernel sources. --> <p>パラレルポートの管理に関する完全な説明は <tt>Documentation/parport.txt</tt> ファイルに書かれています。この ファイルはカーネルソースに含まれています。 <!-- ==================================================================== --> <sect1><heading>PPP <p> <!--O PPP devices names are `<tt/ppp0/', `<tt/ppp1/, etc. Devices are numbered sequentially with the first device configured receiving `<tt/0/'. --> PPP のデバイス名は `<tt>ppp0</tt>', `<tt>ppp1</tt>' のようになります。 最初のデバイスが `<tt>0</tt>' で、以後は順に番号が付きます。 <!--O <p><bf/Kernel Compile Options/: --> <p><bf/カーネルのコンパイルオプション/: <tscreen><verb> Networking options ---> <*> PPP (point-to-point) support </verb></tscreen> <p> <!--O PPP configuration is covered in detail in the <htmlurl url="PPP-HOWTO.html" name="PPP-HOWTO">. --> PPP の設定については <url url="PPP-HOWTO.html" name="PPP-HOWTO"> で詳しく説明されています。 <!-- ==================================================================== --> <!--O <sect2><heading>Maintaining a permanent connection to the net with <em/pppd/. --> <sect2><heading><em/pppd/ を使ってインターネットと常時接続する方法 <p> <!--O If you are fortunate enough to have a semi permanent connection to the net and would like to have your machine automatically redial your PPP connection if it is lost then here is a simple trick to do so. --> もし運良くインターネットへの常時接続が可能な環境にいて、 PPP 接続が 切れた場合には自動的にリダイアルしたいという場合には、以下の簡単な技を使って 実現できます。 <p> <!--O Configure PPP such that it can be started by the <tt/root/ user by issuing the command: --> 以下のコマンドで <tt>root</tt> から起動できるように PPP を設定します。 <tscreen><verb> # pppd </verb></tscreen> <!--O <bf/Be sure/ that you have the `<tt/-detach/' option configured in your <tt>/etc/ppp/options</tt> file. Then, insert the following line into your <tt>/etc/inittab</tt> file, down with the <em/getty/ definitions: --> <tt>/etc/ppp/options</tt> ファイルに `<tt>-detach</tt>' オプションを指 定することを忘れずに。その上で、以下の行を <tt>/etc/inittab</tt> に加 え、<em>getty</em> の設定に用います。 <tscreen><verb> pd:23:respawn:/usr/sbin/pppd </verb></tscreen> <!--O This will cause the <em/init/ program to spawn and monitor the <em/pppd/ program and automatically restart it if it dies. --> こうしておけば、<em>init</em> プログラムが <em>pppd</em> の立ち上げと 監視を行い、<em>pppd</em> が死んだ場合は自動的に再起動します。 <!-- ==================================================================== --> <!--O <sect1><heading>SLIP client --> <sect1><heading>SLIP クライアント <p> <!--O SLIP devices are named `<tt/sl0/', `<tt/sl1/' etc. with the first device configured being assigned `<tt/0/' and the rest incrementing sequentially as they are configured. --> SLIP のデバイス名は `<tt>sl0</tt>', `<tt>sl1</tt>' などになります。最 初のデバイスが `<tt>0</tt>' で、残りは順に番号が振られます。 <!--O <p><bf/Kernel Compile Options/: --> <p><bf/カーネルのコンパイルオプション/: <tscreen><verb> Network device support ---> [*] Network device support <*> SLIP (serial line) support [ ] CSLIP compressed headers [ ] Keepalive and linefill [ ] Six bit SLIP encapsulation </verb></tscreen> <p> <!--O SLIP (Serial Line Internet Protocol) allows you to use tcp/ip over a serial line, be that a phone line with a dialup modem, or a leased line of some sort. Of course to use SLIP you need access to a <em>SLIP-server</em> in your area. Many universities and businesses provide SLIP access all over the world. --> SLIP(Serial Line Internet Protocol)を使えば、モデム経由の電話回線や、 なんらかの専用線のようなシリアル回線上で TCP/IP 接続を実現できます。もちろ ん SLIP を使うためには、地元の <em>SLIP サーバ</em> に接続しなければ いけませんが、世界中の大学や商用プロバイダが SLIP 接続を提供しています。 [訳注: 日本では SLIP 接続よりも PPP 接続の方が主流です。] <p> <!--O Slip uses the serial ports on your machine to carry IP datagrams. To do this it must take control of the serial device. Slip device names are named <em>sl0</em>, <em>sl1</em> etc. How do these correspond to your serial devices ? The networking code uses what is called an <em>ioctl</em> (i/o control) call to change the serial devices into SLIP devices. There are two programs supplied that can do this, they are called <em>dip</em> and <em>slattach</em> --> SLIP はシリアルポートを経由して IP データグラムを送りますので、シリア ルデバイスを制御する必要があります。SLIP のデバイス名は <em>sl0</em>、 <em>sl1</em> などですが、これらとシリアルデバイスとの関係はどのように なっているのでしょうか? SLIP のプログラムは <em>ioctl</em> (I/O control) システムコールを使ってシリアルデバイスを SLIP デバイスに変換しています。この ためのプログラムが <em>dip</em> と <em>slattach</em> です。 <!-- ==================================================================== --> <sect2><heading>dip <p> <!--O <em>dip</em> (Dialup IP) is a smart program that is able to set the speed of the serial device, command your modem to dial the remote end of the link, automatically log you into the remote server, search for messages sent to you by the server and extract information for them such as your IP address and perform the <em>ioctl</em> necessary to switch your serial port into SLIP mode. <em>dip</em> has a powerful scripting ability and it is this that you can exploit to automate your logon procedure. --> <em>dip</em> (Dialup IP)とは、シリアルデバイスの回線速度を設定したり、 モデムに電話をかけさせて自動的にリモートサーバにログインしたり、サー バから送られるログイン時のメッセージの中から割り当てられた IP アドレス を見つけたり、必要に応じて <em>ioctl</em> を使いシリアルポートを SLIP モードに変えたりする多機能なプログラムです。<em>dip</em> には強力なス クリプト機能があり、ログイン手続きを自動実行できます。 <p> <!--O You can find it at: <htmlurl url="ftp://metalab.unc.edu/pub/Linux/system/Network/serial/dip/dip337o-uri.tgz" name="metalab.unc.edu">. --> dip は <url url="ftp://metalab.unc.edu/pub/Linux/system/Network/serial/dip/dip337o-uri.tgz" name="metalab.unc.edu"> にあります。 <p> <!--O To install it, try the following: --> インストールするには、以下の手順を実行してください: <tscreen><verb> user% tar xvzf dip337o-uri.tgz user% cd dip-3.3.7o user% vi Makefile root# make install </verb></tscreen> <!--O <p>The <tt>Makefile</tt> assumes the existence of a group called <em>uucp</em>, but you might like to change this to either <em>dip</em> or <em>SLIP</em> depending on your configuration. --> このパッケージに入っている <tt>Makefile</tt> は <em>uucp</em> というグ ループがあることを前提にしています。環境に合わせて、このグループを <em>dip</em> や <em>SLIP</em> にしてください。 <!-- ==================================================================== --> <sect2><heading>slattach <p> <!--O <em>slattach</em> as contrasted with <em>dip</em> is a very simple program, that is very easy to use, but does not have the sophistication of <em>dip</em>. It does not have the scripting ability, all it does is configure your serial device as a SLIP device. It assumes you have all the information you need and the serial line is established before you invoke it. <em>slattach</em> is ideal to use where you have a permanent connection to your server, such as a physical cable, or a leased line. --> <em>slattach</em> は <em>dip</em> に比べるとずいぶん単純なプログラムで す。非常に簡単に使えますが、<em>dip</em> ほどの機能は持っていません。 <em>slattach</em> はスクリプト機能もなく、シリアルデバイスを SLIP デバ イスに変換する機能しか持っていません。<em>slattach</em> を使う場合には、 IP アドレスなどの情報が予め分っており、さらに起動前にシリアル接続が確立され ていなければいけません。<em>slattach</em> は、シリアル回線を経由してサー バに直結していたり、シリアルの専用回線を使っている際に便利なプログラム です。 <!-- ==================================================================== --> <!--O <sect2><heading>When do I use which ? --> <sect2><heading>どんな場合にどれを使うべきか? <p> <!--O You would use <em>dip</em> when your link to the machine that is your SLIP server is a dialup modem, or some other temporary link. You would use <em>slattach</em> when you have a leased line, perhaps a cable, between your machine and the server and there is no special action needed to get the link working. See section `Permanent Slip connection' for more information. --> <em>dip</em> は、モデムを経由して SLIP サーバに接続する場合か、一時的 な接続を張る場合に使います。専用回線でサーバと接続しており、接続のため に特別の処理が不要の場合は <em>slattach</em> が便利です。詳細について は「恒久的な SLIP 接続」の節を参照してください。 <!--O <p>Configuring SLIP is much like configuring an Ethernet interface (read section `Configuring an ethernet device' above). However there are a few key differences. --> <p>SLIP インターフェイスの設定はイーサネットインターフェイスの設定によ く似ています(既述の「イーサネットデバイスの設定」の節を参照してください)。 しかしながら、いくつか重要な違いもあります。 <!--O <p>First of all, SLIP links are unlike ethernet networks in that there is only ever two hosts on the network, one at each end of the link. Unlike an ethernet that is available for use as soon are you are cabled, with SLIP, depending on the type of link you have, you may have to initialize your network connection in some special way. --> <p>まず第一に、SLIP の場合はイーサネットのネットワークとは異なり、接続 の両端に一台ずつのマシンしかありません。ethernet の場合はケーブルを繋 げばすぐに使えますが、SLIP の場合、接続形態にもよりますが、ネットワーク 接続を開始するには何らかの初期化処理が必要です。 <!--O <p>If you are using <em>dip</em> then this would not normally be done at boot time, but at some time later, when you were ready to use the link. It is possible to automate this procedure. If you are using <em>slattach</em> then you will probably want to add a section to your <em>rc.inet1</em> file. This will be described soon. --> <p><em>dip</em> の場合、システムの起動時には設定できず、シリアル接続の 準備ができた段階で起動することになります。この手順は自動化できます。 <em>slattach</em> の場合、<em>rc.inet1</em> の中で設定するのがいいでしょ う。この方法については後述します。 <!--O <p>There are two major types of SLIP servers: Dynamic IP address servers and static IP address servers. Almost every SLIP server will prompt you to login using a username and password when dialing in. <em>dip</em> can handle logging you in automatically. --> <p>SLIP サーバには動的に IP アドレスを割り当てるタイプのサーバと予め決 まった IP アドレスを使うタイプのサーバの 2 種があります。また、ほとん どの SLIP サーバが、電話をかけてログインする時にはユーザ名とパスワード の入力を求めます。<em>dip</em> を使えば、この処理を自動化できます。 <!-- ==================================================================== --> <!--O <sect2><heading>Static SLIP server with a dialup line and DIP. --> <sect2><heading>予め決まった IP アドレスを使う SLIP サーバ <!--O <p>A static SLIP server is one in which you have been supplied an IP address that is exclusively yours. Each time you connect to the server, you will configure your SLIP port with that address. The static SLIP server will answer your modem call, possibly prompt you for a username and password, and then route any datagrams destined for your address to you via that connection. If you have a static server, then you may want to put entries for your hostname and IP address (since you know what it will be) into your <tt>/etc/hosts</tt>. You should also configure some other files such as: <tt>rc.inet2</tt>, <tt>host.conf</tt>, <tt>resolv.conf</tt>, <tt>/etc/HOSTNAME</tt> and <tt>rc.local</tt>. Remember that when configuring <tt>rc.inet1</tt>, you don't need to add any special commands for your SLIP connection since it is <em>dip</em> that does all of the hard work for you in configuring your interface. You will need to give <em>dip</em> the appropriate information and it will configure the interface for you after commanding the modem to establish the call and logging you into your SLIP server. --> <p>予め割り当てておいた IP アドレスを使うタイプのサーバでは、事前に 専用の IP アドレスを各クライアントに割り当てて、各クライアントは接続の 際にその IP アドレスで SLIP ポートを設定します。この種の SLIP サーバで は、モデムからの着信に答えて、ユーザ名とパスワードの入力を促してユーザ を確認した後、あなた用の IP アドレス向けのデータグラムはすべてその SLIP デバイスに送るように経路制御情報を設定します。 この種のサーバを使っている場合は、自分のホスト名と IP アドレスは予め 決まっていますから、 <tt>/etc/hosts</tt> に書いておくことも可能です。ま た <tt>rc.inet2</tt> や <tt>host.conf</tt>, <tt>resolv.conf</tt>, <tt>/etc/HOSTNAME</tt>, <tt>rc.local</tt> などを通常のイーサネット接続 と同様に設定することができます。<tt>rc.inet1</tt> を設定する場合、SLIP 接続用に特別のコマンドを設定する必要はありません。ネットワークインター フェイスを設定するなどの作業は <em>dip</em> の仕事です。必要な情報は <em>dip</em> に与え、<em>dip</em> がモデムを使って電話をかけ、接続が確 立してから必要な設定を実行するようにします。 <!--O <p>If this is how your SLIP server works then you can move to section `Using Dip' to learn how to configure <em>dip</em> appropriately. --> <p>接続先の SLIP サーバがこの種の設定の場合、次に「DIP の使い方」の節に進 んで、<em>dip</em> の設定方法を調べてください。 <!-- ==================================================================== --> <!--O <sect2><heading>Dynamic SLIP server with a dialup line and DIP. --> <sect2><heading>接続時に IP アドレスを割り当てるタイプのサーバ <!-- <p>A <em>dynamic</em> SLIP server is one which allocates you an IP address randomly, from a pool of addresses, each time you logon. This means that there is no guarantee that you will have any particular address each time, and that address may well be used by someone else after you have logged off. The network administrator who configured the SLIP server will have assigned a pool of address for the SLIP server to use, when the server receives a new incoming call, it finds the first unused address, guides the caller through the login process and then prints a welcome message that contains the IP address it has allocated and will proceed to use that IP address for the duration of that call. --> <p><em>動的</em>な SLIP サーバとは、予め用意してある複数の IP アドレス の中から、接続のたびに異なる IP アドレスをクライアントに割り当てる タイプのサーバです。この場合、接続のたびに割り当てられる IP アドレスは 異なり、あなたが今使っているアドレスも、ログアウト後は誰か別の人に割り 当てられることになります。SLIP サーバを設定するネットワークの管理者は、 予め SLIP で使うための IP アドレスを複数個用意しておき、新しく接 続してきたマシンには使っていない IP アドレスを割り当てるように設定しま す。 この場合、ログインプロセスの中でウェルカム・メッセージとともに割り当て た IP アドレスが示され、その接続の間はその IP アドレスを使って通信しま す。 <!--O <p>Configuring for this type of server is similar to configuring for a static server, except that you must add a step where you obtain the IP address that the server has allocated for you and configure your SLIP device with that. --> <p>この種のサーバを使う場合も、予め IP アドレスを割り当てるタイプ のサーバとほぼ同じ設定になりますが、接続の度に割り当てられた IP アドレス を使って SLIP デバイスを設定するというステップが余計に必要になります。 <!--O <p>Again, <em>dip</em> does the hard work and new versions are smart enough to not only log you in, but to also be able to automatically read the IP address printed in the welcome message and store it so that you can have it configure your SLIP device with it. --> <p>ここでも <em>dip</em> がこの大変な作業を引き受けてくれます。 <em>dip</em> はログイン処理をするだけでなく、ウェルカムメッセージの 中に示される IPアドレスを自動的に読みこんで、それを使って SLIP デバイ スを設定してくれます。 <!--O <p>If this is how your SLIP server works then you can move to section `Using Dip' to learn how to configure <em>dip</em> appropriately. --> <p>接続先の SLIP サーバがこの種の設定の場合は、「DIP の使い方」の節へ 進んで <em>dip</em> の設定方法を覚えてください。 <!-- ==================================================================== --> <!--O <sect2><heading>Using DIP. --> <sect2><heading>DIP の使い方 <!--O <p>As explained earlier, <em>dip</em> is a powerful program that can simplify and automate the process of dialing into the SLIP server, logging you in, starting the connection and configuring your SLIP devices with the appropriate <em>ifconfig</em> and <em>route</em> commands. --> <p>今までに述べてきたように、<em>dip</em> を使えば SLIP サーバへ電話をか けてログインするという処理が自動的にできます。ログインすれば、 <em>dip</em> は自動的に <em>ifconfig</em> と<em>route</em> コマンドを 使って SLIP デバイスを設定します。 <!--O <p>Essentially to use <em>dip</em> you'll write a `dip script', which is basically a list of commands that <em>dip</em> understands that tell <em>dip</em> how to perform each of the actions you want it to perform. See <tt>sample.dip</tt> that comes supplied with <em>dip</em> to get an idea of how it works. <em>dip</em> is quite a powerful program, with many options. Instead of going into all of them here you should look at the <em>man</em> page, README and sample files that will have come with your version of <em>dip</em>. --> <p><em>dip</em> を使うためには、`dip スクリプト' を書く必要があります。 `dip スクリプト' は、基本的に <em>dip</em> が理解できるコマンドを並べ たもので、<em>dip</em> で実行したいコマンドを、どのように実行するかを 記述しておきます。どのように書くかは、<em>dip</em> プログラムに付属の <tt>sample.dip</tt> をご覧ください。<em>dip</em> は多数のオプションを 有する強力なプログラムなので、ここではその詳細に触れることができません。 <em>dip</em> の <em>man</em> や README、サンプルファイルを調べてくだ さい。 <!--O <p>You may notice that the <tt>sample.dip</tt> script assumes that you're using a static SLIP server, so you know what your IP address is beforehand. For dynamic SLIP servers, the newer versions of <em>dip</em> include a command you can use to automatically read and configure your SLIP device with the IP address that the dynamic server allocates for you. The following sample is a modified version of the <tt>sample.dip</tt> that came supplied with <em>dip337j-uri.tgz</em> and is probably a good starting point for you. You might like to save it as <tt>/etc/dipscript</tt> and edit it to suit your configuration: --> <p>パッケージに付属の<tt>sample.dip</tt> ファイルは、予め割り当てら れた IP アドレスを使うような設定になっています。動的に IP アドレスを割 り当てるタイプのサーバの場合は、サーバが割り当てた IP アドレスを読み、 自動的に SLIP デバイスに設定するようなコマンド例を参照してください (新しいバージョンの <em>dip</em> パッケージに入っています)。以下 に示すサンプルは <em>dip337j-uri.tgz</em> に付属の <tt>sample.dip</tt> をもとに修正したバージョンで、この例を元に設定していくのがいいでしょう。 以下の部分を <tt>/etc/dipscript</tt> ファイルにセーブして、お使いの環 境に合うように修正してください。 <tscreen><verb> # # sample.dip Dialup IP connection support program. # # This file (should show) shows how to use the DIP # This file should work for Annex type dynamic servers, if you # use a static address server then use the sample.dip file that # comes as part of the dip337-uri.tgz package. # # # Version: @(#)sample.dip 1.40 07/20/93 # # Author: Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG> # main: # Next, set up the other side's name and address. # My dialin machine is called 'xs4all.hacktic.nl' (== 193.78.33.42) get $remote xs4all.hacktic.nl # Set netmask on sl0 to 255.255.255.0 netmask 255.255.255.0 # Set the desired serial port and speed. port cua02 speed 38400 # Reset the modem and terminal line. # This seems to cause trouble for some people! reset # Note! "Standard" pre-defined "errlevel" values: # 0 - OK # 1 - CONNECT # 2 - ERROR # # You can change those grep'ping for "addchat()" in *.c... # Prepare for dialing. send ATQ0V1E1X4\r wait OK 2 if $errlvl != 0 goto modem_trouble dial 555-1234567 if $errlvl != 1 goto modem_trouble # We are connected. Login to the system. login: sleep 2 wait ogin: 20 if $errlvl != 0 goto login_trouble send MYLOGIN\n wait ord: 20 if $errlvl != 0 goto password_error send MYPASSWD\n loggedin: # We are now logged in. wait SOMEPROMPT 30 if $errlvl != 0 goto prompt_error # Command the server into SLIP mode send SLIP\n wait SLIP 30 if $errlvl != 0 goto prompt_error # Get and Set your IP address from the server. # Here we assume that after commanding the SLIP server into SLIP # mode that it prints your IP address get $locip remote 30 if $errlvl != 0 goto prompt_error # Set up the SLIP operating parameters. get $mtu 296 # Ensure "route add -net default xs4all.hacktic.nl" will be done default # Say hello and fire up! done: print CONNECTED $locip ---> $rmtip mode CSLIP goto exit prompt_error: print TIME-OUT waiting for sliplogin to fire up... goto error login_trouble: print Trouble waiting for the Login: prompt... goto error password:error: print Trouble waiting for the Password: prompt... goto error modem_trouble: print Trouble occurred with the modem... error: print CONNECT FAILED to $remote quit exit: exit </verb></tscreen> <!--O <p>The above example assumes you are calling a <em>dynamic</em> SLIP server, if you are calling a <em>static</em> SLIP server, then the <tt>sample.dip</tt> file that comes with <em>dip337j-uri.tgz</em> should work for you. --> <p>上記のサンプルスクリプトでは <em>動的に IP アドレスを割り当てるタイプ </em>の SLIP サーバに接続するように設定しています。予め IP アドレ スの分っている SLIP サーバでは、<em>dip337j-uri.tgz</em> に付属の <tt>dsample.dip</tt> を使ってください。 <p> <!--O When <em>dip</em> is given the <em>get $local</em> command it searches the incoming text from the remote end for a string that looks like an IP address, ie strings numbers separated by `.' characters. This modification was put in place specifically for <em>dynamic</em> SLIP servers, so that the process of reading the IP address granted by the server could be automated. --> <em>dip</em> に <em>get $local</em> コマンドを与えれば、 <tt>dip</tt> は接続先から送られてきたテキストの中から IP アドレスのよ うに見える文字列(例えば `.' で区切られた数字)を探します。この修正は、 <em>動的に IP アドレスを割り当てる</em>タイプの SLIP サーバ用で、 サーバから与えられる IP アドレスを読み取る過程を自動化できます。 <p> <!--O The example above will automatically create a default route via your SLIP link, if this is not what you want, you might have an ethernet connection that should be your default route, then remove the <em>default</em> command from the script. After this script has finished running, if you do an <em>ifconfig</em> command, you will see that you have a device <em>sl0</em>. This is your SLIP device. Should you need to, you can modify its configuration manually, after the <em>dip</em> command has finished, using the <em>ifconfig</em> and <em>route</em> commands. --> 上記の例では、自動的に SLIP 接続をデフォルトの経路に指定します。既に ethenet ネットワークに接続していて、デフォルトの経路はそちらにしたいよ うな場合には、上記のスクリプトから <em>default</em> を指定している行を 削除してください。このスクリプトが終了してから <em>ifconfig</em> コマ ンドを使って <em>sl0</em> デバイスができていることを確認します。これが SLIP デバイスです。必要ならば、<em>dip</em> コマンドが終了してから <em>ifocnfig</em> や <em>route</em> コマンドを使って手動で設定してくだ さい。 <!--O Please note that <em>dip</em> allows you to select a number of different protocols to use with the <tt>mode</tt> command, the most common example is <em>cSLIP</em> for SLIP with compression. Please note that both ends of the link must agree, so you should ensure that whatever you select agrees with what your server is set to. --> <em>dip</em> では <tt>mode</tt> コマンドを使って、複数のプロトコルの中 から使うべきプロトコルを指定できます。もっともよく使われているプロトコ ルは SLIP に圧縮機能を組み込んだ <em>cSLIP</em> です。接続の両端が同じ プロトコルを使う必要があるので、サーバの選んだプロトコルと同じものを使っ ているかを確認してください。 <!--O The above example is fairly robust and should cope with most errors. Please refer to the <em>dip</em> man page for more information. Naturally you could, for example, code the script to do such things as redial the server if it doesn't get a connection within a prescribed period of time, or even try a series of servers if you have access to more than one. --> 上記のスクリプトはたいていのエラーには耐えられるように頑丈に作ってありま す。より詳しい情報は <em>dip</em> の man ページをご覧ください。少し 工夫をすれば、設定した時間内にサーバへ接続できなければ自動的にリダイアル したり、複数のサーバを順に試してみるような機能を組み込むことも可能です。 <!-- ==================================================================== --> <!--O <sect2><heading>Permanent SLIP connection using a leased line and slattach. --> <sect2><heading>専用線と slattach を使って恒久的な SLIP 接続を行う方法 <p> <!--O If you have a cable between two machines, or are fortunate enough to have a leased line, or some other permanent serial connection between your machine and another, then you don't need to go to all the trouble of using <em>dip</em> to set up your serial link. <em>slattach</em> is a very simple to use utility that will allow you just enough functionality to configure your connection. --> 2 台のマシンをシリアルケーブルでつないでいたり、2 台のマシンを専用線や 常時接続しているシリアル回線で接続しているような環境ならば、シリアル接 続を設定するために <em>dip</em> を使う必要はありません。そのような接続 の設定には、より利用の簡単な <em>slattach</em> の機能で十分です。 <!--O Since your connection will be a permanent one, you will want to add some commands to your <tt>rc.inet1</tt> file. In essence all you need to do for a permanent connection is ensure that you configure the serial device to the correct speed and switch the serial device into SLIP mode. <em>slattach</em> allows you to do this with one command. <bf>Add</bf> the following to your <tt>rc.inet1</tt> file: --> 専用回線の場合、起動時に実行される <tt>rc.inet1</tt> で必要な設定を行 うのがいいでしょう。実際のところ、必要なのはシリアルデバイスを正しいス ピードに設定して、SLIP モードに変更するだけです。<em>slattach</em> を 使えば、この作業は一つのコマンドで実現できます。以下のコマンドを <tt>rc.inet1</tt> ファイルに追加してください。 <tscreen><verb> # # Attach a leased line static SLIP connection # # configure /dev/cua0 for 19.2kbps and cslip /sbin/slattach -p cslip -s 19200 /dev/cua0 & /sbin/ifconfig sl0 IPA.IPA.IPA.IPA pointopoint IPR.IPR.IPR.IPR up # # End static SLIP. </verb></tscreen> <!--O Where: <descrip> <p><tag>IPA.IPA.IPA.IPA</tag>represents your IP address. <p><tag>IPR.IPR.IPR.IPR</tag>represents the IP address of the remote end. </descrip> --> ここで、 <descrip> <tag>IPA.IPA.IPA.IPA</tag> は、あなたのマシンの IP アドレスで、 <tag>IPR.IPR.IPR.IPR</tag> 接続先のマシンの IP アドレスです。 </descrip> <!--O <p><em>slattach</em> allocates the first unallocated SLIP device to the serial device specified. <em>slattach</em> starts with <em>sl0</em>. Therefore the first <em>slattach</em> command attaches SLIP device <em>sl0</em> to the serial device specified and <em>sl1</em> the next time, etc. --> <p><em>slattach</em> は指定したシリアルデバイスに空いている最初の SLIP デバイスを割り当てます。<em>slattach</em> の割り当てるデバイス名は <em>sl0</em> から始まり、次に割り当てるデバイス名は <em>sl1</em>、のよ うになります。 <!--O <p><em>slattach</em> allows you to configure a number of different protocols with the <tt>-p</tt> argument. In your case you will use either <em>SLIP</em> or <em>cSLIP</em> depending on whether you want to use compression or not. Note: both ends must agree on whether you want compression or not. --> <p><em>slattach</em> に <tt>-p</tt> 引数を指定すれば、異なるプロトコル を設定可能です。この機能を使って、圧縮の有無によって <em>SLIP</em> か <em>cSLIP</em> を使い分ける場合がよくあります。注意:圧縮の有無は接続 の両端で同じ設定にする必要があります。 <!-- ==================================================================== --> <!--O <sect1><heading>SLIP server. --> <sect1><heading>SLIP サーバ <p> <!--O If you have a machine that is perhaps network connected, that you'd like other people be able to dial into and provide network services, then you will need to configure your machine as a server. If you want to use SLIP as the serial line protocol, then currently you have three options as to how to configure your Linux machine as a SLIP server. My preference would be to use the first presented, <em>sliplogin</em>, as it seems the easiest to configure and understand, but I will present a summary of each, so you can make your own decision. --> インターネットなどのネットワークに接続したマシンがあり、電話を経由して 接続してきた他の人に各種のサービスを提供したい場合、あなたのマシンをサー バとして設定する必要があります。接続のためのシリアル回線のプロトコルに SLIP を使った場合、設定の仕方には 3 種類の方法があります。それぞれの方法 を以下に示しますが、私のお薦めは最初の <em>sliplogin</em> を使う方法で す。この方法が一番設定も理解も簡単です。でも他の方法についても説明します ので、どれを使うかは御自分で判断してください。 <!-- ==================================================================== --> <!--O <sect2><heading>Slip Server using <em/sliplogin/. --> <sect2><heading><em/sliplogin/ を使った SLIP サーバの設定 <p> <!--O <em/sliplogin/ is a program that you can use in place of the normal login shell for SLIP users that converts the terminal line into a SLIP line. It allows you to configure your Linux machine as either a <em/static address server/, users get the same address everytime they call in, or a <em/dynamic address server/, where users get an address allocated for them which will not necessarily be the same as the last time they called. --> <em>sliplogin</em> は通常の login シェルの代わりに使う SLIP ユーザ用の プログラムで、端末の回線を SLIP モードに変更します。<em>sliplogin</em> を使えば、 Linux マシンを静的アドレスサーバにも動的アドレスサーバにも 設定できます。前者は予めユーザごとに割り当てておいた IP アドレスを使い、 後者では予め用意しておいた IP アドレスの中から接続の度に IP アドレスを 割り当てることになります。 <p> <!--O The caller will login as per the standard login process, entering their username and password, but instead of being presented with a shell after their login, <em/sliplogin/ is executed which searches its configuration file (<tt>/etc/slip.hosts</tt>) for an entry with a login name that matches that of the caller. If it locates one, it configures the line as an 8bit clean line, and uses an <em/ioctl/ call to convert the line discipline to SLIP. When this process is complete, the last stage of configuration takes place, where <em/sliplogin/ invokes a shell script which configures the SLIP interface with the relevant ip address, netmask and sets appropriate routing in place. This script is usually called <tt>/etc/slip.login</tt>, but in a similar manner to <em/getty/, if you have certain callers that require special initialization, then you can create configuration scripts called <tt>/etc/slip.login.loginname</tt> that will be run instead of the default specifically for them. --> 接続過程は通常のログインプロセスとほぼ同じで、まずユーザ名とパスワード が必要です。しかしながら、その後はログインシェルが立ちあがる代わりに 設定ファイル(<tt>/etc/slip.hosts</tt>)に記述されたログイン名に従って <em>sliplogin</em> が実行されます。設定ファイルのユーザ名が確認されれ ば、回線を 8 ビットすべてが通過するように設定して、<em>ioctl</em> コー ルを使って回線を SLIP モードに変更します。この過程が終了したら、 設定の最終段階へと進みます。 <em>sliplogin</em> はシェルスクリプトを起動して、指定した IP アドレスやネットマスクに従っ て SLIP デバイスを設定し、適切な経路を定義します。このためのスクリプト は通常 <tt>/etc/slip.login</tt> と呼ばれていますが、<em>getty</em> の ようにユーザごとに設定することもでき、そのような場合は <tt>/etc/slip.login.loginame</tt> にユーザごとの設定スクリプトを用意し ます。 <p> <!--O There are either three or four files that you need to configure to get <em/sliplogin/ working for you. I will detail how and where to get the software and how each is configured in detail. The files are: --> <em>sliplogin</em> を使うためには設定ファイルがいくつか必要です。以 下に、それらをどこから入手してどのように設定するかを説明します。 必要なファイルは以下の通りです: <itemize> <!--O <item><tt>/etc/passwd</tt>, for the dialin user accounts. --> <item><tt>/etc/passwd</tt> は電話経由で接続してくるユーザのアカウント を設定します。 <!--O <item><tt>/etc/slip.hosts</tt>, to contain the information unique to each dial-in user. --> <tt>/etc/slip.hosts</tt> には、それぞれのユーザごとの情報を設定します。 <!--O <item><tt>/etc/slip.login</tt>, which manages the configuration of the routing that needs to be performed for the user. --> <item><tt>/etc/slip.login</tt> には、ユーザに対して行う必要がある経路制御の設定を行います。 <!--O <item><tt>/etc/slip.tty</tt>, which is required only if you are configuring your server for <em/dynamic address allocation/ and contains a table of addresses to allocate --> <item><tt>/etc/slip.tty</tt> は、「<em/動的な IP アドレス割り当て/」用のサーバを設定する場合に 限って必要となるファイルで、割り当てるアドレスの表になっています。 <!--O <item><tt>/etc/slip.logout</tt>, which contains commands to clean up after the user has hung up or logged out. --> <item><tt>/etc/slip.logout</tt> には、ユーザが接続を切ったりログアウトした際の後始末のためのコマンドを 設定します。 </itemize> <!-- .................................................................... --> <!--O <sect3><heading>Where to get <em>sliplogin</em> --> <sect3><heading><em>sliplogin</em> の入手先 <p> <!--O You may already have the <em/sliplogin/ package installed as part of your distribution, if not then <em/sliplogin/ can be obtained from: <htmlurl url="ftp://metalab.unc.edu/pub/linux/system/Network/serial/sliplogin-2.1.1.tar.gz" name="metalab.unc.edu">. The tar file contains both source, precompiled binaries and a <em/man/ page. --> すでにディストリビューションの一部として <em>sliplogin</em> をイン ストール済みかもしれませんが、そうでなければ <url url="ftp://metalab.unc.edu/pub/linux/system/Network/serial/sliplogin-2.1.1.tar.gz" name="metalab.unc.edu"> から入手できます。この tar ファイルには、ソースとコンパイル済みのバイ ナリ、<em>man</em> ページが入っています。 <p> <!--O To ensure that only authorized users will be able to run <em/sliplogin/ program, you should add an entry to your <tt>/etc/group</tt> file similar to the following: --> <em>sliplogin</em> を実行できるのは、その権限を持ったユーザだけなので、 以下のようなエントリを<tt>/etc/group</tt> ファイルに登録する必要があり ます。 <tscreen><verb> .. slip::13:radio,fred .. </verb></tscreen> <!--O <p>When you install the <em/sliplogin/ package, the <tt/Makefile/ will change the group ownership of the <em/sliplogin/ program to <tt/slip/, and this will mean that only users who belong to that group will be able to execute it. The example above will allow only users <tt/radio/ and <tt/fred/ to execute <em/sliplogin/. --> <p><em>sliplogin</em> パッケージをインストールすれば、<tt>Makefile</tt> が自動的に <em>sliplogin</em> のグループを <tt>slip</tt>にし、このグルー プに属するユーザだけが <em>sliplogin</em> プログラムを実行できるように なります。上の例では <tt>radio</tt> と <tt>fred</tt> のみが <em>sliplogin</em> を実行できます。 <p> <!--O To install the binaries into your <tt>/sbin</tt> directory and the <em/man/ page into section 8, do the following: --> 必要なバイナリを<tt>/sbin</tt> ディレクトリにインストールし、 <em>man</em>ページを <em/man/ ページの 8 章に登録してください。 以下のようにします。 <!--O <tscreen><verb> # cd /usr/src # gzip -dc .../sliplogin-2.1.1.tar.gz | tar xvf - # cd sliplogin-2.1.1 # <..edit the Makefile if you don't use shadow passwords..> # make install </verb></tscreen> --> <tscreen><verb> # cd /usr/src # gzip -dc .../sliplogin-2.1.1.tar.gz | tar xvf - # cd sliplogin-2.1.1 # < shadow パスワードを使わない場合は Makefile を編集してください > # make install </verb></tscreen> <!--O <p>If you want to recompile the binaries before installation, add a <tt/make clean/ before the <tt/make install/. If you want to install the binaries somewhere else, you will need to edit the <tt/Makefile/ <em/install/ rule. --> <p>インストール前に自分でプログラムを再コンパイルする場合、<tt>make install</tt> の前に <tt>make clean</tt> してください。どこか別のディレ クトリにインストールする場合は <tt>Makefile</tt> の <em>install</em> の指定を変更します。 <p> <!--O Please read the <tt/README/ files that come with the package for more information. --> 詳しくは、パッケージに付属の <tt>README</tt> ファイルをご覧ください。 <!-- .................................................................... --> <!--O <sect3><heading>Configuring <tt>/etc/passwd</tt> for Slip hosts. --> <sect3><heading>SLIP ホスト用の <tt>/etc/passwd </tt> <p> <!--O Normally you would create some special logins for Slip callers in your <tt>/etc/passwd</tt> file. A convention commonly followed is to use the <em/hostname/ of the calling host with a capital `S' prefixing it. So, for example, if the calling host is called <tt/radio/ then you could create a <tt>/etc/passwd</tt> entry that looked like: --> 通常、SLIP で接続してくる人向けに特別のエントリを <tt>/etc/passwd</tt> に用意する必要があります。よく行なわれているのは、接続してくるホスト名 の頭に大文字の `S' を付けて登録する方法です。今回紹介した例の場合、 <tt>radio</tt> 用には以下のような <tt>/etc/passwd</tt> エントリを追加 します: <tscreen><verb> Sradio:FvKurok73:1427:1:radio SLIP login:/tmp:/sbin/sliplogin </verb></tscreen> <!--O It doesn't really matter what the account is called, so long as it is meaningful to you. --> 実際にはアカウント名には特に意味が無いので、自分にとって分りやすい名前 を付けてかまいません。 <p> <!--O Note: the caller doesn't need any special home directory, as they will not be presented with a shell from this machine, so <tt>/tmp</tt> is a good choice. Also note that <em>sliplogin</em> is used in place of the normal login shell. --> 注意: 電話をかけてくる人はシェルを使うわけではないので、専用のホームディ レクトリを用意する必要はありません。<tt>/tmp</tt> あたりを指定しておけ ばいいでしょう。また、通常のログインシェルの代わりに <em>sliplogin</em> を指定していることに注意してください。 <!-- .................................................................... --> <!--O <sect3><heading>Configuring <tt>/etc/slip.hosts</tt> --> <sect3><heading><tt>/etc/slip.hosts</tt> の設定 <p> <!--O The <tt>/etc/slip.hosts</tt> file is the file that <em/sliplogin/ searches for entries matching the login name to obtain configuration details for this caller. It is this file where you specify the ip address and netmask that will be assigned to the caller and configured for their use. Sample entries for two hosts, one a static configuration for host <tt/radio/ and another, a dynamic configuration for user host <tt/albert/ might look like: --> <tt>/etc/slip.hosts</tt> ファイルは、<em>sliplogin</em> がチェックする ファイルで、電話をかけてくる人のログイン名と必要な設定を登録しておきま す。IP アドレスやネットマスクの設定をするのもこのファイルになります。 以下に示す例では 2 つのエントリがあり、<tt>radio</tt> には予め IP アドレスを割り当て、<tt>albert</tt> には動的に IP アドレスを割りあ てます。 <tscreen><verb> # Sradio 44.136.8.99 44.136.8.100 255.255.255.0 normal -1 Salbert 44.136.8.99 DYNAMIC 255.255.255.0 compressed 60 # </verb></tscreen> <!--O The <tt>/etc/slip.hosts</tt> file entries are: --> <tt>/etc/slip.hosts</tt> ファイルのエントリを以下に示します: <enum> <!--O <item>the login name of the caller. --> <item>電話をかけてきた人のログイン名 <!--O <item>ip address of the server machine, ie this machine. --> <item>サーバーマシン、すなわちこのマシンの IP アドレス <!--O <item>ip address that the caller will be assigned. If this field is coded <tt/DYNAMIC/ then an ip address will be allocated based on the information contained in your <tt>/etc/slip.tty</tt> file discussed later. <bf/Note:/ you must be using at least version 1.3 of sliplogin for this to work. --> <item>電話をかけてきたホストに割り当てる IP アドレス。この欄が <tt>DYNAMIC</tt> になっていれば、後述する <tt>/etc/slip.tty</tt> ファ イルにある情報に従って IP アドレスを割り当てます。<bf>注意: </bf>この 機能を使うには、最低でもバージョン 1.3 以上の sliplogin が必要です。 <!--O <item>the netmask assigned to the calling machine in dotted decimal notation eg 255.255.255.0 for a Class C network mask. --> <item>電話をかけてきたマシンに設定するネットマスクは、クラス C の場合 255.255.255.0 のように、ドットで区切った 10 進表記で指定します。 <!--O <item>the slip mode setting which allows you to enable/disable compression and slip other features. Allowable values here are "<tt/normal/" or "<tt/compressed/". --> <item>圧縮やその他の slip の機能を有効/無効にする slip モードの設定で す。指定できる値は "<tt/normal/" または "<tt/compressed/" です。 <!--O <item>a timeout parameter which specifies how long the line can remain idle (no datagrams received) before the line is automatically disconnected. A negative value disables this feature. --> <item>timeout パラメータで指定した時間以上データグラムのやりとりが無 い場合、自動的に接続を切ります。負の値を指定すれば timeout 機能は無効 になります。 <!--O <item>optional arguments. --> <item>省略可能な引数。 </enum> <!--O <p>Note: You can use either hostnames or IP addresses in dotted decimal notation for fields 2 and 3. If you use hostnames then those hosts must be resolvable, that is, your machine must be able to locate an ip address for those hostnames, otherwise the script will fail when it is called. You can test this by trying trying to telnet to the hostname, if you get the `<em/Trying nnn.nnn.nnn.../' message then your machine has been able to find an ip address for that name. If you get the message `<em/Unknown host/', then it has not. If not, either use ip addresses in dotted decimal notation, or fix up your name resolver configuration (See section <tt/Name Resolution/). --> 注意: 2 つめと 3 つめの欄には、ホスト名でもドット区切の 10 進表記の IP アドレスでも指定可能です。ホスト名を指定した場合、そのホスト名が IP ア ドレスに変換できなければなりません。変換できない場合、スクリプトは異 常終了します。あるホスト名が IP アドレスに変換できるかどうかを調べるに は、そのホスト名に対して telnet してみるのがいいでしょう。もし <em>Trying nnn.nnn.nnn...</em> というメッセージが出れば、そのマシンで は指定したホスト名を IP アドレスに変換できています。`<tt>Unknown host</tt>' というメッセージが出る場合は変換できていません。変換できな い場合はドット区切の 10 進表記を使うか、リゾルバの設定を修正しましょう (詳しくは <tt>名前の解決(Name resolution)</tt> の節を参照してください)。 <p> <!--O The most common slip modes are: --> slip でよく使うモードは以下の 2 つです: <descrip> <!--O <p><tag>normal</tag>to enable normal uncompressed SLIP. --> <tag>normal</tag>通常の非圧縮の SLIP <!--O <p><tag>compressed</tag>to enable van Jacobsen header compression (cSLIP) --> <tag>compressed</tag> van Jacobsen のヘッダ圧縮を可能にするモード(cSLIP) </descrip> <!--O Naturally these are mutually exclusive, you can use one or the other. For more information on the other options available, refer to the <em>man</em> pages. --> 通常これらは排他的なので、どちらか一方のみを指定します。その他指定可能 なオプションについては <em>man</em> ページを参照してください。 <!-- .................................................................... --> <!--O <sect3><heading>Configuring the <tt>/etc/slip.login</tt> file. --> <sect3><heading><tt>/etc/slip.login</tt> ファイルの設定 <p> <!--O After <em>sliplogin</em> has searched the <tt>/etc/slip.hosts</tt> and found a matching entry, it will attempt to execute the <tt>/etc/slip.login</tt> file to actually configure the SLIP interface with its ip address and netmask. --> <em>sliplogin</em> が <tt>/etc/slip.hosts</tt> ファイルを調べた結果、電話 をかけてきたマシン名が見つかれば、その IP アドレスとネットマスクを使っ て <tt>/etc/slip.login</tt> スクリプトを実行し、 SLIP インターフェ イスを実際に設定します。 <!--O The sample <tt>/etc/slip.login</tt> file supplied with the <em>sliplogin</em> package looks like this: --> <em>sliplogin</em> パッケージと共に配布されているサンプルの <tt>/etc/slip.login</tt> ファイルは以下のようになっています: <tscreen><verb> #!/bin/sh - # # @(#)slip.login 5.1 (Berkeley) 7/1/90 # # generic login file for a SLIP line. sliplogin invokes this with # the parameters: # $1 $2 $3 $4, $5, $6 ... # SLIPunit ttyspeed pid the arguments from the slip.host entry # /sbin/ifconfig $1 $5 pointopoint $6 mtu 1500 -trailers up /sbin/route add $6 arp -s $6 <hw_addr> pub exit 0 # </verb></tscreen> <!--O You will note that this script simply uses the <em>ifconfig</em> and <em>route</em> commands to configure the SLIP device with its ipaddress, remote ip address and netmask and creates a route for the remote address via the SLIP device. Just the same as you would if you were using the <em>slattach</em> command. --> お気づきのように、このスクリプトでは <em>ifconfig</em> と <em>route</em> を使って自分の IP アドレスと接続先の IP アドレス、ネッ トマスクを設定し、SLIP デバイスを使って接続先への経路を設定しているだ けです。必要な設定は <em>slattach</em> コマンドで設定することもできま す。 <p> <!--O Note also the use of <em>Proxy ARP</em> to ensure that other hosts on the same ethernet as the server machine will know how to reach the dial-in host. The <tt><hw_addr></tt> field should be the hardware address of the ethernet card in the machine. If your server machine isn't on an ethernet network then you can leave this line out completely. --> サーバマシンと同じイーサネット上にいるホストから、電話を経由して接続し てきているホストへ接続するために、<tt>arp</tt> コマンドで <em>代理 ARP(Proxy ARP)</em>を設定していることにも注意してください。 <tt><hw_addr></tt>欄は、このマシンのイーサネットカードのハードウェ アアドレスを指定します。イーサネットのネットワークに接続していないサー バの場合はこの行を指定する必要はありません。 <!-- .................................................................... --> <!--O <sect3><heading>Configuring the <tt>/etc/slip.logout</tt> file. --> <sect3><heading><tt>/etc/slip.logout</tt> ファイルの設定 <p> <!--O When the call drops out, you want to ensure that the serial device is restored to its normal state so that future callers will be able to login correctly. This is achieved with the use of the <tt>/etc/slip.logout</tt> file. It is quite simple in format and is called with the same argument as the <tt>/etc/slip.login</tt> file. --> 接続が切れた場合、シリアルデバイスを元の状態に戻して、再度電話を受け られるように設定しておきましょう。このために使うのが <tt>/etc/slip.logout</tt> ファイルです。このファイルの構造はごく単純で、 <tt>/etc/slip.login</tt> ファイルと同じ引数を取ります。 <tscreen><verb> #!/bin/sh - # # slip.logout # /sbin/ifconfig $1 down arp -d $6 exit 0 # </verb></tscreen> <!--O All it does is `down' the interface which will delete the manual route previously created. It also uses the <em>arp</em> command to delete any proxy arp put in place, again, you don't need the <em>arp</em> command in the script if your server machine does not have an ethernet port. --> このスクリプトがやっているのはインターフェイスを `down' させて、以前に 登録された経路を削除するだけです。同時に <em>arp</em> コマンドで設定し ていた代理 ARP も削除します。この作業もサーバマシンがイーサネットに接 続していない場合は必要ありません。 <!-- .................................................................... --> <!--O <sect3><heading>Configuring the <tt>/etc/slip.tty</tt> file. --> <sect3><heading><tt>/etc/slip.tty</tt> ファイル の設定 <p> <!--O If you are using dynamic ip address allocation (have any hosts configured with the <tt>DYNAMIC</tt> keyword in the <tt>/etc/slip.hosts</tt> file, then you must configure the <tt>/etc/slip.tty</tt> file to list what addresses are assigned to what port. You only need this file if you wish your server to dynamically allocate addresses to users. --> 動的に IP アドレスを割り当てる場合(すなわち <tt>/etc/slip.hosts</tt> に <tt>DYNAMIC</tt> というキーワードを指定したエントリを作った場合)、 割り当てるポート用の IP アドレスを登録するための <tt>/etc/slip.tty</tt> ファイルを設定しなければなりません。ただし、このファイルが必要になるの は、ユーザへのアドレス割り当てをサーバに動的に行わせる場合だけです。 <p> <!--O The file is a table that lists the <em>tty</em> devices that will support dial-in SLIP connections and the ip address that should be assigned to users who call in on that port. --> このファイルは SLIP 接続を受けつける <tt>tty</tt> デバイスのリストになっ ており、それぞれのポートに接続してきたユーザに割り当てる IP アドレスを 登録しておきます。 <!--O Its format is as follows: --> このファイルのフォーマットは以下のようになっています: <tscreen><verb> # slip.tty tty -> IP address mappings for dynamic SLIP # format: /dev/tty?? xxx.xxx.xxx.xxx # /dev/ttyS0 192.168.0.100 /dev/ttyS1 192.168.0.101 # </verb></tscreen> <p> <!--O What this table says is that callers that dial in on port <tt>/dev/ttyS0</tt> who have their remote address field in the <tt>/etc/slip.hosts</tt> file set to <tt>DYNAMIC</tt> will be assigned an address of <tt>192.168.0.100</tt>. --> この例では <tt>/dev/ttyS0</tt> に接続してきた <tt>/etc/slip.hosts</tt> ファイルのリモートアドレス欄に <tt>DYNAMIC</tt> と指定してあるホストに <tt>192.168.0.100</tt> の IP アドレスを割り当てます。 <p> <!--O In this way you need only allocate one address per port for all users who do not require an dedicated address for themselves. This helps you keep the number of addresses you need down to a minimum to avoid wastage. --> このように、固有のアドレスの不要なユーザにはポートごとに割り当てたアド レスを使うことが可能です。この機能を使えば必要な IP アドレスは少なくて 済みます。 <!-- ==================================================================== --> <!--O <sect2><heading>Slip Server using <em>dip</em>. --> <sect2><heading><em>dip</em> を使った SLIP サーバ <p> <!--O Let me start by saying that some of the information below came from the <em>dip</em> man pages, where how to run Linux as a SLIP server is briefly documented. Please also beware that the following has been based on the <em>dip337o-uri.tgz</em> package and probably will not apply to other versions of <em>dip</em>. --> 以下に説明する情報のいくつかは <em>dip</em> の man ページから引用 したことを最初に白状しておきます。この man ページでは Linux を SLIP サーバにする方法について簡単に紹介してあります。また、以下の記述は <em>dip337o-uri.tgz</em> パッケージ用のもので、その他のバージョンの <em>dip</em> には当てはまらないことも多いので御注意ください。 <!--O <em>dip</em> has an input mode of operation, where it automatically locates an entry for the user who invoked it and configures the serial line as a SLIP link according to information it finds in the <tt>/etc/diphosts</tt> file. This input mode of operation is activated by invoking <em>dip</em> as <em>diplogin</em>. This therefore is how you use <em>dip</em> as a SLIP server, by creating special accounts where <em>diplogin</em> is used as the login shell. --> <em>dip</em> には input モード動作があります。ここでは起動したユーザの エントリを用い、 <tt>/etc/diphosts</tt> ファイルの設定に従って 自動的にシリアル回線を SLIP 接続として設定します。このモードに入るには、 <em>dip</em> を <em>diplogin</em> という名前で起動します。この機能を使 えば <em>dip</em> を使って SLIP サーバを構築できます。この際には ログインシェルに <em>diplogin</em> を用いた特別なアカウントを用意します。 <!--O The first thing you will need to do is to make a symbolic link as follows: --> この方法を使う場合、まず以下のようにシンボリックリンクを設定します: <tscreen><verb> # ln -sf /usr/sbin/dip /usr/sbin/diplogin </verb></tscreen> <!--O You then need to add entries to both your <tt>/etc/passwd</tt> and your <tt>/etc/diphosts</tt> files. The entries you need to make are formatted as follows: --> 次に <tt>/etc/passwd</tt> と <tt>/etc/diphosts</tt> ファイルの双方に必 要なエントリを追加します。必要なエントリの形式を以下に示します: <!--O To configure Linux as a SLIP server with <em>dip</em>, you need to create some special SLIP accounts for users, where <em>dip</em> (in input mode) is used as the login shell. A suggested convention is that of having all SLIP accounts begin with a capital `S', eg `Sfredm'. --> <em>dip</em> を使って SLIP サーバを作る場合、<em>dip</em> を(input モー ドで)ログインシェルとして使うための特別の設定が必要になります。SLIP 用のアカウントには、大文字の `S' を頭に付けた `Sfredm' などを使うのが いいでしょう。 <!--O A sample <tt>/etc/passwd</tt> entry for a SLIP user looks like: --> SLIP ユーザ用の <tt>/etc/passwd</tt> ファイルのエントリの例は以下のよ うになります: <!--O <tscreen><verb> Sfredm:ij/SMxiTlGVCo:1004:10:Fred:/tmp:/usr/sbin/diplogin ^^ ^^ ^^ ^^ ^^ ^^ ^^ | | | | | | \__ diplogin as login shell | | | | | \_______ Home directory | | | | \____________ User Full Name | | | \_________________ User Group ID | | \_____________________ User ID | \_______________________________ Encrypted User Password \__________________________________________ Slip User Login Name </verb></tscreen> --> <tscreen><verb> Sfredm:ij/SMxiTlGVCo:1004:10:Fred:/tmp:/usr/sbin/diplogin ^^ ^^ ^^ ^^ ^^ ^^ ^^ | | | | | | \__ diplogin をログインシェルに | | | | | \_______ ホームディレクトリ | | | | \____________ ユーザ名 | | | \_________________ ユーザのグループ ID | | \_____________________ ユーザ ID | \_______________________________ 暗号化したパスワード \__________________________________________ SLIP を使うユーザ名 </verb></tscreen> <!--O <p>After the user logs in, the <em>login</em> program, if it finds and verifies the user ok, will execute the <em>diplogin</em> command. <em>dip</em>, when invoked as <em>diplogin</em> knows that it should automatically assume that it is being used a login shell. When it is started as <em>diplogin</em> the first thing it does is use the <em>getuid()</em> function call to get the userid of whoever has invoked it. It then searches the <tt>/etc/diphosts</tt> file for the first entry that matches either the userid or the name of the <em>tty</em> device that the call has come in on and configures itself appropriately. By judicious decision as to whether to give a user an entry in the <tt>diphosts</tt> file, or whether to let the user be given the default configuration you can build your server in such a way that you can have a mix of static and dynamically assigned address users. --> <p>ユーザがログインした後、<em>login</em> がユーザ名を確認し、 <em>diplogin</em> コマンドを実行します。<em>dip</em> は <em>diplogin</em> というコマンド名で起動されると、自動的に ログインシェルとして機能します。<em>diplogin</em> は、まず <em>getuid()</em> ファンクションコールを使って自分を起動したユーザの ユーザ ID を調べます。その後、<tt>/etc/diphosts</tt> ファイルの最初の エントリを見て、そのユーザ ID か接続があったデバイスの <em>tty</em> 名 を調べ、その設定に従って適切な設定を行います。<tt>diphosts</tt> に ユーザ名のエントリを作るか、サーバのデフォルトの設定を使って、ユーザご とに静的な IP アドレスの割り当てと動的な割り当てを混在させるような方法 を取るかは判断におまかせします。 <!--O <em>dip</em> will automatically add a `Proxy-ARP' entry if invoked in input mode, so you do not need to worry about manually adding such entries. --> <em>dip</em> コマンドは input モードで起動されれば、自動的に 「代理 ARP」のエントリを追加するので、<em>arp</em> コマンドを手動で実行 する必要はありません。 <!-- .................................................................... --> <!--O <sect3><heading>Configuring <tt>/etc/diphosts</tt> --> <sect3><heading><tt>/etc/diphosts</tt> の設定 <p> <!--O <tt>/etc/diphosts</tt> is used by <em>dip</em> to lookup preset configurations for remote hosts. These remote hosts might be users dialing into your linux machine, or they might be for machines that you dial into with your linux machine. --> <em>/etc/diphosts</em> は <em>dip</em> が用いるファイルで、 リモートホストの設定を前もってここに書いておきます。この ファイルに設定するリモートホストは電話をかけて接続してくる ユーザーのマシンの場合もあれば、あなたが Linux マシンを 用いて接続する先のホストの場合もあります。 <!--O The general format for <tt>/etc/diphosts</tt> is as follows: --> <tt>/etc/diphosts</tt> の一般的な書式は以下の通りです: <tscreen><verb> .. Suwalt::145.71.34.1:145.71.34.2:255.255.255.0:SLIP uwalt:CSLIP,1006 ttyS1::145.71.34.3:145.71.34.2:255.255.255.0:Dynamic ttyS1:CSLIP,296 .. </verb></tscreen> <!--O The fields are: --> 各欄の意味は以下の通りです: <enum> <!--O <item><tt>login name</tt>: as returned by getpwuid(getuid()) or tty name. --> <item><tt>ログイン名</tt>: は getpwuid(getuid()) で得られる名前か tty 名が使われます。 <!--O <item><tt>unused</tt>: compat. with passwd --> <item><tt>未使用</tt>: passwd との互換性のためのフィールドです。 <!--O <item><tt>Remote Address</tt>: IP address of the calling host, either numeric or by name --> <item><tt>リモートアドレス</tt>: 接続先のホストの IP アドレスを数字か名前で指定します。 <!--O <item><tt>Local Address</tt>: IP address of this machine, again numeric or by name --> <item><tt>ローカルアドレス</tt>: このマシンの IP アドレスです。これも名前か数字で指定します。 <!--O <item><tt>Netmask</tt>: in dotted decimal notation --> <item><tt>ネットマスクk</tt>: ドット区切りの 10 進表記で記述します。 <!--O <item><tt>Comment field</tt>: put whatever you want here. --> <item><tt>コメント欄</tt>: 何を書いても構いません。 <!--O <item><tt>protocol</tt>: Slip, CSlip etc. --> <item><tt>プロトコル</tt>: SLIP, CSLIP 等。 <!--O <item><tt>MTU</tt>: decimal number --> <item><tt>MTU</tt>: 10進表記 </enum> <!--O An example <tt>/etc/net/diphosts</tt> entry for a remote SLIP user might be: --> SLIP でアクセスしてくる人用の <tt>/etc/net/diphosts</tt> のエントリの 例は以下のようになります: <tscreen><verb> Sfredm::145.71.34.1:145.71.34.2:255.255.255.0:SLIP uwalt:SLIP,296 </verb></tscreen> <!--O which specifies a SLIP link with remote address of 145.71.34.1 and MTU of 296, or: --> この例では、リモートのアドレスが 145.71.34.1、MTU が 296 である SLIP 接続を指定しています。 <tscreen><verb> Sfredm::145.71.34.1:145.71.34.2:255.255.255.0:SLIP uwalt:CSLIP,1006 </verb></tscreen> <!--O which specifies a cSLIP-capable link with remote address 145.71.34.1 and MTU of 1006. --> また、この例ではリモートアドレスが 145.71.34.1、MTU が 1006 である cSLIP 対応接続を指定しています。 <p> <!--O Therefore, all users who you wish to be allowed a statically allocated dial-up IP access should have an entry in the <tt>/etc/diphosts</tt>. If you want users who call a particular port to have their details dynamically allocated then you must have an entry for the <tt>tty</tt> device and do not configure a user based entry. You should remember to configure at least one entry for each <tt>tty</tt> device that your dialup users use to ensure that a suitable configuration is available for them regardless of which modem they call in on. --> お分りのように、予め割り当てた IP アドレスを使って接続してくるユー ザ用には <tt>/etc/diphosts</tt> にエントリを設けておく必要があります。 また、特定のポートにアクセスしたユーザ全てに同じ IP アドレスを割り当て るような設定の場合は <tt>tty</tt> デバイスのエントリを用意して、ユーザ 名のエントリは作りません。少なくとも、どのモデムに当っても適切な設定が 行われるように、それぞれの <tt>tty</tt> デバイスごとの設定はしておくこ とをお忘れなく。 <p> <!--O When a user logs in they will receive a normal login and password prompt at which they should enter their SLIP-login userid and password. If these verify ok then the user will see no special messages and they should just change into SLIP mode at their end. The user should then be able to connect ok and be configured with the relevant parameters from the <tt>diphosts</tt> file. --> ユーザがログインしてくれば、通常のログイン名とパスワードの入力プロンプ トが表示されます。そのプロンプトに対して SLIP ログイン用のユーザ名とパ スワードを入力します。それらが正しければ特にメッセージは表示されず、自 動的に接続端を SLIP モードに変更します。すると、ユーザが接続可能になり、 <tt>diphosts</tt> ファイルの指定に従って設定されるようになるはずです。 <!-- ==================================================================== --> <!--O <sect2><heading>SLIP server using the <em>dSLIP</em> package. --> <sect2><heading><em>dSLIP</em> パッケージを使った SLIP サーバ <p> <!--O Matt Dillon <tt><dillon@apollo.west.oic.com></tt> has written a package that does not only dial-in but also dial-out SLIP. Matt's package is a combination of small programs and scripts that manage your connections for you. You will need to have <em>tcsh</em> installed as at least one of the scripts requires it. Matt supplies a binary copy of the <em>expect</em> utility as it too is needed by one of the scripts. You will most likely need some experience with <em>expect</em> to get this package working to your liking, but don't let that put you off. --> Matt Dillon <tt><dillon@apollo.west.oic.com></tt> は、 SLIP の着信 のみならず、発信にも使えるパッケージを作りました。彼のパッケージでは、小さ なプログラムとスクリプトが集まって必要な設定を行います。スクリプトの一 つは <em>tcsh</em> を使うので、このパッケージを使うには <em>tcsh</em> をインストールする必要があります。また Matt は、スクリプトの一つで 必要となる <em>expect</em> のバイナリパッケージも配布しています。このパッ ケージを使いこなすには <em>expect</em> を使った経験があるといいでしょうが、 だからといって後込みすることはありません。 <p> <!--O Matt has written a good set of installation instructions in the README file, so I won't bother repeating them. --> このパッケージには、Matt が書いた詳しい README ファイルが付属している ので、ここではそれを繰り返すことはしません。 <p> <!--O You can get the <em>dSLIP</em> package from its home site at: --> <em>dSLIP</em> パッケージは以下のサイトから入手できます。 <bf>apollo.west.oic.com</bf> <tscreen><verb> /pub/linux/dillon_src/dSLIP203.tgz </verb></tscreen> <!--O or from: --> あるいは、以下のサイトからも入手できます。 <bf>metalab.unc.edu</bf> <tscreen><verb> /pub/Linux/system/Network/serial/dSLIP203.tgz </verb></tscreen> <!--O Read the <tt>README</tt> file and create the <tt>/etc/passwd</tt> and <tt>/etc/group</tt> entries <bf>before</bf> doing a <tt>make install</tt>. --> <tt>make install</tt> する<bf>前に</bf> <tt>README</tt> ファイルを読ん で、適切な <tt>/etc/passwd</tt> と <tt>/etc/group</tt> エントリを作る ことをお忘れなく。 <!--######################################################################--> <!--O <sect><heading>Other Network Technologies --> <sect><heading>その他のネットワーク技術 <!--O <p>The following subsections are specific to particular network technologies. The information contained in these sections does not necessarily apply to any other type of network technology. The topics are sorted alphabetically. --> <p>以下の各節では特定のネットワーク技術を説明します。それぞれの節は独 立しているので、ある節を読むのに別の節の情報は特に必要ありません。話題 はアルファベット順に並べています。 <!-- ==================================================================== --> <sect1><heading>ARCNet <p> <!--O ARCNet device names are `<tt/arc0e/', `<tt/arc1e/', `<tt/arc2e/' etc. or `<tt/arc0s/', `<tt/arc1s/', `<tt/arc2s/' etc. The first card detected by the kernel is assigned `<tt/arc0e/' or `<tt/arc0s/' and the rest are assigned sequentially in the order they are detected. The letter at the end signifies whether you've selected ethernet encapsulation packet format or RFC1051 packet format. --> ARCNet のデバイス名は `<tt/arc0e/', `<tt/arc1e/', `<tt/arc2e/' あるいは `<tt>arc0s</tt>', `<tt>arc1e</tt>', <tt>arc2e</tt>' のようになります。 最初に検出されたカードが `<tt/arc0e/' または `<tt>arc0s</tt>' で、それ 以降は検出された順に番号が振られます。デバイス名の最後の s や e は パケットをイーサネットにカプセル化するか、 RFC1051 の形式にするかを示 します。 <!--O <p><bf/Kernel Compile Options/: --> <p><bf/カーネルのコンパイルオプション/: <tscreen><verb> Network device support ---> [*] Network device support <*> ARCnet support [ ] Enable arc0e (ARCnet "Ether-Encap" packet format) [ ] Enable arc0s (ARCnet RFC1051 packet format) </verb></tscreen> <p> <!--O Once you have your kernel properly built to support your ethernet card then configuration of the card is easy. --> ARCnet カードをサポートするようにカーネルを作成すれば、カードの設定は 簡単です。 <p> <!--O Typically you would use something like: --> 通常は以下のように設定します: <tscreen><verb> root# ifconfig arc0e 192.168.0.1 netmask 255.255.255.0 up root# route add -net 192.168.0.0 netmask 255.255.255.0 arc0e </verb></tscreen> <!--O Please refer to the <tt>/usr/src/linux/Documentation/networking/arcnet.txt</tt> and <tt>/usr/src/linux/Documentation/networking/arcnet-hardware.txt</tt> files for further information. --> 詳細については <tt>/usr/src/linux/Documentation/networking/arcnet.txt</tt> と <tt>/usr/src/linux/Documentation/networking/arcnet-hardware.txt</tt> をご覧ください。 <p> <!--O ARCNet support was developed by Avery Pennarun, <tt/apenwarr@foxnet.net/. --> ARCNet の機能は Avery Pennarrun <tt/apenwarr@foxnet.net/ が開発しまし た。 <!-- ==================================================================== --> <sect1><heading>Appletalk (<tt/AF_APPLETALK/) <p> <!--O The Appletalk support has no special device names as it uses existing network devices. --> Appletalk 機能は既存のネットワークデバイスを使うので特別のデバイス名は 不要です。 <!--O <p><bf/Kernel Compile Options/: --> <p><bf/カーネルのコンパイルオプション/: <tscreen><verb> Networking options ---> <*> Appletalk DDP </verb></tscreen> <!--O <p>Appletalk support allows your Linux machine to interwork with Apple networks. An important use for this is to share resources such as printers and disks between both your Linux and Apple computers. Additional software is required, this is called <em/netatalk/. Wesley Craig <tt/netatalk@umich.edu/ represents a team called the `Research Systems Unix Group' at the University of Michigan and they have produced the <em/netatalk/ package which provides software that implements the Appletalk protocol stack and some useful utilities. The <em/netatalk/ package will either have been supplied with your Linux distribution, or you will have to ftp it from its home site at the <htmlurl url="ftp://terminator.rs.itd.umich.edu/unix/netatalk/" name="University of Michigan"> --> <p>Appletalk 機能を使えば、Linux を Apple のネットワークと協働させ、プリ ンタやディスクといったリソースを Linux と Apple 製のコンピュータの間で 共有できます。この機能を使うには <tt>netatalk</tt> と呼ばれ るソフトが別途必要です。ミシガン大学で `Research System Unix Group' と いうチームを率いている Wesley Craig <tt/netatalk@umich.edu/ が、 Appletalk のプロトコルスタックとその他有益なプログラムをまとめた <em>netatalk</em> と呼ばれるプログラムを開発しました。 <em>netatalk</em> パッケージは Linux の配布パッケージに含まれているか もしれませんし、見つからなければ <url url="ftp://terminator.rs.itd.umich.edu/unix/netatalk/" name="ミシガン大学"> から FTP で入手できます。 <p> <!--O To build and install the package do something like: --> このパッケージをコンパイルしてインストールするには以下のようにします。 <tscreen><verb> user% tar xvfz .../netatalk-1.4b2.tar.Z user% make root# make install </verb></tscreen> <!--O <p>You may want to edit the `Makefile' before calling <em/make/ to actually compile the software. Specifically, you might want to change the DESTDIR variable which defines where the files will be installed later. The default of /usr/local/atalk is fairly safe. --> <p>実際に <em/make/ を実行してソフトウェアをコンパイルする前に、 `Makefile' を編集するとよいでしょう。特に、後でファイル群がインストール される先を定義する変数である DESTDIR は変更しておきましょう。 デフォルト値の /usr/local/atalk でも十分安全です。 <!-- ==================================================================== --> <!--O <sect2><heading>Configuring the Appletalk software. --> <sect2><heading>Appletalk 用ソフトウェアの設定 <p> <!--O The first thing you need to do to make it all work is to ensure that the appropriate entries in the <tt>/etc/services</tt> file are present. The entries you need are: --> Appletalk を動作させるためにまずしなければならないことは、 <tt>/etc/services</tt> に適切な設定があるかどうかを確かめることです。 必要なエントリは以下の通りです: <tscreen><verb> rtmp 1/ddp # Routing Table Maintenance Protocol nbp 2/ddp # Name Binding Protocol echo 4/ddp # AppleTalk Echo Protocol zip 6/ddp # Zone Information Protocol </verb></tscreen> <!--O <p>The next step is to create the Appletalk configuration files in the <tt>/usr/local/atalk/etc</tt> directory (or wherever you installed the package). --> <p>次に <tt>/usr/local/atalk/etc</tt> ディレクトリ(またはパッケージの インストール先のディレクトリ)に Appletalk の設定ファイルを作ります。 <p> <!--O The first file to create is the <tt>/usr/local/atalk/etc/atalkd.conf</tt> file. Initially this file needs only one line that gives the name of the network device that supports the network that your Apple machines are on: --> <p>最初に作成すべきファイルは <tt>/usr/local/atalk/etc/atalkd.conf</tt> です。このファイルには Apple のマシンのネットワークが接続している ネットワークデバイス名のみを登録しておきます。 <tscreen><verb> eth0 </verb></tscreen> <!--O <p>The Appletalk daemon program will add extra details after it is run. --> <p>Appletalk デーモンプログラムが実行されると、このファイルに設定情報 が追加されます。 <!-- ==================================================================== --> <!--O <sect2><heading>Exporting a Linux filesystems via Appletalk. --> <sect2><heading>Linux のファイルシステムを Appletalk 経由で提供する方法 <p> <!--O You can export filesystems from your linux machine to the network so that Apple machine on the network can share them. --> Linux マシンのファイルシステムを提供して、ネットワーク上の Apple のマシ ンから使えます。 <p> <!--O To do this you must configure the <tt>/usr/local/atalk/etc/AppleVolumes.system</tt> file. There is another configuration file called <tt>/usr/local/atalk/etc/AppleVolumes.default</tt> which has exactly the same format and describes which filesystems users connecting with guest privileges will receive. --> このためには <tt>/usr/local/atalk/etc/AppleVolumes.system</tt> ファイ ルを作成します。もう一つ、 <tt>/usr/local/atalk/etc/AppleVolumes.default</tt> というファイルもあ り、このファイルは <tt>AppleVolumes.system</tt> と全く同じ形式で、ゲストアカ ウントでも利用できるファイルシステムを設定します。 <p> <!--O Full details on how to configure these files and what the various options are can be found in the <em>afpd</em> man page. --> これらのファイルを設定する詳しい方法や各種のオプションについては <em>afpd</em> の man ページをご覧ください。 <p> <!--O A simple example might look like: --> 以下に簡単な例を示します: <tscreen><verb> /tmp Scratch /home/ftp/pub "Public Area" </verb></tscreen> <!--O <p>Which would export your <tt>/tmp</tt> filesystem as AppleShare Volume `Scratch' and your ftp public directory as AppleShare Volume `Public Area'. The volume names are not mandatory, the daemon will choose some for you, but it won't hurt to specify them anyway. --> <p>この例では <tt>/tmp</tt> ファイルシステムを `Scratch' という名で、 ftp の public ディレクトリを `Public Area' という名で、それぞれ AppleShare に提供しています。`Scratch' や `Public Area' といった ボリューム名は必須ではなく、指定しなければデーモンが自動的に命名してく れますが、付けておいても問題はありません。 <!-- ==================================================================== --> <!--O <sect2><heading>Sharing your Linux printer across Appletalk. --> <sect2><heading>AppleTalk 経由での Linux のプリンタの共有 <p> <!--O You can share your linux printer with your Apple machines quite simply. You need to run the <em>papd</em> program which is the Appletalk Printer Access Protocol Daemon. When you run this program it will accept requests from your Apple machines and spool the print job to your local line printer daemon for printing. --> Linux マシンに接続されたプリンタを Apple 製のマシンと共有するのも簡単 で、AppleTalk のプリンタ・アクセス・プロトコル・デーモン <em>papd</em> を使います。このプログラムは、Apple マシンからのプリントリクエストを受 けつけてスプールし、lpr デーモンに渡して Linux マシンのプリンタに出力 します。 <p> <!--O You need to edit the <tt>/usr/local/atalk/etc/papd.conf</tt> file to configure the daemon. The syntax of this file is the same as that of your usual <tt>/etc/printcap</tt> file. The name you give to the definition is registered with the Appletalk naming protocol, NBP. --> <em>papd</em> の設定には <tt>/usr/local/atalk/etc/papd.conf</tt> ファ イルを使います。このファイルの書式は <tt>/etc/printcap</tt> ファイルと 同じで、登録したプリンタ名が Appletalk の命名プロトコル NBP を使って Appletalk 上に設定されます。 <p> <!--O A sample configuration might look like: --> <tt>papd.conf</tt> の設定例を以下に示します: <tscreen><verb> TricWriter:\ :pr=lp:op=cg: </verb></tscreen> <!--O Which would make a printer named `TricWriter' available to your Appletalk network and all accepted jobs would be printed to the linux printer `<tt/lp/' (as defined in the <tt>/etc/printcap</tt> file) using <em>lpd</em>. The entry `<tt/op=cg/' says that the linux user `<tt/cg/' is the operator of the printer. --> この設定で `TricWriter' というプリンタ名が Appletalk 上に設定され、そ のプリンタに送られた出力は <em>lpd</em> を使って Linux の `<tt>lp</tt>' プリンタ(<tt>/etc/printcap</tt> ファイルで 設定されている <tt>lp</tt> プリンタです)に出力されます。 `<tt>op=cg</tt>' の指定は Linux マシンのユーザ `<tt>cg</tt>' がプリン タの使用者になることを意味します。 <!-- ==================================================================== --> <!--O <sect2><heading>Starting the appletalk software. --> <sect2><heading> appletalk ソフトウェアの起動 <p> <!--O Ok, you should now be ready to test this basic configuration. There is an <em>rc.atalk</em> file supplied with the <em>netatalk</em> package that should work ok for you, so all you should have to do is: --> さて以上で、この基本的な設定を試す準備ができました。<em>netatalk</em> パッ ケージには <em>rc.atalk</em> ファイルが含まれていますので、 <em>netatalk</em> を起動するには以下のようにします。 <tscreen><verb> root# /usr/local/atalk/etc/rc.atalk </verb></tscreen> <!--O <p>and all should startup and run ok. You should see no error messages and the software will send messages to the console indicating each stage as it starts. --> <p>これで必要なデーモン類が全て起動するはずです。エラーが出なければ、 ソフトウェアはコンソールにそれぞれの段階のメッセージを示していくはずで す。 <!-- ==================================================================== --> <!--O <sect2><heading>Testing the appletalk software. --> <sect2><heading>appletalk ソフトウェアのテスト <p> <!--O To test that the software is functioning properly, go to one of your Apple machines, pull down the Apple menu, select the Chooser, click on AppleShare, and your Linux box should appear. --> netatalk が正しく機能しているかを確認するには、Apple のマシンを使って、 アップルメニューから「セレクタ」を選び、AppleShare をクリックして Linux マシンが表示されるかどうかを確かめます。 <!-- ==================================================================== --> <!--O <sect2><heading>Caveats of the appletalk software. --> <sect2><heading>netatalk の注意点 <p> <itemize> <!--O <item>You may need to start the Appletalk support before you configure your IP network. If you have problems starting the Appletalk programs, or if after you start them you have trouble with your IP network, then try starting the Appletalk software before you run your <tt>/etc/rc.d/rc.inet1</tt> file. --> <item>場合によっては、IP ネットワークを設定する以前に Appletalk 機能を 起動しなければいけないかもしれません。netatalk が起動しなかったり、 netatalk が起動すると IP ネットワークにトラブルが生じたりする場合、 netatalk を <tt>/etc/rc.d/rc.inet1</tt> 以前に起動してください。 <!--O <item>The <em>afpd</em> (Apple Filing Protocol Daemon) severely messes up your hard disk. Below the mount points it creates a couple of directories called ``<tt>.AppleDesktop</tt>'' and <tt>Network Trash Folder</tt>. Then, for each directory you access it will create a <tt>.AppleDouble</tt> below it so it can store resource forks, etc. So think twice before exporting <tt>/</tt>, you will have a great time cleaning up afterwards. --> <item><em>afpd</em>(Apple Filing Protocol Daemon)は HDD をひどく散らか します。マウントポイントの下には、<tt>.AppleDesktop</tt> と <tt>Network Trash Folder</tt> というファイルが作られます。さらに、アク セスがあった全てのディレクトリにはリソースフォーク等を保存するための <tt>.AppleDouble</tt> が作られます。ですから、<tt>/</tt> を <em>afpd</em> で公開する前にはくれぐれもよく考えてください。さもないと 大変な時間をかけて後始末をする羽目になってしまいます。 <!--O <item>The <em>afpd</em> program expects clear text passwords from the Macs. Security could be a problem, so be very careful when you run this daemon on a machine connected to the Internet, you have yourself to blame if somebody nasty does something bad. --> <item><em>afpd</em>は Mac に対して平文のパスワードを求めます。これは セキュリティ的には問題なので、<em>afpd</em> をインターネット等の外部 ネットワークに接続したマシンで起動する際には十分注意してください。 さもないと、誰か悪い人に被害を与えられて後悔することになるかもしれません。 <!--O <item>The existing diagnostic tools such as <em>netstat</em> and <em>ifconfig</em> don't support Appletalk. The raw information is available in the <tt>/proc/net/</tt> directory if you need it. --> <item><em>netstat</em> や <em>ifconfig</em> といった既存のネットワーク 診断ツールは AppleTalk をサポートしていません。必要ならば <tt>/proc/net/</tt> 以下のディレクトリに用意されている情報を調べてくだ さい。 </itemize> <!-- ==================================================================== --> <!--O <sect2>More information --> <sect2>さらに詳しい情報について <p> <!--O For a much more detailed description of how to configure Appletalk for Linux refer to Anders Brownworth <em/Linux Netatalk-HOWTO/ page at <htmlurl url="http://thehamptons.com/anders/netatalk/" name="thehamptons.com">. --> Linux で AppleTalk を設定する方法のより詳しい説明については <url url="http://thehamptons.com/anders/netatalk/" name="thehamptons.com"> で公開されている Anders Brownworth の <em>Linux Netatalk-HOWTO</em> を参照してください。 <!-- FIXME: Why the Netatalk howto is not in LDP? --> <!-- ==================================================================== --> <sect1><heading>ATM <p> <!--O Werner Almesberger <tt><werner.almesberger@lrc.di.epfl.ch></tt> is managing a project to provide Asynchronous Transfer Mode support for Linux. Current information on the status of the project may be obtained from: <htmlurl url="http://lrcwww.epfl.ch/linux-atm/" name="lrcwww.epfl.ch">. --> Werner Almesberber <tt><werner.almesberger@lrc.di.epfl.ch></tt> は Linux で ATM(Asynchronous Transfer Mode)をサポートするための計画を 統括しています。この計画の現状は <url url="http://lrcwww.epfl.ch/linux-atm/" name="lrcwww.epfl.ch"> で見ることができます。 <!-- ==================================================================== --> <sect1><heading>AX25 (<tt/AF_AX25/) <p> <!--O AX.25 device names are `<tt/sl0/', `<tt/sl1/', etc. in <tt/2.0.*/ kernels or `<tt/ax0/', `<tt/ax1/', etc. in <tt/2.1.*/ kernels. --> AX.25 デバイスの名称は <tt>2.0.*</tt> カーネルでは `<tt>sl0</tt>' や `<tt>sl1</tt>' ですが、<tt>2.1.*</tt> カーネルでは `<tt>ax0</tt>' や `<tt>ax1</tt>' になっています。 <!--O <p><bf/Kernel Compile Options/: --> <p><bf/カーネルのコンパイルオプション/: <tscreen><verb> Networking options ---> [*] Amateur Radio AX.25 Level 2 </verb></tscreen> <!--O <p>The AX25, Netrom and Rose protocols are covered by the <htmlurl url="AX25-HOWTO.html" name="AX25-HOWTO">. These protocols are used by Amateur Radio Operators world wide in packet radio experimentation. --> <p>AX25 と Netrom, Rose プロトコルについては <url url="AX25-HOWTO.html" name="AX25-HOWTO"> に詳しく説明されています。これらのプロトコルはパケット通信の実験で世界 中のアマチュア無線のオペレータに使われています。 <p> <!--O Most of the work for implementation of these protocols has been done by Jonathon Naylor, <tt/jsn@cs.nott.ac.uk/. --> これらのプロトコルのほとんどは Jonathon Naylor <tt/jsn@cs.not.ac.uk/ が実装しました。 <!-- ==================================================================== --> <sect1><heading>DECNet <p> <!--O Support for DECNet is currently being worked on. You should expect it to appear in a late <tt/2.1.*/ kernel. --> DECNet のサポートも現在開発中です。将来の <tt>2.1.*</tt> シリーズで公 開されるはずです。 <!-- ==================================================================== --> <sect1><heading>FDDI <p> <!--O FDDI device names are `<tt/fddi0/', `<tt/fddi1/', `<tt/fddi2/' etc. The first card detected by the kernel is assigned `<tt/fddi0/' and the rest are assigned sequentially in the order they are detected. --> FDDI のデバイス名は `<tt>fddi0</tt>'、`<tt>fddi1</tt>'、 `<tt>fddi2</tt>' などになります。カーネルが検出した最初のカードが `<tt>fddi0</tt>' で、その後は検出した順に番号が振られていきます。 <p> <!--O Larry Stefani, <tt/lstefani@ultranet.com/, has developed a driver for the Digital Equipment Corporation FDDI EISA and PCI cards. --> Larry Stefani <tt/lstefani@ultranet.com/ が DEC 製の EISA バスと PCI バスの FDDI カード用のドライバを開発しました。 <!--O <p><bf/Kernel Compile Options/: --> <p><bf/カーネルのコンパイルオプション/: <tscreen><verb> Network device support ---> [*] FDDI driver support [*] Digital DEFEA and DEFPA adapter support </verb></tscreen> <!--O <p>When you have your kernel built to support the FDDI driver and installed, configuration of the FDDI interface is almost identical to that of an ethernet interface. You just specify the appropriate FDDI interface name in the <em/ifconfig/ and <em/route/ commands. --> <p>FDDI ドライバを組み込んだカーネルを構築すれば、FDDI インターフェイス の設定はイーサネットインターフェイスの設定とほぼ同じです。適切な FDDI インターフェイスの名称を指定して <em>ifconfig</em> と <em>route</em> コマンドで設定します。 <!-- ==================================================================== --> <!--O <sect1><heading>Frame Relay --> <sect1><heading>フレームリレー <p> <!--O The Frame Relay device names are `<tt/dlci00/', `<tt/dlci01/' etc for the DLCI encapsulation devices and `<tt/sdla0/', `<tt/sdla1/' etc for the FRAD(s). --> フレームリレーのデバイス名のうち、DLCI にカプセル化するデバイス名は `<tt>dlci00</tt>', `<tt>dlci01</tt>' 等になり、FRAD のデバイス名は `<tt>sdla0</tt>', `<tt>sdla1</tt> 等になります。 <p> <!--O Frame Relay is a new networking technology that is designed to suit data communications traffic that is of a `bursty' or intermittent nature. You connect to a Frame Relay network using a Frame Relay Access Device (FRAD). The Linux Frame Relay supports IP over Frame Relay as described in RFC-1490. --> フレームリレーは新しいネットワーク技術で、「突発的」に膨大なデータ転送 が起こるような種類の通信向けに設計されています。フレームリレーネッ トワークに接続するにはフレームリレー・アクセス・デバイス(FRAD : Frame Relay Access Device)を使います。Linux では RFC-1490 に定義されている、 フレームリレー上に IP 接続を乗せる機能がサポートされています。 <!--O <p><bf/Kernel Compile Options/: --> <p><bf/カーネルのコンパイルオプション/: <tscreen><verb> Network device support ---> <*> Frame relay DLCI support (EXPERIMENTAL) (24) Max open DLCI (8) Max DLCI per device <*> SDLA (Sangoma S502/S508) support </verb></tscreen> <p> <!--O Mike McLagan, <tt/mike.mclagan@linux.org/, developed the Frame Relay support and configuration tools. --> フレームリレー対応と設定用ツールは Mike McLagan <tt/mike.mclagan@linux.org/ が開発しました。 <p> <!--O Currently the only FRAD supported are the <htmlurl url="http://www.sangoma.com/" name="Sangoma Technologies"> <tt/S502A/, <tt/S502E/ and <tt/S508/. --> 現在サポートされている FRAD は <url url="http://www.sangoma.com/" name="Sangoma Technologies"> 製の <tt/S502A/, <tt/S502E/, <tt/S508/ だけです。 <p> <!--O To configure the FRAD and DLCI devices after you have rebuilt your kernel you will need the Frame Relay configuration tools. These are available from <htmlurl url="ftp://ftp.invlogic.com/pub/linux/fr/frad-0.15.tgz" name="ftp.invlogic.com">. Compiling and installing the tools is straightforward, but the lack of a top level Makefile makes it a fairly manual process: --> カーネルに必要な機能を組み込んで再構築した後、 FRAD と DLCI デバイスを設定 するには、フレームリレー設定用プログラムが必要になります。これらは <url url="ftp://ftp.invlogic.com/pub/linux/fr/frad-0.15.tgz" name="ftp.invlogic.com"> から入手できます。このプログラムをコンパイルしてインストールするのは簡 単ですが、大元の Makefile が無いために手動でやる作業がかなりあります。 <tscreen><verb> user% tar xvfz .../frad-0.15.tgz user% cd frad-0.15 user% for i in common dlci frad; make -C $i clean; make -C $i; done root# mkdir /etc/frad root# install -m 644 -o root -g root bin/*.sfm /etc/frad root# install -m 700 -o root -g root frad/fradcfg /sbin rppt# install -m 700 -o root -g root dlci/dlcicfg /sbin </verb></tscreen> <!--O <p>Note that the previous commands use <em/sh/ syntax, if you use a <em/csh/ flavour instead (like <em/tcsh/), the <em/for/ loop will look different. --> <p>上記のコマンドは <em/sh/ の記法を使っているので注意してください。 <em/sh/ 系でなく <em/csh/ 系のシェル(<em/tcsh/ 等)を使っている場合は、 <em/for/ ループの書き方が異なります。 <!--O <p>After installing the tools you need to create an <tt>/etc/frad/router.conf</tt> file. You can use this template, which is a modified version of one of the example files: --> <p>必要なファイルをインストールした後、<tt>/etc/frad/router.conf</tt> ファイルを作る必要があります。以下に、例として付いてきたファイルを多少 修正したものを雛型として紹介します。 <tscreen><verb> # /etc/frad/router.conf # This is a template configuration for frame relay. # All tags are included. The default values are based on the code # supplied with the DOS drivers for the Sangoma S502A card. # # A '#' anywhere in a line constitutes a comment # Blanks are ignored (you can indent with tabs too) # Unknown [] entries and unknown keys are ignored # [Devices] Count=1 # number of devices to configure Dev_1=sdla0 # the name of a device #Dev_2=sdla1 # the name of a device # Specified here, these are applied to all devices and can be overridden for # each individual board. # Access=CPE Clock=Internal KBaud=64 Flags=TX # # MTU=1500 # Maximum transmit IFrame length, default is 4096 # T391=10 # T391 value 5 - 30, default is 10 # T392=15 # T392 value 5 - 30, default is 15 # N391=6 # N391 value 1 - 255, default is 6 # N392=3 # N392 value 1 - 10, default is 3 # N393=4 # N393 value 1 - 10, default is 4 # Specified here, these set the defaults for all boards # CIRfwd=16 # CIR forward 1 - 64 # Bc_fwd=16 # Bc forward 1 - 512 # Be_fwd=0 # Be forward 0 - 511 # CIRbak=16 # CIR backward 1 - 64 # Bc_bak=16 # Bc backward 1 - 512 # Be_bak=0 # Be backward 0 - 511 # # # Device specific configuration # # # # The first device is a Sangoma S502E # [sdla0] Type=Sangoma # Type of the device to configure, currently only # SANGOMA is recognized # # These keys are specific to the 'Sangoma' type # # The type of Sangoma board - S502A, S502E, S508 Board=S502E # # The name of the test firmware for the Sangoma board # Testware=/usr/src/frad-0.10/bin/sdla_tst.502 # # The name of the FR firmware # Firmware=/usr/src/frad-0.10/bin/frm_rel.502 # Port=360 # Port for this particular card Mem=C8 # Address of memory window, A0-EE, depending on card IRQ=5 # IRQ number, do not supply for S502A DLCIs=1 # Number of DLCI's attached to this device DLCI_1=16 # DLCI #1's number, 16 - 991 # DLCI_2=17 # DLCI_3=18 # DLCI_4=19 # DLCI_5=20 # # Specified here, these apply to this device only, # and override defaults from above # # Access=CPE # CPE or NODE, default is CPE # Flags=TXIgnore,RXIgnore,BufferFrames,DropAborted,Stats,MCI,AutoDLCI # Clock=Internal # External or Internal, default is Internal # Baud=128 # Specified baud rate of attached CSU/DSU # MTU=2048 # Maximum transmit IFrame length, default is 4096 # T391=10 # T391 value 5 - 30, default is 10 # T392=15 # T392 value 5 - 30, default is 15 # N391=6 # N391 value 1 - 255, default is 6 # N392=3 # N392 value 1 - 10, default is 3 # N393=4 # N393 value 1 - 10, default is 4 # # The second device is some other card # # [sdla1] # Type=FancyCard # Type of the device to configure. # Board= # Type of Sangoma board # Key=Value # values specific to this type of device # # DLCI Default configuration parameters # These may be overridden in the DLCI specific configurations # CIRfwd=64 # CIR forward 1 - 64 # Bc_fwd=16 # Bc forward 1 - 512 # Be_fwd=0 # Be forward 0 - 511 # CIRbak=16 # CIR backward 1 - 64 # Bc_bak=16 # Bc backward 1 - 512 # Be_bak=0 # Be backward 0 - 511 # # DLCI Configuration # These are all optional. The naming convention is # [DLCI_D<devicenum>_<DLCI_Num>] # [DLCI_D1_16] # IP= # Net= # Mask= # Flags defined by Sangoma: TXIgnore,RXIgnore,BufferFrames # DLCIFlags=TXIgnore,RXIgnore,BufferFrames # CIRfwd=64 # Bc_fwd=512 # Be_fwd=0 # CIRbak=64 # Bc_bak=512 # Be_bak=0 [DLCI_D2_16] # IP= # Net= # Mask= # Flags defined by Sangoma: TXIgnore,RXIgnore,BufferFrames # DLCIFlags=TXIgnore,RXIgnore,BufferFrames # CIRfwd=16 # Bc_fwd=16 # Be_fwd=0 # CIRbak=16 # Bc_bak=16 # Be_bak=0 </verb></tscreen> <!--O <p>When you've built your <tt>/etc/frad/router.conf</tt> file the only step remaining is to configure the actual devices themselves. This is only a little trickier than a normal network device configuration, you need to remember to bring up the FRAD device before the DLCI encapsulation devices. These commands are best hosted in a shell script, due to their number: --> <p><tt>/etc/frad/router.conf</tt> ファイルが設定できれば、残る作業は実 際のデバイスを設定するだけです。これは通常のネットワークデバイスの設定 よりも少し複雑なだけですが、DLCI カプセル化デバイス以前に FRAD デバイ スを設定することをお忘れなく。これらのコマンドは数が多いので、 シェルスクリプトにしておくのがよいでしょう: <tscreen><verb> #!/bin/sh # Configure the frad hardware and the DLCI parameters /sbin/fradcfg /etc/frad/router.conf || exit 1 /sbin/dlcicfg file /etc/frad/router.conf # # Bring up the FRAD device ifconfig sdla0 up # # Configure the DLCI encapsulation interfaces and routing ifconfig dlci00 192.168.10.1 pointopoint 192.168.10.2 up route add -net 192.168.10.0 netmask 255.255.255.0 dlci00 # ifconfig dlci01 192.168.11.1 pointopoint 192.168.11.2 up route add -net 192.168.11.0 netmask 255.255.255.0 dlci00 # route add default dev dlci00 # </verb></tscreen> <!-- ==================================================================== --> <sect1><heading>IPX (<tt/AF_IPX/) <p> <!--O The IPX protocol is most commonly utilized in Novell NetWare(tm) local area network environments. Linux includes support for this protocol and may be configured to act as a network endpoint, or as a router for IPX. --> IPX プロトコルは Novell の NetWare(tm) LAN 環境で広く使われているプロ トコルです。Linux はこのプロトコルもサポートしており、ネットワークの端 末としても、IPX のルータとしても機能します。 <!--O <p><bf/Kernel Compile Options/: --> <p><bf/カーネルのコンパイルオプション/: <tscreen><verb> Networking options ---> [*] The IPX protocol [ ] Full internal IPX network </verb></tscreen> <!--O <p>The IPX protocol and the NCPFS are covered in greater depth in the <htmlurl url="IPX-HOWTO.html" name="IPX-HOWTO">. --> IPX プロトコルと NCPFS については <url url="IPX-HOWTO.html" name="IPX-HOWTO"> で詳しく説明されています。 <!-- ==================================================================== --> <sect1><heading>NetRom (<tt/AF_NETROM/) <p> <!--O NetRom device names are `<tt/nr0/', `<tt/nr1/', etc. --> NetRom のデバイス名は `<tt>nr0</tt>', `<tt>nr1</tt>' になります。 <!--O <p><bf/Kernel Compile Options/: --> <p><bf/カーネルのコンパイルオプション/: <tscreen><verb> Networking options ---> [*] Amateur Radio AX.25 Level 2 [*] Amateur Radio NET/ROM </verb></tscreen> <!--O <p>The AX25, Netrom and Rose protocols are covered by the <htmlurl url="AX25-HOWTO.html" name="AX25-HOWTO">. These protocols are used by Amateur Radio Operators world wide in packet radio experimentation. --> <p>AX25 と Netrom, Rose プロトコルについては <url url="AX25-HOWTO.html" name="AX25-HOWTO"> に詳しく説明されています。これらのプロトコルはパケット通信の実験で世界 中のアマチュア無線のオペレータに使われています。 <p> <!--O Most of the work for implementation of these protocols has been done by Jonathon Naylor, <tt/jsn@cs.nott.ac.uk/. --> これらのプロトコルのほとんどは Jonathon Naylor <tt/jsn@cs.not.ac.uk/ が実装しました。 <!-- ==================================================================== --> <!--O <sect1><heading>Rose protocol (<tt/AF_ROSE/) --> <sect1><heading>Rose プロトコル (AF_ROSE) <p> <!--O Rose device names are `<tt/rs0/', `<tt/rs1/', etc. in <tt/2.1.*/ kernels. Rose is available in the <tt/2.1.*/ kernels. --> <tt>2.1.*</tt> カーネルでは、Rose デバイスの名前は `<tt>rs0</tt>', <tt>rs1</tt>' などのようになります。Rose デバイスは <tt>2.1.*</tt> カー ネルでないと使えません。 <!--O <p><bf/Kernel Compile Options/: --> <p><bf/カーネルのコンパイルオプション/: <tscreen><verb> Networking options ---> [*] Amateur Radio AX.25 Level 2 <*> Amateur Radio X.25 PLP (Rose) </verb></tscreen> <!--O <p>The AX25, Netrom and Rose protocols are covered by the <htmlurl url="AX25-HOWTO.html" name="AX25-HOWTO">. These protocols are used by Amateur Radio Operators world wide in packet radio experimentation. --> <p>AX25, Netrom, Rose の各プロトコルについては <url url="AX25-HOWTO.html" name="AX25-HOWTO"> に詳しく説明されています。これらのプロトコルはパケット通信の実験で世界 中のアマチュア無線のオペレータに使われています。 <p> <!--O Most of the work for implementation of these protocols has been done by Jonathon Naylor, <tt/jsn@cs.nott.ac.uk/. --> これらのプロトコルのほとんどは Jonathon Naylor <tt/jsn@cs.not.ac.uk/ が実装しました。 <!-- ==================================================================== --> <!--O <sect1><heading>SAMBA - `NetBEUI', `NetBios', `CIFS' support. --> <sect1><heading>SAMBA - `NetBEUI', `NetBios', `CIFS' のサポート <p> <!--O SAMBA is an implementation of the Session Management Block protocol. Samba allows Microsoft and other systems to mount and use your disks and printers. --> SAMBA は Session Menagement Block プロトコルを実装したものです。Samba を使えば、Microsoft やその他のシステムから Linux のディスクをマウント したり、プリンタを使うことが可能になります。 <p> <!--O SAMBA and its configuration are covered in detail in the <htmlurl url="SMB-HOWTO.html" name="SMB-HOWTO">. --> SAMBA とその設定方法は <url url="SMB-HOWTO.html" name="SMB-HOWTO"> で詳しく解説されています。 <!-- ==================================================================== --> <!--O <sect1><heading>STRIP support (Starmode Radio IP) --> <sect1><heading>STRIP (Starmode Radio IP) 機能 <p> <!--O STRIP device names are `<tt/st0/', `<tt/st1/', etc. --> STRIP のデバイス名は `<tt>st0</tt>', `<tt>st1</tt>' になります。 <!--O <p><bf/Kernel Compile Options/: --> <p><bf/カーネルのコンパイルオプション/: <tscreen><verb> Network device support ---> [*] Network device support .... [*] Radio network interfaces < > STRIP (Metricom starmode radio IP) </verb></tscreen> <!--O <p>STRIP is a protocol designed specifically for a range of Metricom radio modems for a research project being conducted by Stanford University called the <htmlurl url="http://mosquitonet.Stanford.EDU/mosquitonet.html" name="MosquitoNet Project">. There is a lot of interesting reading here, even if you aren't directly interested in the project. --> STRIP プロトコルはスタンフォード大学の <url url="http://mosquitonet.Stanford.EDU/mosquitonet.html" name="MosquitoNet Project"> と呼ばれる研究プロジェクトが開発した、 Metricom 社の無線モデム用の プロトコルです。 <p> <!--O The Metricom radios connect to a serial port, employ spread spectrum technology and are typically capable of about 100kbps. Information on the Metricom radios is available from the: <htmlurl url="http://www.metricom.com/" name="Metricom Web Server">. --> Metricom 社の無線装置は、シリアルポートに接続し、スペクトル拡散法を使っ て 100Kbps での通信を可能にしています。Metricom の無線装置についての情 報については <url url="http://www.metricom.com/" name="Metricom Web Server"> をご覧ください。 <p> <!--O At present the standard network tools and utilities do not support the STRIP driver, so you will have to download some customized tools from the MosquitoNet web server. Details on what software you need is available at the: <htmlurl url="http://mosquitonet.Stanford.EDU/strip.html" name="MosquitoNet STRIP Page">. --> 現在のところ、標準のネットワークツールやユーティリティは STRIP ドライ バをサポートしていないので、MosquitoNet の WWW サーバから必要な改造版 のツールをダウンロードする必要があります。どのソフトウェアが必要かにつ いては <url url="http://mosquitonet.Stanford.EDU/strip.html" name="MosquitoNet STRIP Page"> を見てください。 <p> <!--O A summary of configuration is that you use a modified <em/slattach/ program to set the line discipline of a serial tty device to STRIP and then configure the resulting `<tt/st[0-9]/' device as you would for ethernet with one important exception, for technical reasons STRIP does not support the ARP protocol, so you must manually configure the ARP entries for each of the hosts on your subnet. This shouldn't prove too onerous. --> 設定方法を簡単に述べると、改造された <em>slattach</em> プログラムを使っ てシリアルの tty デバイスを STRIP 用に設定して、`<tt>st[0-9]</tt>' デ バイスをイーサネットのように設定します。ただし一つ重要な違いがあります。 これは STRIP では ARP プロトコルを技術的な理由から サポートして いないことで、サブネットのホストごとに ARP エントリを手動で設定してや る必要があります。でもこれはそれほど大変な仕事でないことが分るでしょう。 <!-- ==================================================================== --> <!--O <sect1><heading>Token Ring --> <sect1><heading>トークンリング <p> <!--O Token ring device names are `<tt/tr0/', `<tt/tr1/' etc. Token Ring is an IBM standard LAN protocol that avoids collisions by providing a mechanism that allows only one station on the LAN the right to transmit at a time. A `token' is held by one station at a time and the station holding the token is the only station allowed to transmit. When it has transmitted its data it passes the token onto the next station. The token loops amongst all active stations, hence the name `Token Ring'. --> トークンリングのデバイス名は `<tt>tr0</tt>' や `<tt>tr1</tt>' のように なります。トークンリングは IBM の提案した LAN プロトコルで、同時に 1つ の LAN 上のノードしかデータの転送をしないようにして、通信のコリジョン (衝突)を防ぐようになっています。このために使われるのが「トークン」で、 この「トークン」がそれぞれのノードを順に回り、「トークン」を持ったノード のみがデータを送ることができます。データを送り終ればトークンを次のノード に送ります。このように、トークンが全てのノードを順に巡るので 「トークンリング」という名前になっています。 <!--O <p><bf/Kernel Compile Options/: --> <p><bf/カーネルのコンパイルオプション/: <tscreen><verb> Network device support ---> [*] Network device support .... [*] Token Ring driver support < > IBM Tropic chipset based adaptor support </verb></tscreen> <!--O Configuration of token ring is identical to that of ethernet with the exception of the network device name to configure. --> トークンリングの設定はネットワークデバイスの名称が異なるだけで イーサネットの場合と同じです。 <!-- ==================================================================== --> <sect1><heading>X.25 <p> <!--O X.25 is a circuit based packet switching protocol defined by the <tt/C.C.I.T.T./ (a standards body recognized by Telecommunications companies in most parts of the world). An implementation of X.25 and LAPB are being worked on and recent <tt/2.1.*/ kernels include the work in progress. --> X.25 は回路ベースのパケットスイッチングプロトコルで、<tt>C.C.I.T.T.</tt> (世界中の ほとんどの地域のテレコミュニケーション会社の標準規格を作る団体)が定義 しています。X.25 と LAPB プロトコルの実装は現在進行中で、最新の <tt>2.1.*</tt> カーネルに進行中の作業が組み込まれています。 <p> <!--O Jonathon Naylor <tt>jsn@cs.nott.ac.uk</tt> is leading the development and a mailing list has been established to discuss Linux X.25 related matters. To subscribe send a message to: <tt/majordomo@vger.rutgers.edu/ with the text "<tt/subscribe linux-x25/" in the body of the message. --> Linux における X.25 の実装については Jonathon Naylor <tt>jsn@cs.nott.ac.uk</tt> が開発のリーダーになっており、専用の メーリングリストもあります。メーリングリストに参加するには、 本文に "<tt/subscribe linux-x25/" とだけ書いたメールを <tt/majordomo@vger.rutgers.edu/ 宛に送ってください。 <p> <!--O Early versions of the configuration tools may be obtained from Jonathon's ftp site at <htmlurl url="ftp://ftp.cs.nott.ac.uk/jsn/" name="ftp.cs.nott.ac.uk">. --> 設定用ツールも初期バージョンが Jonathon の ftp サイト <url url="ftp://ftp.cs.nott.ac.uk/jsn/" name="ftp.cs.nott.ac.uk"> から入手できます。 <!-- ==================================================================== --> <!--O <sect1><heading>WaveLan Card --> <sect1><heading>WaveLan カード <p> <!--O Wavelan device names are `<tt/eth0/', `<tt/eth1/', etc. --> Wavelan のデバイス名は `<tt>eth0</tt>', `<tt>eth1</tt>' のようになりま す。 <p> <!--O <bf/Kernel Compile Options/: --> <bf/カーネルのコンパイルオプション/: <tscreen><verb> Network device support ---> [*] Network device support .... [*] Radio network interfaces .... <*> WaveLAN support </verb></tscreen> <!--O The WaveLAN card is a spread spectrum wireless lan card. The card looks very like an ethernet card in practice and is configured in much the same way. --> WaveLAN カードはスペクトラム拡散法(spread spectrum)を使った無線 LAN カー ドで、カードそのものはイーサネットと同じように扱え、イーサネットカード と同じ方法で設定できます。 <p> <!--O You can get information on the Wavelan card from <htmlurl url="http://www.wavelan.com/" name="Wavelan.com">. --> WaveLAN カードについての情報は <url url="http://www.wavelan.com/" name="Wavelan.com"> から入手できます。 <!--######################################################################--> <!--O <sect><heading>Cables and Cabling --> <sect><heading>ケーブルと接続方法 <p> <!--O Those of you handy with a soldering iron may want to build your own cables to interconnect two linux machines. The following cabling diagrams should assist you in this. --> ハンダごてを握ったことがある人ならば、2 台の Linux マシンを接続するた めのケーブルも簡単に自作できます。以下に示す結線図が参考になるでしょう。 <!-- ==================================================================== --> <!--O <sect1><heading>Serial NULL Modem cable --> <sect1><heading>シリアル用クロスケーブル <p> <!--O Not all NULL modem cables are alike. Many null modem cables do little more than trick your computer into thinking all the appropriate signals are present and swap transmit and receive data. This is ok but means that you must use software flow control (XON/XOFF) which is less efficient than hardware flow control. The following cable provides the best possible signalling between machines and allows you to use hardware (RTS/CTS) flow control. --> 全てのクロスケーブルが同じわけではありません。多くのクロスケーブルは、 適切な信号が来ているとコンピュータに思わせて、送信と受信のデータを入れ 替えるような細工をしています。この種のケーブルでも動作しますが、 この場合はハードウェアフロー制御よりも効率が悪い(XON/XOFF を使った) ソフトウェアフロー制御を使わなければいけません。以下に示す配線なら 2 台のマシンの間で最適な信号のやりとりができ、ハードウェア(RTS/CTS を使っ た)フロー制御も可能です。 <!--O <tscreen><verb> Pin Name Pin Pin --> <tscreen><verb> ピン名称 ピン ピン Tx Data 2 ----------------------------- 3 Rx Data 3 ----------------------------- 2 RTS 4 ----------------------------- 5 CTS 5 ----------------------------- 4 Ground 7 ----------------------------- 7 DTR 20 -\--------------------------- 8 DSR 6 -/ RLSD/DCD 8 ---------------------------/- 20 \- 6 </verb></tscreen> <!-- ==================================================================== --> <!--O <sect1><heading>Parallel port cable (PLIP cable) --> <sect1><heading>パラレルポート用ケーブル(PLIP ケーブル) <p> <!--O If you intend to use the PLIP protocol between two machines then this cable will work for you irrespective of what sort of parallel ports you have installed. --> PLIP プロトコルを使って 2 台のマシンを接続する場合、以下に示すケーブル を使えば、どんな種類のパラレルポートでも接続できます。 <!--O <tscreen><verb> Pin Name pin pin --> <tscreen><verb> ピン名称 ピン ピン STROBE 1* D0->ERROR 2 ----------- 15 D1->SLCT 3 ----------- 13 D2->PAPOUT 4 ----------- 12 D3->ACK 5 ----------- 10 D4->BUSY 6 ----------- 11 D5 7* D6 8* D7 9* ACK->D3 10 ----------- 5 BUSY->D4 11 ----------- 6 PAPOUT->D2 12 ----------- 4 SLCT->D1 13 ----------- 3 FEED 14* ERROR->D0 15 ----------- 2 INIT 16* SLCTIN 17* GROUND 25 ----------- 25 </verb></tscreen> <!--O Notes: --> 注意: <itemize> <!--O <item>Do not connect the pins marked with an asterisk `*'. --> <item>アスタリスク(*)が記されているピンは接続しないこと。 <!--O <item>Extra grounds are 18,19,20,21,22,23 and 24. --> <item>18,19,20,21,22,23,24 はアースです。 <!--O <item>If the cable you are using has a metallic shield, it should be connected to the metallic DB-25 shell at <bf/one end only/. --> <item>お使いのケーブルが金属シールドされている場合、シールドは DB-25 コネクタと<bf>一端でのみ</bf>接続してください。 </itemize> <!--O <bf>Warning: A miswired PLIP cable can destroy your controller card.</bf> Be very careful and double check every connection to ensure you don't cause yourself any unnecessary work or heartache. --> <bf>警告: 配線を間違えた PLIP ケーブルを使うとコントロールカードが破壊 されるかもしれません。</bf> 全ての配線をダブルチェックして、将来の不要 な手間や頭痛のタネが無くなるように、十分注意して配線してください。 <p> <!--O While you may be able to run PLIP cables for long distances, you should avoid it if you can. The specifications for the cable allow for a cable length of about 1 metre or so. Please be very careful when running long plip cables as sources of strong electromagnetic fields such as lightning, power lines and radio transmitters can interfere with and sometimes even damage your controller. If you really want to connect two of your computers over a large distance you really should be looking at obtaining a pair of thin-net ethernet cards and running some coaxial cable. --> 長い PLIP ケーブルでも使えるかもしれませんが、これはできるだけ避けるべ きです。仕様で許されているケーブルの長さは 1 メートル程度です。 長い PLIP ケーブルを使う時には特に注意してください。というのも、雷や電 線、無線の発信器のような強力な電磁波の発生源がコントローラと干渉し、こ れを壊してしまうことさえあるからです。遠く離れた 2 台のコンピュータを 接続する必要が本当にある場合は、10base2 用のイーサネットカードを使い、 同軸ケーブルで接続すべきでしょう。 <!-- ==================================================================== --> <!--O <sect1><heading>10base2 (thin coax) Ethernet Cabling --> <sect1><heading>10base2 (細い同軸の)イーサネットケーブル <p> <!--O 10base2 is an ethernet cabling standard that specifies the use of 52 ohm coaxial cable with a diameter of about 5 millimeters. There are a couple of important rules to remember when interconnecting machines with 10base2 cabling. The first is that you must use terminators at <bf/both ends/ of the cabling. A terminator is a 52 ohm resistor that helps to ensure that the signal is absorbed and not reflected when it reaches the end of the cable. Without a terminator at each end of the cabling you may find that the ethernet is unreliable or doesn't work at all. Normally you'd use `T pieces' to interconnect the machines, so that you end up with something that looks like: --> 10base2 は直径約 5 mm の 52Ωの同軸ケーブルを使うイーサネットケーブル の規格です。10base2 でマシンを接続する場合、いくつか覚えておかなければ ならない重要な決まりがあります。まず第一に、ケーブルの <bf>両端</bf>に ターミネータを付けること。52Ωの抵抗値をもつターミネータを付ければ、 ケーブルの端に達した信号は反射されずに吸収されます。ターミネータを付け ないとイーサネットは不安定になり、全く使えなくなることもあります。通常、 コンピュータを接続する部分には「T 型」のコネクタを使うので、配線は以下 のような形になります: <tscreen><verb> |==========T=============T=============T==========T==========| | | | | | | | | ----- ----- ----- ----- | | | | | | | | ----- ----- ----- ----- </verb></tscreen> <!--O where the `<tt/|/' at either end represents a terminator, the `<tt/======/' represents a length of coaxial cable with BNC plugs at either end and the `<tt/T/' represents a `T piece' connector. You should keep the length of cable between the `T piece' and the actual ethernet card in the PC as short as possible, ideally the `T piece' will be plugged directly into the ethernet card. --> この図のうち、両端にある `<tt>|</tt>' はターミネータで、 `<tt/======/'は両端に BNC プラグを付けた同軸ケーブル、`<tt>T</tt>' は 「T 型コネクタ」を表します。「T 型コネクタ」間の同軸ケーブルと PC のイー サネットカードとの接続の長さは可能な限り短くしましよう。理想的には「T 型コネクタ」から直接イーサネットに接続する形が最善です。 <!-- ==================================================================== --> <!--O <sect1><heading>Twisted Pair Ethernet Cable --> <sect1><heading>ツイストペア(Twisted Pair)イーサネットケーブル <p> <!--O If you have only two twisted pair ethernet cards and you wish to connect them you do not require a hub. You can cable the two cards directly together. A diagram showing how to do this is included in the <htmlurl url="Ethernet-HOWTO.html" Name="Ethernet-HOWTO"> --> 2 枚のツイストペアタイプのイーサネットカードを接続したいだけなら、ハブ 無しに直結しても構いません。そのためのケーブルの配線は <url url="Ethernet-HOWTO.html" Name="Ethernet-HOWTO"> に書いてあります。 <!--######################################################################--> <!--O <sect><heading>Glossary of Terms used in this document. --> <sect><heading>この文書で使われている用語の解説 <p> <!--O The following is a list of some of the most important terms used in this document. --> 以下に、この文書に現われる重要な用語について簡単に説明します。 <descrip> <!--O <p><tag>ARP</tag>This is an acronym for the <em>Address Resolution Protocol</em> and this is how a network machine associates an IP Address with a hardware address. --> <p><tag>ARP</tag> <em>Address Resolution Protocol</em> の頭文字を取った語で、ネットワーク 上のマシンが IP アドレスをハードウェアアドレス(MAC アドレス)と対応付け るために使うプロトコルです。 <!--O <p><tag>ATM</tag>This is an acronym for <em>Asynchronous Transfer Mode</em>. An ATM network packages data into standard size blocks which it can convey efficiently from point to point. ATM is a circuit switched packet network technology. --> <p><tag>ATM</tag> <em>Asynchronous Transfer Mode</em> の頭文字を取った語です。 ATM ネットワークでは、データを一定サイズのパケットにまとめて 2 点間で 効率的に転送できるようになっています。ATM は回路切替え型のパケット ネットワーク技術です。 <!-- circuit switched の訳語を 「サーキットスイッチタイプ」→ 「回路切替え型」にした件 --> <!--NAKANO 日本語にすればいいってわけじゃないけど... --> <!--fujiwara まあ,いいんじゃないでしょうか(^_^; --> <!--O <p><tag>client</tag>This is usually the piece of software at the end of a system where the user is. There are exceptions to this, for example, in the X11 window system it is actually the server with the user and the client runs on the remote machine. The client is the program or end of a system that is receiving the service provided by the server. In the case of <em/peer to peer/ systems such as <em/slip/ or <em/ppp/ the client is taken to be the end that initiates the connection and the remote end, being called, is taken to be the server. --> <p><tag>クライアント(client)</tag> ユーザがいる側のシステムで使うソフトウェアを指します。これには例外もあ り、X11 ウィンドウシステムではユーザ側にサーバがあり、クライアントが リモートで動きます。クライアントとは、サーバが提供するサービスを受ける プログラムやシステムです。<em>slip</em> や <em>ppp</em> といった <bf>一対一</bf>接続の場合、電話をかけるなど接続を開始する側をクライア ントと呼び、呼び出される側をサーバと呼びます。 <!--O <p><tag>datagram</tag>A datagram is a discrete package of data and headers which contain addresses, which is the basic unit of transmission across an IP network. You might also hear this called a `packet'. --> <p><tag>データグラム(datagram)</tag> データグラムとは、あるデータのかたまりに、宛先/送り元アドレスなどが 含まれたヘッダの付いたもので、 IP ネットワークで転送されるデータの基本単位です。 「パケット」と呼ばれることもあります。 <!--O <p><tag>DLCI</tag>The DLCI is the Data Link Connection Identifier and is used to identify a unique virtual point to point connection via a Frame Relay network. The DLCI's are normally assigned by the Frame Relay network provider. --> <p><tag>DLCI</tag>DLCI とはデータ接続識別子 (Data Link Connection Identifier)のことで、フレームリレーネットワーク を経由した仮想 2 点間接続を区別するために使われます。DLCI は通常 フレームリレーネットワークのプロバイダが割り当てます。 <!--O <p><tag>Frame Relay</tag>Frame Relay is a network technology ideally suited to carrying traffic that is of bursty or sporadic nature. Network costs are reduced by having many Frame Relay customer sharing the same network capacity and relying on them wanting to make use of the network at slightly different times. --> <p><tag>フレームリレー(Frame Relay)</tag> フレームリレーとは、散発的に多量のデータをやりとりする必要のあるネット ワークに適した技術です。多数のフレームリレーのユーザーが同じネットワーク 容量を共有するのでフレームリレーのコストは安くて済み、各ユーザは少し ずつ異なるタイミングでデータをやりとりします。 <!--O <p><tag>Hardware address</tag>This is a number that uniquely identifies a host in a physical network at the media access layer. Examples of this are <em>Ethernet Addresses</em> and <em>AX.25 Addresses</em>. --> <tag>ハードウェアアドレス(hardware address)</tag> ハードウェアアドレスとはネットワークの MAC 層(Media ACcess layer)でホス トを識別するためのアドレスです。この例には<em>イーサネットアドレス</em> と <em>AX.25 アドレス</em>があります。 <!--O <p><tag>ISDN</tag>This is an acronym for <em>Integrated Services Digital Network</em>. ISDN provides a standardized means by which Telecommunications companies may deliver either voice or data information to a customers premises. Technically ISDN is a circuit switched data network. --> <p><tag>ISDN</tag> ISDN は <em>Integrated Services Dedicated Network</em> の頭文字です。 ISDN は通信会社が音声やデータを各家庭に運ぶための標準規格です。技術的 には、ISDN は回路切替え型のデータネットワークです。 <!--O <p><tag>ISP</tag>This is an acronym of Internet Service Provider. These are organizations or companies that provide people with network connectivity to the Internet. --> <p><tag>ISP</tag> Internet Service Provider の頭文字です。ISP とはインターネットへの接続 を提供する会社や組織です。 <!--O <p><tag>IP address</tag>This is a number that uniquely identifies a TCP/IP host on the network. The address is 4 bytes long and is usually represented in what is called the "dotted decimal notation", where each byte is represented in decimal from with dots `.' between them. --> <p><tag>IP アドレス(IP address)</tag> IP アドレスとはネットワーク上の TCP/IP ホストを識別するための番号です。 IP アドレスは 4 バイト長で、通常「ドット区切りの 10 進表記」、すなわち 各バイトを 10 進数で表記し、バイト間を `.' で区切ったかたちで記述されます。 <!--O <p><tag>MSS</tag>The Maximum Segment Size (<em>MSS</em>) is the largest quantity of data that can be transmitted at one time. If you want to prevent local fragmentation MSS would equal MTU-IP header. --> <p><tag>最大セグメントサイズ(MSS)</tag> 最大セグメントサイズ(<em>MSS</em>, Maximum Segment Size)とは、一時に 送信できるデータの最大量です。データが細分化されないためには MSS は (MTU - IP ヘッダ) バイト以上が必要です。 <!--O <p><tag>MTU</tag>The Maximum Transmission Unit (<em>MTU</em>) is a parameter that determines the largest datagram than can be transmitted by an IP interface without it needing to be broken down into smaller units. The MTU should be larger than the largest datagram you wish to transmit unfragmented. Note, this only prevents fragmentation locally, some other link in the path may have a smaller MTU and the datagram will be fragmented there. Typical values are 1500 bytes for an ethernet interface, or 576 bytes for a SLIP interface. --> <p><tag>最大転送単位(MTU)</tag> 最大転送単位(<em>MTU</em>, Maximum Transmission Unit)とは、より小さな 断片に分割せずに IP インターフェイスから送信できる最大のデータグラムの 大きさを示すパラメータです。MTU は、分割されたくないデータグラムの大き さよりも大きくしなければいけません。ただし、この設定はローカルな断片化 を避けるためのもので、経路上のどこかでより小さな MTU が設定されていれ ば、そこで分割されるかもしれません。よく使われる値としては、 イーサネットインターフェイスでは 1500 バイト、SLIP インターフェイスで は 576 バイトです。 <!--O <p><tag>route</tag>The <em>route</em> is the path that your datagrams take through the network to reach their destination. --> <p><tag>経路(route)</tag> <em>経路</em>とは、目的地に達するまでにデータグラムが通過していく 通り道です。 <!--O <p><tag>server</tag>This is usually the piece of software or end of a system remote from the user. The server provides some service to one or many clients. Examples of servers include <em/ftp/, <em/Networked File System/, or <em/Domain Name Server/. In the case of <em/peer to peer/ systems such as <em/slip/ or <em/ppp/ the server is taken to be the end of the link that is called and the end calling is taken to be the client. --> <p><tag>サーバ(server)</tag> 通常、ユーザから遠い側にあるソフトウェアかシステムを指します。サーバは なんらかのサービスをクライアントに提供します。サーバの例としては、 <em>ftp</em> や <em>NFS(Networked File System)</em>, <em>DNS(Domain Name Server)</em> 等があります。<em>slip</em> や <em>ppp</em> といった<em>一対一(peer to peer)</em>システムの場合、 サーバは電話で呼び出される側を指し、クライアントは呼び出す側を指します。 <!--O <p><tag>window</tag>The <em>window</em> is the largest amount of data that the receiving end can accept at a given point in time. --> <p><tag>ウィンドウ(window)</tag> <em>ウィンドウ(window)</em>とは、受信端が一度に受けとれるデータ量の 最大値です。 </descrip> <!--######################################################################--> <!--O <sect><heading>Linux for an ISP ? --> <sect><heading>ISP 用の Linux? <p> <!--O If you are interested in using Linux for ISP purposes the I recommend you take a look at the <htmlurl url="http://www.anime.net/linuxisp/" name="Linux ISP homepage"> for a good list of pointers to information you might need and use. --> Linux を ISP に使いたいのであれば、 <url url="http://www.anime.net/linuxisp/" name="Linux ISP homepage"> を見ることをお勧めします。 このページには必要な情報へのポインタが豊富に登録されています。 <!--######################################################################--> <!--O <sect><heading>Acknowledgements --> <sect><heading>謝辞 <p> <!--O I'd like to thank the following people for their contributions to this document (in no particular order): Terry Dawson, Axel Boldt, Arnt Gulbrandsen, Gary Allpike, Cees de Groot, Alan Cox, Jonathon Naylor, Claes Ensson, Ron Nessim, John Minack, Jean-Pierre Cocatrix, Erez Strauss. --> 本文書に貢献してくださった以下の方々に感謝します(順不同です): Terry Dawson, Axel Boldt, Arnt Gulbrandsen, Gary Allpike, Cees de Groot, Alan Cox, Jonathon Naylor, Claes Ensson, Ron Nessim, John Minack, Jean-Pierre Cocatrix, Erez Strauss <!--######################################################################--> <!--O <sect><heading>Copyright. --> <sect><heading>著作権 <p> <P> <!--O <EM>Copyright Information</EM> --> <EM>著作権に関する情報</EM> <P> <P> The NET-3-HOWTO, information on how to install and configure networking support for Linux. Copyright (c) 1997 Terry Dawson, 1998 Alessandro Rubini, 1999 {POET} - LinuxPorts <P> This program is free software; 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. This program 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 should have received a copy of the GNU General Public License along with this program; if not, write to the: Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. <sect><heading>日本語版について <p> 日本語訳は Linux Japanese FAQ Project が行いました。 翻訳に関するご意見は JF プロジェクト <JF@linux.or.jp> 宛に連絡してください。 改訂履歴を以下に示します。 <descrip> <tag>v1.5j, 1 Jan 2000</tag> 翻訳: 藤原 輝嘉 <fujiwara@linux.or.jp> 訳語統一・校正: <itemize> <item>佐藤 亮一 <rsato@ipf.de> <item>佐野 武俊 <xlj06203@nifty.ne.jp> <item>武井 伸光 <takei@cc.kochi-u.ac.jp> <item>中野 武雄 <nakano@apm.seikei.ac.jp> </itemize> v.1.5j の翻訳にあたっては、こじまみつひろさんによる Linux NET-3-HOWTO の翻訳(1997/07/07 版)から多くの部分を流用させていただきました。 深く感謝します。 </descrip> </article>