...
- 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 pair 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
- These notes are based on the network devices being called "eth0", "eth1", etc.
- Edit as necessary for devices referred to as "em0", "em1", etc.
- Run "/sbin/ifconfig -a" to get the list of all available devices and their MAC addresses.
- Edit /etc/sysconfig/network-scripts/ifcfg-eth0.
- Make sure that HWADDR in this file the actual MAC address of the port.
- Confirm this with "/sbin/ifconfig eth0".
- 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
- Make sure that HWADDR in this file the actual MAC address of the port.
- Edit /etc/sysconfig/network-scripts/ifcfg-eth1.
- Adjust the HWADDR to match the actual MAC address of the port.
- Run "/sbin/ifconfig -aeth1" 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 # Uncomment for jumbo frames #MTU=9000 NM_CONTROLLED=no NOZEROCONF=yes ONBOOT=yes SLAVE=yes TYPE=Ethernet
- Adjust the HWADDR to match the actual MAC address of the port.
- Edit /etc/sysconfig/network-scripts/ifcfg-bond0.
- Notice the BONDING_OPTS, suitable for fail-over bonding and 100 msec failover times.
Code Block ARP=noARP=no BONDING_OPTS="mode=1 miimon=100" BOOTPROTO=static BRIDGE=br0 DEVICE=bond0 # Uncomment for jumbo frames #MTU=9000 NM_CONTROLLED=no ONBOOT=yes
- Notice the BONDING_OPTS, suitable for fail-over bonding and 100 msec failover times.
- 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=EthernetBridge
- This selects the appropriate bridge for KVM based virtualization.