Search

Important Linux network configuration files

The important Linux network configuration files are explained below:

/etc/hosts

The main purpose of /etc/hosts configuration file is to resolve hostnames that cannot be resolved any other way. It can also be used to resolve hostnames on small networks with no DNS server. Regardless of the type of network the computer is on, this file should contain a line specifying the IP address of the loopback device (127.0.0.1) as localhost.localdomain.

/etc/resolv.conf

The /etc/resolv.conf configuration file specifies the IP addresses of DNS servers and the search domain. Unless configured to do otherwise, the network initialization scripts populate this file.

/etc/sysconfig/network

The /etc/sysconfig/network configuration file specifies routing and host information for all network interfaces.

/etc/sysconfig/network-scripts/ifcfg-<interface-name>

For each network interface, there is a corresponding interface configuration script. Each of these files provide information specific to a particular network interface.

Related Tutorials
• Common Linux network tools - ping, telnet, netstat and arp
• Linux xinetd Super Server daemon
• Linux Network Interface Configuration tool - ifconfig
• How to configure Dynamic Host Configuration Protocol (DHCP) in Linux
• Introduction to Domain Name System (DNS)
• Linux Domain Name System (DNS) client configuration files /etc/hosts, /etc/nsswitch.conf and /etc/resolv.conf
• Berkeley Internet Name Domain (BIND) as a DNS server
• How to configure caching-only name server
• BIND configuration file (/etc/named.conf)
• Domain Name System (DNS) zone files
• RNDC (Remote Name Daemon Control)