Reprinted from: http://blog.chinaunix.net/uid-26872853-id-3255250.html
Linux Network configuration First, the configuration of IP:configuration file for first (second) block card:/etc/sysconfig/network-scripts/ifcfg-eth0 (1)# # static IPDevice=eth0bootproto=static//Specifies whether to assign IP statically or dynamically. The values are: static DHCPOnboot=yesHWADDR=00:0C:29:84:D1:B1netmask=255.255.255.0ipaddr=192.168.2.2type=ethernet # # dynamic IPDEVICE=ETH0BOOTPROTO=DHCP//Specifies whether to assign IP statically or dynamically. The values are: static dhcponboot=yeshwaddr=00:0c:29:84:d1:b1type=ethernet Second, the configuration of DNSconfiguration file for DNS:/etc/resolv.confnameserver 211.98.4.1 command to restart the Network service: Service network restart "If the IP of one NIC is dynamically allocated, then the DNS address of the other NIC will be overwritten." "" Temporarily Configure IP address by command: ifconfig eth0 192.168.1.25; now only command with IP "
===========================================================================
The directory where the network configuration files under Linux are located:/etc/sysconfig/networking/profiles/default. This directory has the IP configuration file ifcfg-eth0 (1), which has the DNS configuration file resolv.conf
Linux Network configuration