Reprinted from: http://blog.sina.com.cn/s/blog_4b0a62670100921z.html
In the Linux environment, configure the card, most use the ifconfig and netconfig to configure the network card. For Linux systems, each of its service, each component will have its own profile. Users can go to modify it, use the command more convenient than:)
Linux network card configuration file located in / etc/sysconfig/ntetwork-scripts/ifcfg- (interface name), such as ifconfig-eth0.
Open this file, you will find its form is very simple, the meaning of the following configuration is used.
1, DEVICE = name, where, name is the physical device name.
2, IPADDR = addr, where, addr is the IP address.
3, NETMASK = mask, which, mask is the netmask value.
4, BROADCAST = addr, where, addr is the broadcast address.
5, GATEWAY = addr, where addr is the gateway address.
6, ONBOOT = answer, where, answer is yes (boot, activate the device) or no (do not activate the device at boot time)
7, USERCTL = answer, where, answer is yes (non-root user can control the device) or no
8, BOOTPROTO = proto, which, proto take the following values: none, boot, do not use the agreement; static statically assigned addresses; bootp, using the BOOTP protocol, or dhcp, use the DHCP protocol.
service network restart can.