Summary of Multi-nic binding In Debian-Debian information for the Linux release. The following is a detailed description. First, you can create a file under/etc/modprobe. d, for example, bond $. I heard that $ can prevent bond messages from being sent directly to the terminal, but I have not tried it.
Note: miimon is used for link monitoring. For example: miimon = 100, The system monitors the link connection status every Ms. If one line fails, it is transferred to another line. The value of mode indicates the working mode, which has a total, two or three modes, commonly used: 0, 1.
Mode = 0 indicates that the load balancing (round-robin) method is load balancing, and both NICs work.
Mode = 1 indicates that fault-tolerance (active-backup) provides redundancy, working in the active/standby mode. That is to say, by default, only one network card works and the other is used for backup.
Bonding can only provide link monitoring, that is, whether the link from the host to the switch is connected. If the external link of the switch is down and the switch is not faulty, bonding considers that the link is correct and continues to be used.
The following content is written in/etc/network/interfaces:
Auto lo bond0 eth0 eth1 // automatically loaded upon startup
Allow-hotplug eth0 eth1 // do not write, hot swapping
Iface lo inet loopback // definition of the loopback interface
Iface bond0 inet static
Address 172.16.125.2 // bond IP address
Hw 00: 0c: 29: 35: 89: 9c // The bound MAC address, which can be left empty. If not written, the MAC address of eth0 is automatically used.
Broadcast ......
Netmask .....
Network .....
Gateway...
Dns-servers... // can be left empty. It is available in/etc/resolv. conf.
Up/sbin/ifenslave bond0 eth0 eth1 // you need the ifenslave software to start binding, master-slave relationship. You can view the message through/proc/net/bonding/bond0.
Now it can be said that it is successful. In fact, the definition of eth0 eth1 is as follows:
Iface eth0 inet dhcp/static // I have tried it. dhcp automatically obtains the ip address. If there is no dhcp server in the network, it will be detected for a long time, the ip address obtained by eth1 is useless at all. You can specify it at will, so static is useless.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service