码迷,mamicode.com
首页 > 其他好文 > 详细

centos6 配置静态IP

时间:2018-04-12 18:40:31      阅读:163      评论:0      收藏:0      [点我收藏+]

标签:修改   ifcfg-eth   网卡名字   /etc   ...   static   centos   names   otp   

首先接入网络

然后打开终端  vi /etc/sysconfig/network-scripts/ifcfg-eth0(网卡名字)

修改配置:

ONBOOT=yes

BOOTPROTO=static

IPDDR=10.0....

GATEWAY=10.0.1.1

NETMASK=255.255.255.0

退出保存

重启网络服务:service network restart

或者/etc/init.d/network restart

 

 

配置DNS: vi /etc/resolv.conf

nameserver 222.222.222.222

iptables -L

iptables -F

service iptables save

 

centos6 配置静态IP

标签:修改   ifcfg-eth   网卡名字   /etc   ...   static   centos   names   otp   

原文地址:https://www.cnblogs.com/sunshine-long/p/8809509.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!