1, enter in the terminal: Vi/etc/sysconfig/network-scripts/ifcfg-eth0
2, file configuration as follows, save exit:#描述网卡对应的设备别名, such as Ifcfg-eth0 file it for eth0device=eth0onboot=yestype=ethernet# set the network card to obtain the IP address of the way, The possible options are #static,dhcp or BOOTP, corresponding to the statically specified #ip address, the IP address obtained through the DHCP protocol, the IP address obtained through the BOOTP protocol bootproto=static# the corresponding subnet broadcast address broadcast= 192.168.163.255# the corresponding network card physical address hwaddr=00:0c:29:62:da:8d# if the network card to obtain an IP address is statically specified, this field specifies the IP address of the NIC ipaddr=192.168.163.128# Network mask netmask=255.255.255.0# NIC corresponding network address network=192.168.163.0# Gateway gateway=192.168.163.2#dnsdns1=192.168.163.2
3. Restart the Network service: Service Network Restart
From for notes (Wiz)
CentOS Configuration Fixed IP