 |
The Web Hosting Tech Support Forum Get reliable, free and rapid technical support on any Web hosting issue
|
| View previous topic :: View next topic |
| Author |
Message |
Julia Member
Joined: 09 May 2006 Posts: 162
|
Posted: Mon Dec 14, 2009 11:53 am Post subject: How do you configure a second NIC card on a Centos server? |
|
|
Hello
I just purchased an HP DL360 server and I've installed Centos 5.3 on it.
The server features 2 NIC cards so I'd like to take advantage of a fully redundant setup, so that in case one of the NICs goes down on me (re- a hardware failure) the other NIC would take charge and there wouldn't be any downtime.
However, on my second NIC (eth1) I've placed the ONBOOT=yes parameter, and then I rebooted the server. The problem is that after the reboot my first NIC (the default eth0) won't come up and I can't SSH to the server using the IP that NIC was configured for. But I can still remote access the server through the second IP. I guess at this point something went wrong.
So I placed back the ONBOOT=no parameter for the second NIC but now of course I'm back to square one: My first NIC is ok but the second one still won't work.
So the question is: How can you configure a second NIC card in Centos 5.3? I'd like both card to work correctly.
Of course, they both have a different IP address in the same subnet.
Thank you for any help that you can provide. |
|
| Back to top |
|
 |
admin Site Admin
Joined: 09 May 2006 Posts: 614
|
Posted: Mon Dec 14, 2009 12:58 pm Post subject: |
|
|
Hello Julia
What you have done seems ok as far as we know.
But there might be something going on with either the driver of the cards or the configuration in Centos.
We can't really tell at this point.
The best would be to access the server and see the configuration from there.
Regards,
The tech support group,
Avantex Hosting
http://www.avantex.org/ |
|
| Back to top |
|
 |
strathcom Member
Joined: 21 Nov 2009 Posts: 64
|
Posted: Mon Dec 14, 2009 1:05 pm Post subject: |
|
|
Hi there admin; I'm working with Julia on this issue.
Thank you for your quick response, but if it be a software driver the server would not be able to correctly identify the NIC cards.
Instead, the server has no problem in 'seeing' both NICs and with their correct, individual MAC address.
This looks more to me as a config issue within Centos itsef.
I just thought you guys could have an idea of what is wrong here. I'd like to get this solved by tomorrow at the latest. I will go and check in the Centos forums, maybe they would know.
Thanks anyway for your time. |
|
| Back to top |
|
 |
admin Site Admin
Joined: 09 May 2006 Posts: 614
|
Posted: Mon Dec 14, 2009 3:43 pm Post subject: |
|
|
Hello Julia and Strathcom
You need to look into the "NIC bonding" options to get a better idea of what you need to do.
Hint: google "site:centos.org bonding"
There are about 8 or 9 ways to pull this off depending on a number of factors...
Hope this helps
The tech support group,
Avantex Hosting
http://www.avantex.org/ |
|
| Back to top |
|
 |
admin Site Admin
Joined: 09 May 2006 Posts: 614
|
Posted: Mon Dec 14, 2009 5:13 pm Post subject: |
|
|
(Found this for you)
Where should I use bonding?
You can use it wherever you need redundant links, fault tolerance or load balancing networks. It is the best way to have a high availability network segment. A very useful way to use bonding is to use it in connection with 802.1q VLAN support (your network equipment must have 802.1q protocol implemented).
Diverse modes of bonding
mode=1 (active-backup)
Active-backup policy: Only one slave in the bond is active. A different slave becomes active if, and only if, the active slave fails. The bond's MAC address is externally visible on only one port (network adapter) to avoid confusing the switch. This mode provides fault tolerance. The primary option affects the behavior of this mode.
mode=2 (balance-xor)
XOR policy: Transmit based on [(source MAC address XOR'd with destination MAC address) modulo slave count]. This selects the same slave for each destination MAC address. This mode provides load balancing and fault tolerance.
mode=3 (broadcast)
Broadcast policy: transmits everything on all slave interfaces. This mode provides fault tolerance.
mode=4 (802.3ad)
IEEE 802.3ad Dynamic link aggregation. Creates aggregation groups that share the same speed and duplex settings. Utilizes all slaves in the active aggregator according to the 802.3ad specification.
Prerequisites
Ethtool support in the base drivers for retrieving the speed and duplex of each slave.
A switch that supports IEEE 802.3ad Dynamic link aggregation. Most switches will require some type of configuration to enable 802.3ad mode.
mode=5 (balance-tlb)
Adaptive transmit load balancing: channel bonding that does not require any special switch support. The outgoing traffic is distributed according to the current load (computed relative to the speed) on each slave. Incoming traffic is received by the current slave. If the receiving slave fails, another slave takes over the MAC address of the failed receiving slave.
Prerequisite: Ethtool support in the base drivers for retrieving the speed of each slave.
mode=6 (balance-alb)
Adaptive load balancing: includes balance-tlb plus receive load balancing (rlb) for IPV4 traffic, and does not require any special switch support. The receive load balancing is achieved by ARP negotiation. The bonding driver intercepts the ARP Replies sent by the local system on their way out and overwrites the source hardware address with the unique hardware address of one of the slaves in the bond such that different peers use different hardware addresses for the server.
Also you can use multiple bond interface but for that you must load the bonding module as many as you need.
Example:
In the /etc/modprobe.conf file add the following:
alias bond0 bonding
options bond0 miimon=80 mode=5In the /etc/sysconfig/network-scripts/ directory create ifcfg-bond0:
DEVICE=bond0
IPADDR=<ip address>
NETMASK=
NETWORK=
BROADCAST=
GATEWAY=
ONBOOT=yes
BOOTPROTO=none
USERCTL=no
Change the ifcfg-eth0 to:
DEVICE=eth0
ONBOOT=yes
BOOTPROTO=none
USERCTL=no
MASTER=bond0
SLAVE=yes
Then change the ifcfg-eth1 to:
DEVICE=eth1
ONBOOT=yes
BOOTPROTO=none
USERCTL=no
MASTER=bond0
SLAVE=yes
That´s all really-- Now your trunk should be up and running, and you should have full and complete NIC redundancy.
The tech support group,
Avantex Hosting
http://www.avantex.org/ |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
You wish to advertise on our forum? Contact us for rates.
Powered by phpBB © 2001, 2005 phpBB Group
|