|
NAMEng_one2many —
packet multiplexing netgraph node type
SYNOPSIS#include <sys/types.h>
#include
<netgraph/ng_one2many.h>
DESCRIPTIONTheone2many provides a simple mechanism for routing
packets over several links in a one-to-many (and in the reverse direction,
many-to-one) fashion. There is a single hook named
one , and multiple hooks named
many0 , many1 , etc. Packets
received on any of the many hooks are forwarded out
the one hook. Packets received on the
one hook are forwarded out one or more of the
many hooks; which hook(s) is determined by the node's
configured transmit algorithm. Packets are not altered in any way.
Each of the connected many links may be considered to be up or down. Packets are never delivered out a many hook that is down. How a link is determined to be up or down depends on the node's configured link failure detection algorithm. Before an interface or link can be plumbed into a group, its status must be marked as being “up”. This is normally setup during the initial boot stages by rc.conf(5). It is also possible to change an interface's status to “up” by using the ifconfig(8) utility. TRANSMIT ALGORITHMS
In the future other algorithms may be added as well. LINK FAILURE DETECTIONThe node distinguishes between active and failed links. Data is sent only to active links. The following link failure detection algorithms are available:
In the future other algorithms may be added as well. When all links are considered failed, node sends the
HOOKSThis node type supports up toNG_ONE2MANY_MAX_LINKS
hooks named many0 , many1 ,
etc., plus a single hook named one .
CONTROL MESSAGESThis node type supports the generic control messages, plus the following:
SHUTDOWNThis node shuts down upon receipt of aNGM_SHUTDOWN
control message, or when all hooks have been disconnected.
EXAMPLESThe following commands will set up Ethernet interfacesfxp0 to deliver packets alternating over the physical
interfaces corresponding to networking interfaces fxp0
through fxp3 :
# Plumb nodes together ngctl mkpeer fxp0: one2many upper one ngctl connect fxp0: fxp0:upper lower many0 ngctl connect fxp1: fxp0:upper lower many1 ngctl connect fxp2: fxp0:upper lower many2 ngctl connect fxp3: fxp0:upper lower many3 # Allow fxp1 through fxp3 to xmit/recv fxp0 frames ngctl msg fxp1: setpromisc 1 ngctl msg fxp2: setpromisc 1 ngctl msg fxp3: setpromisc 1 ngctl msg fxp1: setautosrc 0 ngctl msg fxp2: setautosrc 0 ngctl msg fxp3: setautosrc 0 # Configure all four links as up ngctl msg fxp0:upper \ setconfig "{ xmitAlg=1 failAlg=1 enabledLinks=[ 1 1 1 1 ] }" # Bring up interface ifconfig fxp0 192.168.1.1 netmask 0xfffffffc With a similar setup on a peer machine (using the address 192.168.1.2), a point-to-point Ethernet connection with four times normal bandwidth is achieved. SEE ALSOnetgraph(4), ng_bridge(4), ng_ether(4), ng_hub(4), ifconfig(8), ngctl(8)HISTORYTheng_one2many node type was implemented in
FreeBSD 4.2.
AUTHORSTheone2many netgraph node (with round-robin algorithm)
was written by Archie Cobbs
<archie@FreeBSD.org>.
The all algorithm was added by Rogier R. Mulhuijzen
<drwilco@drwilco.net>.
BUGSMore transmit and link failure algorithms should be supported. A good candidate is Cisco's Etherchannel.
Visit the GSP FreeBSD Man Page Interface. |