Newsgroup: it.comp.macintosh
Titolo: Hosts file?

Avete presente il pulstante "Select Hosts File..." presente nel pannello
di controllo TCP/IP in advanced mode? Penso di sapere a cosa serva, ma
non sono riuscito a capire come scrivere il file. Al sito apple non c'e'
niente in proposito e la documentazione non dice nulla. Ho provato a
fare qualche ricerca su internet ed ho trovato che il file, nella
notazione unix, e' fatto in questo modo:
indirizzo-ip nome
indirizzo-ip nome
...
indirizzo-ip nome
Ad esempio:
194.243.19.15 pino
194.243.19.20 giuseppe
Invece quando seleziono un file di questo genere mi viene detto che il
formato non e' corretto.
C'e' qualcuno che sa gia' come scrivere correttamente il file?
-- 
Fabrizio Di Giuseppe
mailto:
fabr...@iride.com
http://www.iride.com/fabrizio/

 C'e' qualcuno che sa gia' come scrivere correttamente il file?
Con opentransport e' esattamente il contrario.
Dal manuale di opentrasnsport:
A host file is a list of DNS (Domain Naming System) resources. It is
stored on your computer's hard disk, usually in the preferences folder
inside your active System Folder, and can be used by the CTP/IP control
panel. The information in a Hosts file consists of a series of record
that must be in the following format:
domain name     data    ;comment (optional)
Domain names must contain at least one dot in order to be used in a
Hosts file. For example: "
apple.com
" is an allowable name; "apple" is
not.
The data in a Hosts file record include the following information, each
separated by one or more space characters. Comments must be preceded by
a semicolon.
Information             Notes
ttl (time to live):     the record's configured lifetime in seconds.
                        This is optional. If it is not present; or if
                        it is "-1", the entry is assumed to have
                        infinite lifetime.
class (optional)        the only class currently supported in IN
                        (Internet Domain)
type (required)         use "A" for address. "CNAME" for canonical name
                        of an alias, or "NS" for a name server
IP address
Examples of a valid Hosts file records are:
apple.com
 A 130.43.2.2 ;address of host 
apple.com
foobar CNAME 
barfoo.apple.com
; canonicald name for the host whose local
alias is "foobar"
xyzcorp.com
 86400 NS 
biglist.xyzcorp.com
 ; name server for xyz copr. -
entry has a 1 week life
To use a MacTCP Hosts file with TCP/IP, make sure all of the listed
domain names contain at least one dot. MacTCP allows the Hosts file to
contain domain names that contain no dots. In TCP/IP, such a name will
cause an error unless it is an alias.
To use a domain name with no dost in TCP/IP Hosts file, you can use two
records. The first record associates a local alias with a valid name,
and the second resolves the domain name to an IP address. For example,
you might have the following entry in a MacTCP Hosts file:
bigcomputer A 128.1.1.1
To accomplish the same effects of associating "bigcomputer" with the
address 128.1.1.1, a TCP/IP Hosts file need these two records:
bigcomputer CNAME 
largedomain.xyzcorp.com
largedomain.xyzcorp.com
 A 128.1.1.1
The first record associates the alias "bigcomputer" with the valid
domain name "
largedomain.xyzcopr.com
. The second record resolves that
domain name to the IP address 128.1.1.1.
-- 
Sergio Aletta
nyr...@thebrain.net
Note: 
the address at the left of the @ is ROT13 encoded