KVM + NIC Bonding

If you want to know about NIC bonding combined with KVM usage, simply read the official KVM HOWTO. There are some known bugs with mode 0 and 6 (primarly used for load balancing), apparently the fix can be found on this page. For me to get the mode 1 (active-backup) working correctly i had to change the bonding config file as follows:

alias bond0 bonding
options bond0 miimon=100 mode=1 primary=eth0

and activate the STP protocol on the bridge. edit /etc/sysconfig/network-scripts/ifcfg-bridge0 and add

STP="on"

Broken pipe error on SSH session

The "broken pipe" occurs when a SSH sessions times out. To resolve this you have 2 possibilities:

Server-Side (Linux):

  • open /etc/ssh/sshd_config
    # vim /etc/ssh/sshd_config
  • uncomment the lines:
    TCPKeepAlive Yes
    ClientAliveInterval 0 (change the 0 to 60, so every 60 seconds a keep alive packet is sent)
  • save the config
  • restart ssh server
    # service sshd restart

Client-Side (MacOSX/Linux):

  • open ~/.ssh/ssh_config (linux) or ~/.ssh/config (MacOSX)
  • add following lines:
    ServerAliveInterval 60 (send packet every 60 seconds)
  • save file