Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
I have two questions regarding server networking, using Ethernet. They are as much theoretical questions as practical, and I appreciate advice both on existing software to do this, and whether it can be easily implemented but hasn't been.
Ok, 2 scenarios:
1) I have a network with a Gigabit-capable switch. Is there a way to use a server with two 10/100 cards, combine the bandwidth to the same switch, and have it effectively run 200 Mbps?
2) Failover - Server X is connected to two seperate switches on two seperate networks. The cards are eth0 and eth1 and they are both 10/100 Ethernet cards. Is there a way to configure it so that it uses eth0, but if eth0 goes down, it will (as absolutely quickly as possible) failover and use eth1?
1) yep, you'd use the bond module to combine them to an 802.3ad trunk.
2) you mean two seperate subnets or two connections to the same ip subnet? again the bond module can fail between two cards, but that'll abstract back to a bond0 interface, which will appear the same as the trunk option but with lower capacity. if you're wanting a non bonded approach, check linux-ha.org for a lot of useful information about heartbeat checks and such.
I want as much redundancy/fault tolerance as possible.
Is it possible to have two NIC's in one machine with the same IP?
i.e. in a simple example, I have a database program on a computer called CLIENT, and mySQL on SERVER.
I want to have one switch, called A, that is connected to eth0 in CLEINT (192.168.0.2) and eth0 in SERVER (192.168.0.3).
Then, I want a second switch, called B, that is connected to eth1 in CLIENT (also 192.168.0.2) and eth1 in SERVER (also 192.168.0.3).
The idea being, if Switch A blows up, loses power, gets run over by a spaceship, etc. CLIENT will still be able to connect to mySQL on 192.168.0.3, just going through a different set of NIC's, wires, and switch.
yes absolutely, so the bond module is definitely the direction to go in. this has a number of modes that change the way two (or more) nics are handled. if you're talking cisco switches, somethign like the 3750's then they do funky stacking where you can use two active nics on the server going to one port on each switch, and bond with a full 802.3ad trunk (mode 4 for bond module i think). here is one switch dies, nothign even fails over, you simply go from a 2gb (or 200mb) link down to a 1gb (or 100mb) link... that's just about as good as it gets really, but for a more basic implementation bond can manage the failover with an active/passive nic setup just fine. in fact, i think you can have an active/semi-active setup on the linux side where traffic will be pushed out of both nics but will only arp on one nic, so which two wholly seperate switches you still have nice resillient traffic flow over both switches, meaning you know they are working. if you run vlans you can even split vlans between switches further. neat stuff, but basically read the bond docs tofind the scenario that suits you best. at it's most default i think it's just a case of loading the module and it'll pick a safe a/p default and off you go.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.