linux下2个网卡bond成一个高可用的虚拟网卡

2010年6月10日 | 标签: , , , ,
[root@real-server root]# modprobe bonding mode=1 miimon=100 downdelay=200 updelay=200 ##设定为高可用模式mode=1
[root@real-server root]# ip link set dev bond0 addr 00:80:c8:e7:ab:5c   ##设定MAC地址
[root@real-server root]# ip addr add 192.168.10.254/24 brd + dev bond0  ##设定IP地址
[root@real-server root]# ip link set dev bond0 up ##启用虚拟网卡
[root@real-server root]# ifenslave  bond0 eth0 eth1 ##多网卡合一
The interface eth0 is up, shutting it down it to enslave it.
The interface eth1 is up, shutting it down it to enslave it.
[root@real-server root]# ip link show eth2 ; ip link show eth3 ; ip link show bond0 ##查看状态
4: eth0: <BROADCAST,MULTICAST,SLAVE,UP> mtu 1500 qdisc pfifo_fast master bond0 qlen 100
link/ether 00:80:c8:e7:ab:5c brd ff:ff:ff:ff:ff:ff
5: eth1: <BROADCAST,MULTICAST,NOARP,SLAVE,DEBUG,AUTOMEDIA,PORTSEL,NOTRAILERS,UP> mtu 1500 qdisc pfifo_fast master bond0 qlen 100
link/ether 00:80:c8:e7:ab:5c brd ff:ff:ff:ff:ff:ff
58: bond0: <BROADCAST,MULTICAST,MASTER,UP> mtu 1500 qdisc noqueue
link/ether 00:80:c8:e7:ab:5c brd ff:ff:ff:ff:ff:ff
目前还没有任何评论.