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

CentOS ips bonding

时间:2015-01-19 19:00:33      阅读:160      评论:0      收藏:0      [点我收藏+]

标签:

centos ip bonding 一个网卡多个ips,多个网口一个ip

1,配置一个网卡多ips的情况
cp /etc/sysconfig/network-scripts/ifcfg-eth0 /etc/sysconfig/network-scripts/ifcfg-eth0:0
DEVICE="eth0"
TYPE="Ethernet"
UUID=""
ONBOOT="yes"
NM_CONTROLLED="yes"
BOOTPROTOCOL="static"
IPADDR=""
NETMASK=""
GATEWAY=""
或者ifconfig eth0:0 ip netmask up
route add default gw
route del default gw

2,多网卡绑定一个ip
2.1 vim /etc/sysconfig/network-scripts/ifcfg-bond0
DEVICE=bond0
IPADDR=
NETWORK=10.114.100.254
NETMASK
userctl=no
BOOTPROTO=none
ONBOOT=yes
2.2 vi /etc/sysconfig/network-scripts/ifcfg-eth0 仅仅有如下infos
DEVICE=eth0
USERCTL=no
ONBOOT=yes
MASTER=bond0
SLAVE=yes
BOOTPROTO=none

2.3 vi /etc/sysconfig/network-scripts/ifcfg-eth1
DEVICE=eth1
USERCTL=no
ONBOOT=yes
MASTER=bond0
SLAVE=yes
BOOTPROTO=none

2.4 vim /etc/modprobe.conf 添加如下信息alias bond0 bonding 0
ptions bond0 mode=blance-alb miimon=100

2.5执行modprobe bonding && service restart && less /proc/net/bonding/bond0

CentOS ips bonding

标签:

原文地址:http://www.cnblogs.com/ruiy/p/4234208.html

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