Rate This Document
Findability
Accuracy
Completeness
Readability

Setting Up the Network Bridge

The KAE-accelerated live migration test uses the Linux native network bridge.

  • If the source physical host is directly connected to the target physical host, you do not need to configure the gateway.
  • The network bridge name of the source physical host must be the same as that of the target one.
  • The source and target physical hosts must be in the same network segment.
  • The IP address of the VM must be in the same network segment as the network bridge.
  1. Create a network bridge interface.
    1
    brctl addbr <Network_bridge_name>
    
  2. Bind NICs.

    If the NIC has an IP address, clear the IP address.

    1
    ip addr flush dev <NIC_name>
    
    Bind the NIC to the network bridge.
    1
    ip link set <NIC_name> master <Network_bridge_name>
    
  3. Start the interface.
    1
    2
    sudo ip link set <Network_bridge_name> up
    sudo ip link set <NIC_name> up
    
  4. Check whether the binding is successful.
    1
    brctl show
    

    If the binding is successful, the following information is displayed:

    bridge-utils must be installed.

  5. Configure the IP address and gateway of the network bridge.
    1
    2
    ip addr add <IP_address> dev <Network_bridge_name>
    ip route add default via <Gateway_IP_address> dev <NIC_name>
    
  6. Modify the VM XML file to bind the network bridge.
    <interface type='bridge'>
      <mac address='<MAC_address>'/>
      <source bridge='<Network_bridge_name>'/>
      <model type='virtio'/>
      <address type='pci' domain='0x0000' bus='0x0b' slot='0x00' function='0x0'/>
    </interface>

    The commands for configuring the IP address and gateway of the VM are as follows:

    ip addr add <IP_address> dev <Virtual_NIC_name>
    ip route add default via <Gateway_IP_address> dev <Virtual_NIC_name>
  7. Test the connectivity.

    On the target physical host, run the following command to check whether the VM network is normal. If the network connection is normal, the network is successfully set up.

    1
    ping <Virtual_NIC_IP_address>