B.2 Networks File

The sys:\etc\networks file contains information about the networks in your internetwork. Each entry provides information about one network. An entry cannot extend beyond one line. Figure B-2 shows a sample networks file.

Figure B-2 Sample Networks File

The networks file entry has the following format:

network_name network_number [/network_mask] [alias [...]]

The network_name is the name of the network associated with this network number. The name cannot contain a space, tab, pound sign (#), or end-of-line character. The network name must be unique.

The network_number is the number of the network. Hexadecimal numbers must start with the character pair 0x or 0X. The network_number can be specified with or without trailing zeros. For example, the addresses 130.57 and 130.57.0.0 denote the same IP network.

The network_mask is the subnet mask of the network. Like IP addresses, it can be specified in octal, decimal, or hexadecimal notation. This field is optional. If not specified, the subnet mask is deduced from existing routing table entries.

The alias is another name for the same network; you can specify up to 10 aliases for a network.

The sample file sys:\etc\samples\networks is included with the TCP/IP software. When you are configuring TCP/IP for the first time, copy the sample networks file from sys:\etc\samples to sys:\etc. Then edit the sys:\etc\networks file. You can change your configuration at any time by editing your existing sys:\etc\networks file.