您的位置:首页 > 其它

bond网卡绑定配置

2017-05-17 22:24 417 查看
                                                          ------------------------bond网卡绑定-------------------------

bond的定义:

通过把多个物理网卡绑定成一个逻辑网卡,实现网卡主动备份,提高宽带,实现网络的高性能。

bond的基本配置:

虚拟主机中配置两块网卡



[root@localhost Desktop]# nmcli connection add con-name  bond0 ifname bond0 type  bond mode active-backup  ip4 172.25.254.159/24                                                           ########配置逻辑网卡

Connection 'bond0' (473fe8fd-52e4-4a62-a0ad-ea27d08a3544) successfully added.

[root@localhost Desktop]# nmcli connection add con-name eth0 ifname eth0 type bond-slave master bond0

Connection 'eth0' (d6417030-eeda-4ae7-8edc-e3fed916362c) successfully added.

[root@localhost Desktop]# nmcli connection add con-name eth1 ifname eth1 type bond-slave master bond0    ####双网卡支持工作,一个损坏,另一个顶替

Connection 'eth1' (874d79f8-ca8a-4d6e-b285-673ed9c6e53d) successfully added.

[root@localhost Desktop]# watch -n 1 cat /proc/net/bonding/bond0            ####### 监控正在使用网卡的变化

[root@localhost Desktop]# ping 172.25.254.59               #######观察网络动态

[root@localhost Desktop]# ifconfig eth0 up                     #####两个网卡都正常工作时,eth1作为备份







[root@localhost Desktop]# ifconfig eth0 down               #######eth0 不工作时,eth1会直接顶上,网络是通的,不会间断

   

    

[root@localhost Desktop]# ifconfig eth1 down                ######eth1不 工作时,eth0会直接顶上







内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: