进入:view /etc/sysconfig/network-scripts/ifcfg-eth0修改:
DEVICE="eth0" #BOOTPROTO="dhcp"(dhcp为自动分配ip地址,我们把他注释了,在下面另外加) HWADDR="00:0C:29:48:59:0A" #IPV6INIT="yes"(这个改为yes) NM_CONTROLLED="yes" ONBOOT="yes" TYPE="Ethernet" UUID="736bfe9d-f4d7-421a-b4ac-ac70f2c3938e"
## BOOTPROTO="static" IPV6INIT="no" USERCTL="no" IPADDR="192.168.164.100" NETMASK="255.255.255.0" |
发现网络不通?比如ping不通baidu
添加路由:route add default gw 192.168.15.2