Child pages
  • Configure Pair Bonding and Bridges for KVM Hypervisor

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • Allocate the host address in DNS.
    • Always do this first, to avoid DNS conflicts or other surprises.
    • Make sure the reverse DNS matches the forward DNS.
  • If there will be a web proxy in front of TUSK server, make sure that the host has a real local address name, not just the name published for the proxy.
  • Access the server  server with the remote console or keyboard and monitor.
    • Do not do this on an active, production server, there can be very confusing service interruptions.
  • Edit /etc/modprobe.d/bond0.conf to contain this. Do not set other bonding parameters here.
    Code Block
    alias bond0 bonding
    
  • Edit /etc/sysconfig/network to set the hostname and various other useful settings.
    • IPv6 must, must, must be enabled for bonding and other features to work reliably.
    • NOZEROCONF=yes avoids the unnecessary "169.254.*" fallback addresses and routing from being activated, which are purely confusing in normal environments.
      Code Block
      NETWORKING=yes
      HOSTNAME=hostname.example.com
      # IPv4
      NETWORKING=yes
      NOZEROCONF=yes
      # IPv6, necessary for bonding
      NETWORKING_IPV6=yes
      IPV6INIT=yes
      
      
  • Edit /etc/sysconfig/network-scripts/ifcfg-eth0.
    • Make sure that HWADDR matches the actual MAC address of the port.
      • Run "/sbin/ifconfig -a" to report this.
    • Notice the bonding settings for MASTER and SLAVE.
    • Notice the NM_CONTROLLED=no, to block NetworkManager from ever touching this port.
    • Notice the "MTU=9000" setting to enable jumbo frames. This is a common practice in server environments, and should be activated as needed.
       
      Code Block
      BOOTPROTO=none
      DEVICE=eth0
      HWADDR=aa:bb:cc:dd:ee:ff
      MASTER=bond0
      #MTU=9000
      NM_CONTROLLED=no
      NOZEROCONF=yes
      ONBOOT=yes
      SLAVE=yes
      TYPE=Ethernet
      
      
  • Edit /etc/sysconfig/network-scripts/ifcfg-eth1.
    • Adjust the HWADDR to match the actual MAC address of the port.
      • Run "/sbin/ifconfig -a" to report this.
    • Notice the "DEVICE" name is different than ifcfg-eth0.
    • Notice that all other settings are identical to ifcfg-eth0.
    • Code Block
      BOOTPROTO=none
      DEVICE=eth1
      HWADDR=aa:bb:cc:dd:ee:ff
      MASTER=bond0
      MTU=9000
      # Uncomment for jumbo frames
      #MTU=9000
      NM_CONTROLLED=no
      NOZEROCONF=yes
      ONBOOT=yes
      SLAVE=yes
      TYPE=Ethernet
      
      
  • Edit /etc/sysconfig/network-scripts/ifcfg-bond0.
    • Notice the BONDING_OPTS, suitable for fail-over bonding and 100 msec failovers.
      Code Block
      ARP=noARP=no
      BONDING_OPTS="mode=1 miimon=100"
      BOOTPROTO=static
      BRIDGE=br0
      DEVICE=bond0
      MTU
      # Uncomment for jumbo frames
      #MTU=9000
      NM_CONTROLLED=no
      ONBOOT=yes
      
      
  • Edit /etc/sysconfig/network-scripts/ifcfg-br0.
    • This selects the appropriate bridge for KVM based virtualization.
      Code Block
      BOOTPROTO=static
      DEVICE=br0
      GATEWAY=192.168.1.xxx
      IPADDR=192.168.1.yyy
      NETMASK=255.255.255.0
      NM_CONTROLLED=no
      ONBOOT=yes
      SLAVE=bond0
      TYPE=Ethernet