RedHat或CentOS添加第二块网卡并配置静态IP
cd /etc/sysconfig/network-script
vi ifcfg-eth1
-
DEVICE=eth1
ONBOOT=yes
BOOTPROTO=static
IPADDR=192.168.0.100
NETMASK=255.255.255.0
GATEWAY=192.168.0.1
保存退出
用ifconfig看新的IP是否已经加上
/etc/init.d/network reload
如果要重启网络让IP生效输入:
service network restart
此文章由 http://www.ositren.com 收集整理 ,地址为: http://www.ositren.com/htmls/58018.html