双网卡绑定单个IP 地址为了提供网络的高可用性,我们可能需要将多块网卡绑定成一块虚拟网卡对外提供服务,这样即使其中的一块物理网卡出现故障,也不会导致连接中断。多网卡绑。为了提供网络的高可用性,我们可能需要将多块网卡绑定成一块虚拟网卡对外提供服务,这样即使其中的一块物理网卡出现故障,也不会导致连接中断。在Linux下叫bonding,IBM称为etherchanel,broadcom叫team,但是名字怎么变,效果都是将两块或更多的网卡当做一块网卡使用,在增加带宽的同时也可以提高冗余性。比如我们在CentOS 6.3下可以将eth0和eth1绑定成虚拟网卡bond0。如图:实验配置:mode=1:表示fault-tolerance (active-backup)提供冗余功能,工作方式是主备的工作方式,其中一块网卡在工作(若eth0断掉),则自动切换到另一个块网卡(eth1做备份)。
| 系 统 | 设备名称 | IP地址 | 子网掩码 |
| CentOS 6.3_64bit | eth0 | | |
| eth1 | | |
| bond0 | 10.1.3.210 | 255.255.255.0 |
1、查看主机网卡
[root@web ~]# cd /etc/sysconfig/network-scripts/
[root@web1 network-scripts]# ll
total 200
-rw-r--r--. 1 root root 212 Mar 20 22:15 ifcfg-eth0
-rw-r--r-- 1 root root 212 Mar 23 19:10 ifcfg-eth1
2、复制ifcfg-bond0
[root@web network-scripts]# cp ifcfg-eth0 ifcfg-bond0
[root@web network-scripts]# ll
total 204
-rw-r--r-- 1 root root 212 Mar 23 19:12 ifcfg-bond0
-rw-r--r--. 1 root root 212 Mar 20 22:15 ifcfg-eth0
-rw-r--r-- 1 root root 212 Mar 23 19:10 ifcfg-eth1
3、编辑ifcfg-bond0、ifcfg-eth0、ifcfg-eth1
[root@web network-scripts]# vim ifcfg-bond0DEVICE=bond0
BOOTPROTO=static
IPADDR=10.1.3.210
NETMASK=255.255.255.0
GATEWAY=10.1.3.254
ONBOOT=yes
USERCTL=no
[root@web1 network-scripts]# vim ifcfg-eth0
DEVICE=eth0
ONBOOT=yes
BOOTPROTO=none
MASTER=bond0
SLAVE=yes
USERCTL=no
[root@web1 network-scripts]# vim ifcfg-eth1
DEVICE=eth1
ONBOOT=yes
BOOTPROTO=none
MASTER=bond0
SLAVE=yes
USERCTL=no
iptables (Linux 防火墙)在 Ubuntu 13.04 中安装 Classic Menu Indicator相关资讯 Linux双网卡绑定 CentOS双网卡绑定
- CentOS6.x双网卡采用主-备份策略绑 (今 11:13)
- Linux 双网卡绑定实践 (02/23/2015 19:04:04)
- Linux双网卡绑定实现负载均衡( (01/05/2014 10:20:00)
| - Oracle Linux 6.4(BOND)双网卡绑定 (06/16/2015 20:04:43)
- CentOS/Linux 双网卡绑定单一IP, (02/06/2015 09:10:38)
- Linux与Windows服务器双网卡绑定 (12/17/2012 13:41:07)
|
本文评论 查看全部评论 (0)