Skip to main content

Syntax and Conventions

; (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.

where TRANSPORT/SERVICE options are specified as

"FOO/BAR"       both transport and service known

"FOO" transport known; services not known

"BAR" service is known, transport not known

NOTE: See "Assigned Numbers" for specific options and acronyms for machine types, operating systems, and protocol/services.

Each host table entry is an ASCII text string comprised of 6 fields, where

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

Fields 4, 5 and 6 are optional. For a Domain they are not used.

Fields 3-6, if included, pertain to the first address in Field 2.

'Blanks' (spaces and tabs) are ignored between data elements or fields, but are disallowed within a data element.

Each entry ends with a colon.

The entries in the table are grouped by types in the order Domain, Net, Gateway, and Host. Within each type the ordering is unspecified.

Note that although optional nicknames are allowed for hosts, they are discouraged, except in the case where host names have been changed and both the new and the old names are maintained for a suitable period of time to effect a smooth transition. Nicknames are not permitted for NET names.