Ready to do a KVM virtual session, the physical machine with dual NIC configuration, plan to bind the dual network adapter and then configure the bridge.
1. Under/etc/sysconfig/network-scripts/, create the file ifcfg-bond0, config file:
Device=bond0
Bootproto=none
Onboot=yes
netmask=255.255.255.0
ipaddr=192.168.2.227
Userctl=no
2.Bond0 binds two NICs eth0 and eth1, the original configuration needs to make some modifications
Eth0 IP and mask before annotations
Device=eth0
hwaddr=00:0c:29:f4:02:4e
Type=ethernet
uuid=3c639811-445b-4b1c-b6f8-e4179ff1701e
Onboot=yes
Nm_controlled=yes
Bootproto=none
#IPADDR =192.168.2.225
#NETMASK =255.255.255.0
Master=bond0
Slave=yes
Userctl=no
Eth1 the same comment off the IP and mask
Device=eth1
Hwaddr=00:0c:29:f4:02:44
Type=ethernet
uuid=42534ee0-abc2-4816-a643-ff7deba98d8d
Onboot=yes
Nm_controlled=yes
Bootproto=none
#IPADDR =192.168.2.226
#NETMASK =255.255.255.0
Master=bond0
Slave=yes
Userctl=no
3. Module Loading editor /etc/modprobe.d/dist.conf
Alias Bond0 Bonding
Options Bond0 miimon=100 mode=0 max_bonds=2
4. Restart the network
Note:
Miimon is used for link monitoring. For example: miimon=100, the Unit is MS (MS) this side of 100, is 100ms, that is, 0.1 seconds then the system every 100MS monitoring link connection status, if there is a line does not pass to another line; Mode value indicates the mode of operation, he has 0,1,2,3 four modes, Commonly used is 0, 12 kinds.
Mode There are seven types (0~6), which explain two common options.
mode=0 : Indicates that load balancing (round-robin) is balanced, and both NICs are working.
mode=1 Span style= "padding:0px;margin:0px;font-family: ' The song Body '; Color:rgb (77,109,243); font-size:12px;" >: fault-tolerance (active-backup) provides redundancy, working in a way that the primary and standby work, where a network card is working (if the eth0 is broken), then automatically switch to another block network card (eth1 do Backup).
Bonding link monitoring can only be provided, i.e. whether the link from the host to the switch is connected. If only the switch's external link is down, and the switch itself does not fail, then bonding will assume that the link is not a problem and continue to use it.
Record the two-card bindings for CentOS once