root帐号下:
vim /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
HWADDR=00:0C:29:23:D4:A3
TYPE=Ethernet
#UUID=00306592-053a-42f9-a545-e43e477343eb
#ONBOOT=yes
#NM_CONTROLLED=no
BOOTPROTO=static
IPADDR=192.168.40.101
DNS1=192.168.40.2
GATEWAY=192.168.40.2
NETMASK=255.255.255.0
#BOOTPROTO=dbcp
ONBOOT=yes
NM_CONTROLLED=yes