Network-related configuration files
1,/etc/sysconfig/network-scripts/ifcfg-ethx network parameters ip/Subnet mask/broadcast address configuration (restart valid )
2,/etc/resolv.conf used to set the DNS server IP address and DNS domain name
The file is a configuration file that is used by the Domain name Resolver (resolver, a library that resolves IP addresses based on the host name). Its format is simple, each line begins with a keyword followed by one or more arguments separated by a space. Resolv.conf's
Key WordsThere are four main, namely: nameserver//define DNS server IP address domain//define the local domain name search//define the domain name of the searching list sortlist//Pair The returned domain name is sorted below we give an example of a/etc/resolv.conf: domain 51osos.comsearch www.51osos.com 51osos.comnameserver 202.102.192.68nam EServer 202.102.192.69 is the most important nameserver keyword, if you do not specify nameserver can not find a DNS server, other keywords are optional. NameServer indicates that the host specified with this address is the domain name server when resolving the domain name. The domain name servers are queried in the order in which they appear in the file, and the following nameserver are queried only if the first nameserver is unresponsive. Domain declares the name of the host. Many programs use it, such as a mail system, and are used when DNS queries are made for hosts that do not have a domain name. If there is no domain name, the hostname is used, removing all at the first point (.) The previous content. Search its multiple parameters indicate the order of the domain name query. When you want to query a host that does not have a domain name, the host is found separately in the domain that is declared by search. Domain and search cannot coexist, and if they exist at the same time, subsequent occurrences will be used. Sortlist allows a specific sort of domain results to be obtained. Its parameters are network/mask pairs that allow arbitrary order of arrangement.
To be continue ...
Linux Common configuration file parsing