双网卡捆绑工具

 为了避免远程手动作双网卡捆绑造成网络异常,特编写此工具,希望对大家有用。

以下是使用eth0的IP信息作的捆绑过程

[root@centos ~]# ./bonding-tool
        Setup bonding network ,just for RHEL and CentOS
        Copyright (c) 2011 K.C .
        E-mail:[email protected]
        Version 1.0
        Bug:
               1) Just support for 2 NICs .


This is a tool to modify the network, run a relay network may bring, whether to continue?(yes/no,default no)yes

Please provide the IP configuration item information. 
You can choose to enter yourself or automatic read form the configuration file of nic.
Are you enter the IP information yourself?(yes or no,default no) 
This machine have 2 NICs.Please choose a NIC configure file to continue.(E.G: eth1 )eth0

        说明:mode 的值表示工作模式,他共有0,1,2,3,4,5,6 七种模式,常用的为0,1 两种。   
        mode=0 表示load balancing (round-robin)为负载均衡方式,两块网卡都工作。   
        mode=1 表示fault-tolerance (active-backup)提供冗余功能,工作方式是主备的工作方式,也就
        是说默认情况下只有一块网卡工作,另一块做备份.   
        bonding只能提供链路监测,即从主机到交换机的链路是否接通。如果只是交换机对外
        的链路down掉了,而交换机本身并没有故障,那么 bonding会认为链路没有问题而继续使
        用。
        详细请查看 http://www.schalley.eu/2010/10/05/linux-bonding-modes/
        Please enter the mode you want to use.(E.G: 0,default 0)0

你可能感兴趣的:(职场,Bond,双网卡,休闲,捆绑)