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

网卡ifcfg-eth0配置

时间:2015-07-08 00:32:54      阅读:175      评论:0      收藏:0      [点我收藏+]

标签:

ifcfg-ethx网卡配置 文件路径

[root@localhost ~]# vi /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0       #网卡设备名称
ONBOOT=yes        #启动时是否激活 yes|no
BOOTPROTO=static  #协议类型 dhcp bootp none
IPADDR=192.168.1.90     #网络IP地址
NETMASK=255.255.255.0   #网络子网地址
GATEWAY=192.168.1.1     #网关地址
BROADCAST=192.168.1.255 #广播地址
HWADDR=00:0C:29:FE:1A:09#网卡MAC地址

TYPE=Ethernet           #网卡类型为以太网

重新导入ifcfg-eth0网络配置文件
[root@localhost ~]# /etc/init.d/network reload
正在关闭接口 eth0:                                     [  确定  ]
关闭环回接口:                                             [  确定  ]
设置网络参 数:                                            [  确定  ]
弹出环回接 口:                                            [  确定  ]
弹出界面 eth0:                                           [  确定  ]

查看网卡状态

[root@localhost ~]# /etc/init.d/network status
配置设备:
lo eth0
当前的活跃设备:
lo eth0

网络服务启动
方法1
[root@localhost ~]# /etc/init.d/network restart  #start stop restart

正在关闭接口 eth0:                                      [  确定  ]
关闭环回接 口:                                             [  确定  ]
设置网络参 数:                                             [  确定  ]
弹出环回接 口:                                             [  确定  ]
弹出界面 eth0:                                            [  确定  ]

重启网络服务2
方法2
[root@localhost ~]# service network restart  #start stop restart
正在关闭接口 eth0:                                      [  确定  ]
关闭环回接 口:                                             [  确定  ]
设置网络参 数:                                             [  确定  ]
弹出环回接 口:                                             [  确定  ]
弹出界面 eth0:                                            [  确定  ]

网卡关闭与激活
[root@localhost ~]# ifdown eth0   #关闭
[root@localhost ~]# ifup eth0        #激活

 

网卡ifcfg-eth0配置

标签:

原文地址:http://www.cnblogs.com/bwteacher/p/4628878.html

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