Bind a dual Nic to bond0 under a virtual machine

Source: Internet
Author: User
Virtual Machine bind0bind dual Nic

Step 1:

 
  1. First mode: mod = 0, namely: (balance-rr) round-robin Policy (balanced round robin Policy)
  2. Feature: the packet transmission sequence is Sequential transmission (that is, 1st packets go through eth0, And the next packet goes through eth1 .... This mode provides load balancing and fault tolerance capabilities, but we know that if a connection or session data packet is sent from different interfaces, when packets pass through different links in the middle, the client may encounter unordered data packets, and unordered data packets need to be sent again, so the network throughput will decrease.
  1. Mode 2: mod = 1 (Active-Backup) Active-backup policy (master-backup policy)
  2. Feature: Only one device is active. When one device goes down, the other device is immediately switched from backup to the master device. The MAC address is externally visible. From the outside, Bond's MAC address is unique to avoid confusion between switches. This mode only provides Fault Tolerance capabilities. It can be seen that this algorithm has the advantage of providing high network connection availability, but its resource utilization is low, and only one interface is working, when there are N network interfaces, the resource utilization rate is 1/N.
 
  1. A solution provided by a pair of shoes:
  2. The Linux Nic bonging backup mode experiment is completely normal on the real machine (provided that it is supported by the Linux kernel), but the problem may occur in the VMware Workstation Virtual Machine.

  1. If any problem occurs after the configuration is complete, bond0 can be started and used properly, but it does not work in the backup mode. When ifdown eth0 is used, the network fails. I did not know much about searching for information online, so I published this blog.
  2. In fact, the answer is also given, showing that "This MAC address is eth0, and this MAC address eth1 cannot be used ".
  3. I checked the kernel document: There are two ways to obtain the MAC address from bond0: one is to obtain the MAC address from the first active Nic, then the MAC address of the remaining slave Nic is used. The other is the fail_over_mac parameter, which is the MAC address of the active Nic used by bond0, the conversion of the MAC address or active Nic changes.
  4. Since vmware workstation does not support the first method of obtaining the MAC address, you can use the fail_over_mac = 1 parameter. Of course, you don't need to do this in the real environment ..


Step 2:


Step 3:


Step 4:


Step 5:


Step 6:


Step 7:


Step 8:


Step 9:

Bind a dual Nic to bond0 under a virtual machine

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.