标签:
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
标签:
原文地址:http://www.cnblogs.com/ruiy/p/4234208.html