XenServer NIC Bonding

Source: Internet
Author: User

When configuring NIC bonding for XenServer, you need to do this after all nodes have been added to the cluster, which is also a recommendation from Citrix: "Citrix

recommends never joining a host that already have a Bond configured on the IT to a pool. Connect XenServer with Xencenter

Cluster, through the interface operation of the network card bonding is very easy, and to automate this function, can be done by invoking the XE command, but need to

Have an understanding of some concepts.


For a xenserver cluster, the logical networks that each node sees should be the same, or the network will have problems after the VM is migrated. such as the original VM

Connected to a bridge, migrating to another node without the same a bridge, VMS will be overwhelmed.


Assuming I need to do bonding,eth1 and Eth3 for eth0 and eth2 respectively, I'll start by creating two networks, respectively bonding and

BOND13, scripts (these scripts are run only on the master node) are as follows:


Bond02_uuid= ' Xe network-create name-label=bond02 '

bond13_uuid= ' Xe network-create name-label=bond13 '


Then get the host UUID to all nodes in the cluster:


Host_uuids= ' Xe host-list|grep Uuid|awk ' {print $} '


Loops do bonding for each node:


For Host_uuid in $ (echo $host _uuids | awk ' {print;} ')

Do

# Get the PIF uuid to eth0 and eth2

host_eth0_pif= ' Xe pif-list host-uuid= $host _uuid device=eth0|grep-e ' ^uuid ' |awk ' {print $} '
host_eth2_pif= ' Xe pif-list host-uuid= $host _uuid device=eth2|grep-e ' ^uuid ' |awk ' {print $} '


# eth0 and eth2 do bonding, here the Network-uuid is the above to create a network bond02 after the return of the UUID, each node with it

Xe bond-create network-uuid= $bond 02_uuid pif-uuids= $host _eth0_pif, $host _eth2_pif MODE=LACP


# Get the PIF uuid to eth1 and Eth3

host_eth1_pif= ' Xe pif-list host-uuid= $host _uuid device=eth1|grep-e ' ^uuid ' |awk ' {print $} '
host_eth3_pif= ' Xe pif-list host-uuid= $host _uuid device=eth3|grep-e ' ^uuid ' |awk ' {print $} '


# eth1 and eth3 do bonding, here the Network-uuid is the above to create a network bond13 after the return of the UUID, each node with it

Xe bond-create network-uuid= $bond 13_uuid pif-uuids= $host _eth1_pif, $host _eth3_pif MODE=LACP


Done


The mode I specified in the "Xe bond-create" command is LACP, which you need to know about here.

XenServer NIC Bonding

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.