RedHat 6 下配置网卡IP地址,Virtual Linux下配置网卡IP

经常用到,自己Mark一下,顺带给需要的人参考。

1、配置文件修改
$ vi /etc/sysconfig/network-scripts/ifcfg-eth0

内容:
DEVICE="eth0"
HWADDR="08:00:27:7C:D1:95"
NM_CONTROLLED="yes"
ONBOOT="yes"
IPADDR="192.168.56.5"
GATEWAY="192.168.56.1"
BOOTPROTO="STATIC"


2、立即生效配置
$ sudo /etc/init.d/network stop
$ sudo /etc/init.d/network start

猜你喜欢

转载自xianbin.iteye.com/blog/2181190