メインコンテンツまでスキップ

構文と規約

; (semicolon)   is used to denote the beginning of a comment.
Any text on a given line following a ';' is a
comment, and not part of the host table.

NET keyword introducing a network entry

GATEWAY keyword introducing a gateway entry

HOST keyword introducing a host entry

DOMAIN keyword introducing a domain entry

:(colon) is used as a field delimiter

::(2 colons) indicates a null field

,(comma) is used as a data element delimiter

XXX/YYY indicates protocol information of the type
TRANSPORT/SERVICE.

ここで TRANSPORT/SERVICE のオプションは次のように指定される

"FOO/BAR"       both transport and service known

"FOO" transport known; services not known

"BAR" service is known, transport not known

注: マシンタイプ、オペレーティングシステム、プロトコル/サービスの具体的なオプションと略語については、「Assigned Numbers」を参照のこと。

各ホストテーブルエントリは、6 個のフィールドから成る ASCII テキスト文字列であり、

Field 1         KEYWORD indicating whether this entry pertains to
a NET, GATEWAY, HOST, or DOMAIN. NET entries are
assigned and cannot have alternate addresses or
nicknames. DOMAIN entries do not use fields 4, 5,
or 6.

Field 2 Internet Address of Network, Gateway, or Host
followed by alternate addresses. Addresses for a
Domain are those where a Domain Name Server exists
for that domain.

Field 3 Official Name of Network, Gateway, Host, or Domain
(with optional nicknames, where permitted).

Field 4 Machine Type

Field 5 Operating System

Field 6 Protocol List

フィールド 4、5、6 は任意である。ドメインではこれらは使用されない。

フィールド 3-6 が含まれる場合、それらはフィールド 2 の最初のアドレスに関するものである。

「空白」(スペースとタブ) は、データ要素間またはフィールド間では無視されるが、データ要素の内部では許されない。

各エントリはコロンで終わる。

テーブル内のエントリは、ドメイン、ネットワーク、ゲートウェイ、ホストの順に、種類ごとにまとめられる。各種類の内部での順序は規定されない。

ホストには任意のニックネームが許されているが、ホスト名が変更され、新旧両方の名前が円滑な移行を実現するために適切な期間維持される場合を除き、推奨されない。NET 名にはニックネームは許されない。