목적은 이런이유라하는군 arp 맞구만…
https://www.kernel.org/doc/Documentation/networking/bonding.txt
The "active" fail_over_mac policy indicates that the
MAC address of the bond should always be the MAC
address of the currently active slave. The MAC
address of the slaves is not changed; instead, the MAC
address of the bond changes during a failover.
This policy is useful for devices that cannot ever
alter their MAC address, or for devices that refuse
incoming broadcasts with their own source MAC (which
interferes with the ARP monitor).
The down side of this policy is that every device on
the network must be updated via gratuitous ARP,
vs. just updating a switch or set of switches (which
often takes place for any traffic, not just ARP
traffic, if the switch snoops incoming traffic to
update its tables) for the traditional method. If the
gratuitous ARP is lost, communication may be
disrupted.
When this policy is used in conjunction with the mii
monitor, devices which assert link up prior to being
able to actually transmit and receive are particularly
susceptible to loss of the gratuitous ARP, and an
appropriate updelay setting may be required.
타입별로 나눠지는듯하네.
http://shibaboy.com/?tag=bonding
일반적으로 쓰는 것은 mode1 이니
Mac address를 가져가는 이유는 fault-tolerance 보장 (session 정보와 switch ARP가 매핑되어있으므로 동일하게 가져가야 함)
· mode0 / Load-Balancing (Round-Robin) / “balanced-rr”
o 이 모드는 각 패킷을 시퀀셜하게 각 링크 별로 하나씩 번갈아가며 보낸다. 가장 기본적인 bonding이며 이를 통하여 each bandwidth * nics 만큼의 network throughput을 가능케 할 수 있다. load-balancing과 fault-tolerance를 보장한다.
· mode1 / Active-Backup “active-backup”
o 한 개의 링크만이 active되어 있는 상태이다. 살아있는 링크가 죽으면 backup링크가 그 역할을 받아 수행한다. bonding된 링크의 MAC 주소는 master 상태의 링크에만 할당이 되며 각 링크가 active되어 있는지의 상태에 따라 해당 MAC 주소를 주고 받는다. fault-tolerance를 보장
· mode2 / Load-Balancing (XOR algorithm) “balance-xor”
o 모든 링크들이 active되어 있으며 데이터를 보내는 것은 source MAC 주소와 destination MAC주소를 XOR 하여 결정된다. load-balancing과 fault-tolerance를 보장한다.
· mode3 / Broadcast (Link Duplication) “broadcast”
o 이 방식은 여타 bonding과는 좀 다른 방식이다. 각각의 묶여진 링크들은 모드 active되어 있으며 모든 트래픽을 broadcast로 내보낸다. 이 방식은 HA를 위한 각각의 broadcast 도메인으로 데이터를 보내는 경우 유용하게 쓰일 수 있다.
· mode4 / LACP (802.3ad Link-Aggregation control Protocol) “802.3ad”
o IEEE 표준의 link aggregation이다. LACP를 이용하여 통신을 하게 되며 해당 모드는 스위치에서 이 기능을 지원해야 사용 가능하다. 받는 쪽과 보내는 쪽, switch 모두가 LACP기능이 활성화 되어있어야 한다.
· mode5 / Load-Balancing (Adaptive Transmit Load-Balancing) “balance-tlb”
o 이 모드는 특별한 지원이 없이 자체적으로 구동가능한 방법으로 각 링크의 현재 load에 따라 보내는 데이터는 분산되어 전송된다. 데이터의 수신은 현재 slave쪽으로만 가게되며 해당 slave가 fail시, 다른 slave가 MAC 주소를 넘겨받아 수신한다. 데이터를 보낼 때에 드라이버가 MAC address를 링크의 것으로 바꿔 보내지만 받을 때에는 그냥 남겨둔다.
· mode6 / Load-Balancing (Adaptive Load-Balancing) “balance-alb”
o 이 모드는 mode5와 같이 동작하지만 데이터 수신 시에도 load-balancing을 하는데 두개의 링크에서 ARP negotiation을 통하여 동작한다. MAC 주소 트릭을 이용하여 데이터를 보내고 받을 때에 load-balancing을 하게 된다.