Hi,

Antoine Jacoutot wrote:
I'm having a hard time understanding _precisely_ the 2 modes for trunk(4).
Can anyone confirm this (using 2 physical interfaces to create a trunk and a
crappy 100Mbs non-manageable switch):


you should use failover mode with the non-manageable switch.

- failover
 -> send on master interface (100Mbs)
 -> receive on both interfaces (200Mbs)
 -> if one interface cable is unplugged, trunk keeps working


- send on the active master interface
- receive on the active master interface, drop any other packets
- if master interface is unplugged, failover to the next one

-> works very reliable, is easy to implement and the ideal extension for
redundant firewalls with carp + pfsync. no gain in performance.

this doesn't requires any configuration on the switch and even works
with hubs(!) because we drop packets received on non-active ports. there
was a bug in the 3.9 manpage: failover mode does NOT receive on all
member interfaces at the same time.

- roundrobin
 -> send on both interfaces (200Mbs)
 -> receive on both interfaces (200Mbs)
 -> if one interface cable is unplugged, trunk becomes non-functional (this is
what I'm experiencing)


- send on all active interfaces, using a per-packet roundrobin scheduler
- receive on all active interfaces
- if one interface is unplugged, skip it and use the next active one.
- trunk keeps running, as long as at least one interface is active ;)

-> is a simple alg and may increase the perfomance if both l2 endpoints
support roundrobin mode.

roundrobin mode requires special configuration on the switch, using
protos like HP trunk or Cizzco ether/port-channel. you can also use
with a bunch of x-link cables between two systems using trunk or
connections over different switches/hubs. nevertheless, some switches
seem to have problems with openbsd running in roundrobin mode (some
Cizzco-Eeehs), so i implemented a third and hopefully the last mode:
loadbalance.

- balance outgoing traffic across the active ports based on
hashed protocol header information. the hash includes the
ethernet source and destination address, and, if available, the
vlan tag, and the ipv4/ipv6 source and destination address.
- receive on all active interfaces
- if one interface is unplugged, skip it and use the next active one.
- trunk keeps running, as long as at least one interface is active ;)

-> will increase the performance for aggregated connections from
different ip/layer 2 hosts. loadbalancing is the default mode of
most of the switch implementations.

If the above it true, is there a way to make roundrobin works even when a cable
is unplugged?


it depens on the switch configuration and the network interfaces you're
using. some old NICs may not report the link state correctly.

Thanks in advance.
Regards,


btw.,
most of the vendors lie about the performance. you'll never get n times
of the performance in port trunks, ie. an 5000Mbps link by aggregating
5 GigE interfaces... that's nonsense! since their default mode is
similar to loadbalance, you may get additional performance on busy
switches with lots of different src/dst connections. normally they
do source-mac or source-destination-mac hashing, which is only useful
for bridges, but not for ip routers... openbsd's loadbalance mode
includes the ip src/dst addresses in the hash and some switches allow
to manually enable ip-src-dst hashing.

reyk

Reply via email to