Макисм, спасибо - bonding.txt я читал, как и LARTC.
А вот с современными свичами я знаком куда хуже
Как реализовать failover only - вроде бы достаточно понятно.
А вот что нужно, чтобы в нормальной ситуации были и HA,
и load balancing - пока не уверен, что знаю.
2010/10/4 Max Speransky
Хм, bonding.txt из линуксведра вполне раскрывает эту тему
2) HA on two or more switches (or a single switch without trunking support) --------------------------------------------------------------------------- This mode is more problematic because it relies on the fact that there are multiple ports and the host's MAC address should be visible on one port only to avoid confusing the switches.
If you need to know which interface is the active one, and which ones are backup, use ifconfig. All backup interfaces have the NOARP flag set.
To use this mode, pass "mode=1" to the module at load time :
# modprobe bonding miimon=100 mode=1
Or, put in your /etc/modules.conf :
alias bond0 bonding options bond0 miimon=100 mode=1
Example 1: Using multiple host and multiple switches to build a "no single point of failure" solution.
| | |port3 port3| +-----+----+ +-----+----+ | |port7 ISL port7| | | switch A +--------------------------+ switch B | | +--------------------------+ | | |port8 port8| | +----++----+ +-----++---+ port2||port1 port1||port2 || +-------+ || |+-------------+ host1 +---------------+| | eth0 +-------+ eth1 | | | | +-------+ | +--------------+ host2 +----------------+ eth0 +-------+ eth1
In this configuration, there are an ISL - Inter Switch Link (could be a trunk), several servers (host1, host2 ...) attached to both switches each, and one or more ports to the outside world (port3...). One an only one slave on each host is active at a time, while all links are still monitored (the system can detect a failure of active and backup links).
Each time a host changes its active interface, it sticks to the new one until it goes down. In this example, the hosts are not too much affected by the expiration time of the switches' forwarding tables.
If host1 and host2 have the same functionality and are used in load balancing by another external mechanism, it is good to have host1's active interface connected to one switch and host2's to the other. Such system will survive a failure of a single host, cable, or switch. The worst thing that may happen in the case of a switch failure is that half of the hosts will be temporarily unreachable until the other switch expires its tables.
Example 2: Using multiple ethernet cards connected to a switch to configure NIC failover (switch is not required to support trunking).
+----------+ +----------+ | |eth0 port1| | | Host A +--------------------------+ switch | | +--------------------------+ | | |eth1 port2| | +----------+ +----------+
On host A : On the switch : # modprobe bonding miimon=100 mode=1 # (optional) minimize the time # ifconfig bond0 addr # for table expiration # ifenslave bond0 eth0 eth1
Each time the host changes its active interface, it sticks to the new one until it goes down. In this example, the host is strongly affected by the expiration time of the switch forwarding table.
3 октября 2010 г. 23:52 пользователь Michael Bochkaryov
написал: Мое почтение всем!
Не подскажет ли кто направление копания в такой задаче?
Имеется: 1) 2 сервера на linux c 2 x ethernet 2) 2 управляемых свича с поддержкой link aggregation 802.3ad
Нужно организовать "шибко надежный" ethernet для парочки серверов. Чтобы как при вылете порта, так и при вылете одного из свичей сетка продолжала работать, пускай и с меньшей скоростью.
Можно ли link aggregation организовать на портах в разных свичах? Или нужно на уровне IP это разруливать (чего не хочется)?
Заранее спасибо :)
-- Regards, Michael Bochkaryov Net.Style - VoIP and VAS development www.netstyle.com.ua
-- Yours, Max
-- Regards, Michael Bochkaryov Net.Style - VoIP and VAS development www.netstyle.com.ua