Step1:
cd /etc/sysconfig/network-scripts/
![](http://dl2.iteye.com/upload/attachment/0103/5234/30bea692-4577-36ee-a324-74d183c37256.png)
Step2:修改文件ifcfg-eth0内容(vi ifcfg-eth0)为:
DEVICE=eth0 HWADDR=00:0C:29:70:C8:AD TYPE=Ethernet UUID=79bd4984-2a54-404a-9807-6bb88cc09f87 ONBOOT=yes NM_CONTROLLED=yes BOOTPROTO=dhcp
![](http://dl2.iteye.com/upload/attachment/0103/5240/06f4ad06-d436-3b2e-853e-a9b071dd1f4c.png)
![](http://dl2.iteye.com/upload/attachment/0103/5238/8ed42d7c-a100-39a0-9fea-ecfb069ae8cf.png)
Step3:重启网络
/etc/init.d/network restart
![](http://dl2.iteye.com/upload/attachment/0103/5246/7ec42e85-4814-3da7-8241-c5c089c8b4a1.png)
Step4:查看IP
ifconfig
![](http://dl2.iteye.com/upload/attachment/0103/5244/d799e23b-19d3-3a5e-bbe4-e87dca279ba0.png)
Step5:Ping测试
ping baidu.com
![](http://dl2.iteye.com/upload/attachment/0103/5248/4f5f06b2-e442-3c3c-9826-31b876073c3a.png)