< Day Day Up > |
A set of configuration files in the /etc directory, shown in Table 38-7, are used to set up and manage your TCP/IP network. These configuration files specify such network information as host and domain names, IP addresses, and interface options. The IP addresses and domain names of other Internet hosts you want to access are entered in these files. If you configured your network during installation, you can already find that information in these files.
Address |
Description |
---|---|
Host address |
IP address of your system; it has a network part to identify the network you are on and a host part to identify your own system |
Network address |
IP address of your network |
Broadcast address |
IP address for sending messages to all hosts on your network at once |
Gateway address |
IP address of your gateway system, if you have one (usually the network part of your host IP address with the host part set to 1) |
Domain name server addresses |
IP addresses of domain name servers your network uses |
Netmask |
Used to determine the network and host parts of your IP address |
Files |
Description |
/etc/hosts |
Associates hostnames with IP addresses, lists domain names for remote hosts with their IP addresses |
/etc/sysconfig/network-scripts |
Network connection configurations |
/etc/host.conf |
Lists resolver options |
/etc/nsswitch.conf |
Name Switch Service configuration |
/etc/resolv.conf |
Lists domain name server names, IP addresses (nameserver), and domain names where remote hosts may be located (search) |
/etc/protocols |
Lists protocols available on your system |
/etc/services |
Lists available network services, such as FTP and Telnet, and the ports they use |
/etc/sysconfig/networking |
Holds network configuration files managed by redhat-config-network |
/etc/sysconfig/network |
Network configuration information |
Without the unique IP address the TCP/IP network uses to identify computers, a particular computer cannot be located. Because IP addresses are difficult to use or remember, domain names are used instead. For each IP address, a domain name exists. When you use a domain name to reference a computer on the network, your system translates it into its associated IP address. This address can then be used by your network to locate that computer.
Originally, every computer on the network was responsible for maintaining a list of the hostnames and their IP addresses. This list is still kept in the /etc/hosts file. When you use a domain name, your system looks up its IP address in the hosts file. The system administrator is responsible for maintaining this list. Because of the explosive growth of the Internet and the development of more and more large networks, the responsibility for associating domain names and IP addresses has been taken over by domain name servers. The hosts file is still used to hold the domain names and IP addresses of frequently accessed hosts, however. Your system normally checks your hosts file for the IP address of a domain name before taking the added step of accessing a name server.
The format of a domain name entry in the hosts file is the IP address followed by the domain name, separated by a space. You can then add aliases for the hostname. After the entry, on the same line, you can enter a comment. A comment is always preceded by a # symbol. You can already find an entry in your hosts file for localhost with the IP address 127.0.0.1. localhost is a special identification used by your computer to enable users on your system to communicate locally with each other. The IP address 127.0.0.1 is a special reserved address used by every computer for this purpose. It identifies what is technically referred to as a loopback device. A sample /etc/hosts file is shown here.
As noted in Chapter 34, the /etc/resolv.conf file holds the IP addresses for your DNS servers along with domains to search. A DNS entry will begin with the term nameserver followed by the name server's IP address. A search entry will list network domain addresses. Check this file to see if your network DNS servers have been correctly listed.
The /etc/sysconfig/network-scripts directory holds configuration information for different network connection devices such the IP address and network address used. For a detailed discussion see the section "Network Interfaces and Routes" later in this chapter.
The /etc/sysconfig/networking directory holds configuration information set up with redhat-config-network (Network on System Settings menu and window). These file should not be edited manually. The profiles directory holds configurations for the different profiles you set up. Different profile directories will include the hosts file listing host domain names and IP addresses, the network file holding your system's host name, and the resolv.conf file, which contains your domain name servers. The device configuration file for the connection you use for that profile will also be listing, such as ifcfg-eth0 for the first Ethernet device. These are all configurations that may change depending on the profile you use. For example, at the office you may use an Ethernet connection on a company network with its own DNS servers, whereas at home you may use a modem connection to an ISP with its own Internet DNS servers. Your hostname and domain name may vary depending on the networks your different profiles connect to.
The /etc/services file lists network services available on your system, such as FTP and Telnet, and associates each with a particular port. Here, you can find out what port your Web server is checking or what port is used for your FTP server. You can give a service an alias, which you specify after the port number. You can then reference the service using the alias.
< Day Day Up > |
This HTML Help has been published using the chm2web software. |