centOS网络设置记录
上一篇 /
下一篇 2013-09-02 11:08:45
进入/etc/sysconfig/network-script/目录 看到只有ifcfg-Auto_eth0和ifcfg-lo
手动设置网络参数:
# vi ifcfg-eth0
.....
NM_CONTROLLED="no"
ONBOOT="yes"
....
然后设置DNS:
vi /etc/resolv.conf
nameserver 192.168.0.1
重启后不能连上网络,于是
设置NetworkManager
# chkconfig –list network
network 0:关闭 1:关闭 2:关系 3:关闭 4:关闭 5:关闭 6:关闭
# chkconfig –list NetworkManager
NetworkManager 0:关闭 1:关闭 2:关闭 3:启用 4:启用 5:启用 6:关闭
设置开机启动:
# chkconfig –level123456 NetworkManager off
# chkconfig –level345 network on
重启后生效
其他命令
/etc/init.d/network start
简单修改IP
ifconfig eth0 192.168.1.xx
即时修改gateway
# route add default gw 192.168.0.254
收藏
举报
TAG: