If the server has two fast network card can bind it to a virtual network card, if a network card is broken another piece can continue to work, increased redundancy and load, the specific practices are as follows:
Create a new virtual network card with the following command:
Iv/etc/sysconfig/network-scripts/ifcfg-bond0
Enter in the file:
Device=bond0
Bootproto=static
ipaddr=192.168.0.231
netmask=255.255.255.0
Onboot=yes
Type=ethernet
Exit after saving
Then modify Ifcfg-eth0 and ifcfg-eth1 two files
Vi/etc/sysconfig/network-scripts/ifcfg-eth0
Modified to:
Device=eth0
Bootproto=static
Slave=yes
Master=bond0
Onboot=yes
Type=ethernet
Vi/etc/sysconfig/network-scripts/ifcfg-eth1
Modified to:
Device=eth1
Bootproto=static
Slave=yes
Master=bond0
Onboot=yes
Type=ethernet
To configure the gateway:
Vi/etc/sysconfig/network
Modified to:
Networking=yes
Hostname=name
gateway=192.168.0.1
In/etc/modprobe.conf (in some versions, this file is modules.conf), add the following lines:
Alias Bond0 Bonding
Options Bond0 miimon=1000 model=0
Alias Eth0 e1000
Alias Eth1 e1000
Vi/etc/modprobe.conf
Modified to:
Alias Bond0 Bonding
Options Bond0 miimon=1000 model=0
Alias Eth0 e1000
Alias Eth1 e1000
Alias Scsi_hostadapter Mptbase
Alias Scsi_hostadapter1 Mptscsih
Alias Scsi_hostadapter2 MegaRAID
Alias Usb-controller USB-UHCI
Alias Usb-controller1 EHCI-HCD
Save exit and restart the network.
Service Network restart
After reboot, unplug a network cable or stop a NIC, and does not affect Internet services.