linux 设置网络

使用root登录

cd /etc/sysconfig/network-scripts

vi 编辑 ifcfg-eth0

DEVICE=eth0

HWADDR=00:0C:29:51:9C:3F

TYPE=Ethernet

UUID=96c8e78f-23a5-4380-b2c1-c0cd427e63da

ONBOOT=yes

NM_CONTROLLED=yes

BOOTPROTO=static-----------设置为静态

扫描二维码关注公众号,回复: 238277 查看本文章

IPADDR=192.168.100.217-------------ip地址

NETMASK=255.255.254.0-------------子网掩码

GETEWAY=192.168.100.1---------------网关

执行命令

service network restart

猜你喜欢

转载自best0247.iteye.com/blog/2356844