*********************************************
方法一
vi /etc/sysconfig/network-scripts/ifcfg-eth0
1.
### DHCP IP
# Advanced Micro Devices [AMD] 79c970 [PCnet32 LANCE]
DEVICE=eth0
BOOTPROTO=dhcp
DHCPCLASS=
HWADDR=00:0C:29:37:B9:2D
ONBOOT=yes
2.
### STATIC IP
# Advanced Micro Devices [AMD] 79c970 [PCnet32 LANCE]
DEVICE=eth0
BOOTPROTO=static
IPADDR=192.168.1.101
NETMASK=255.255.255.0
GATEWAY=192.168.1.1
HWADDR=00:0C:29:37:B9:2D
ONBOOT=yes
ifdown eth0
ifup eth0
或者
service network restart
*********************************************
方法二
ifconfig eth0 10.1.1.9 netmask 255.255.255.0
试了好像这样配不用restart的