Post-Installation Configuration

This post is in response to my earlier post of network configuration.

The /etc/hosts file lists IP addresses and hostnames that should resolve to the IPaddresses as shown. The first one listed,, is referred to as the loopback interface and should never be removed. If some hostnames are not  resolved by the DNS servers, list them with their IP addresses after the loopback device. For example, if your network consists only of a handful of systems, it might be easier to list them in the /etc/hosts file on each local system than set up a DNS server on the local network for name resolution.

Always be careful when listing hostnames that can be resolved by the DNS servers and those that are not under your control. If the IP address of the hostname changes, you will not be able to connect to the host because any IP addresses listed in /etc/hosts have precedence over any IP addresses resolved through the DNS servers.

 /etc/hosts File
# Do not remove the following line, or various programs
# that require network functionality will fail. localhost.localdomain localhost metropolis louis clark

A typical /etc/resolv.conf is shown below. Each nameserver line represents a
DNS server, and the search line specifies domain names to try if only the first part of a hostname is used. For example, if just the name infinity is used as a hostname, and then will be tried if the /etc/resolv.conf file in Listing 2.4 is on the system.

 /etc/resolv.conf File

In the /etc/sysconfig/network-scripts/ directory, each network device has its own
configuration file with the filename ifcfg- such as ifcfg-eth0 for the first Ethernet device.

If the device uses DHCP to retrieve network settings, a typical /etc/sysconfig/networkscripts/ifcfg-eth0 file contains the lines as shown below.

 Ethernet Interface Configuration File for DHCP

If the device is configured for a static IP address, the interface configuration file looks similar to

Ethernet Interface Configuration File for Static IP

If the ONBOOT option is set to yes, the device is activated at boot time using the network initialization script. Other device names include lo for the local loopback device, pppX for dialup interfaces, and irlanX for infrared devices where X is the device number starting with 0. Refer to the file /usr/share/doc/initscripts-/sysconfig.txt for additional options for
the files in this directory.



0 Responses to "Post-Installation Configuration"

Post a Comment


Managing Shell And its Secrets

Subscribe To Get Update On Mobile

Get updates of latest post on your mobile free