If you have 2 NICs then you will probably want them to work side by side as one. This will allow double the throughput and also, if one goes down, the other can retain network connectivity. Bonding is also known as Teaming
Under CentOS, this is done by the following steps.
Create this file: /etc/sysconfig/network-scripts/ifcfg-bond0
Add the following details:
You can also use DHCP there if you like by changing BOOTPROTO=dhcp and removing the lines containing IPs
It should read:
This will make it a slave of bond0 and read the ip details from it.
If you are having trouble with auto-negotiation of link (ie. it connects with half duplex) you can add the following to your eth0 and eth1 files: ETHTOOL_OPTS=”speed 100 duplex full autoneg off”
Now you need to edit /etc/modprobe.conf and append the following lines:
alias bond0 bonding
options bond0 mode=1 miimon=100
mode=1 means active backup. This leaves eth0 connected and transmitting data. Eth1 will be left dorment and will automatically become active when the eth0 fails (cable unplugged or switch failure, etc).
Finally, you can type
# modprobe mode=1 miimon=100
# service network restart
reboot your system.
Your NICs should now be bonded and ready for use.
NOTE. the system may take a minute to come back up depending on your network.