Running Linux, 5th Edition - Matthias Kalle Dalheimer [248]
Your IP address
This is the unique machine address in dotted-decimal format. An example is 128.17.75.98. Your network administrators will provide you with this number.
If you're configuring loopback mode (i.e., no PPP and no Ethernet card, just TCP/IP connections to your own machine), your IP address is 127.0.0.1.
Your subnetwork mask
This is a dotted quad, similar to the IP address, which determines which portion of the IP address specifies the subnetwork number and which portion specifies the host on that subnet.
The subnetwork mask is a pattern of bits, which, when bitwise-ANDed with an IP address on your network, will tell you which subnet that address belongs to. For example, your subnet mask might be 255.255.255.0. If your IP address is 128.17.75.20, the subnetwork portion of your address is 128.17.75.
We distinguish here between "network address" and "subnetwork address." Remember that for Class B addresses , the first two bytes (here, 128.17) specify the network, while the second two bytes specify the host. With a subnet mask of 255.255.255.0, however, 128.17.75 is considered the entire subnet address (e.g., subnetwork 75 of network 128.17), and 20 the host address.
Your network administrators choose the subnet mask and therefore can provide you with this information.
This applies as well to the loopback device. Since the loopback address is always 127.0.0.1, the netmask for this device is always 255.0.0.0.
Your subnetwork address
This is the subnet portion of your IP address as determined by the subnet mask. For example, if your subnet mask is 255.255.255.0 and your IP address 128.17.75.20, your subnet address is 128.17.75.0.
Loopback-only systems don't have a subnet address.
Your broadcast address
This address is used to broadcast packets to every machine on your subnet. In general, this is equal to your subnet address (see previous item) with 255 replaced as the host address. For subnet address 128.17.75.0, the broadcast address is 128.17.75.255. Similarly, for subnet address 128.17.0.0, the broadcast address is 128.17.255.255.
Note that some systems use the subnetwork address as the broadcast address. If you have any doubt, check with your network administrators.
Loopback-only systems do not have a broadcast address.
The IP address of your gateway
This is the address of the machine that acts as the default route to the outside world. In fact, you may have more than one gateway address—for example, if your network is connected directly to several other networks. However, only one of these will act as the default route. (Recall the example in the previous section, where the 128.17.112.0 network is connected to both 128.17.75.0 through papaya and the outside world through pineapple.)
Your network administrators will provide you with the IP addresses of any gateways on your network, as well as the networks they connect to. Later, you will use this information with the route command to include entries in the routing table for each gateway.
Loopback-only systems do not have a gateway address. The same is true for isolated networks.
The IP address of your nameserver
This is the address of the machine that handles hostname-to-address translations for your machine. Your network administrators will provide you with this information.
You may wish to run your own nameserver (by configuring and running named). However, unless you absolutely must run your own nameserver (for example, if no other nameserver is available on your local network), we suggest using the nameserver address provided by your network administrators (or your ISP). At any rate, most books on TCP/IP configuration include information on running named.
Naturally, loopback-only systems have no nameserver address.
The network configuration files
Network configuration files are system-wide resource configuration scripts executed at boot time