导航栏

openbsd下的trunk模式和配置.

发表于:技术相关 2006-06-268:08 阅读量:1,234

openbsd支持trunk的三种模式: roundrobin (the de-fault), failover,?none.

trunk的配置 可以参考 man trunk.
喜欢它的文档.有必要养成看文档的习惯, 即使是E文.
我的设备有4块网卡 fxp0,fxp1,fxp2,fxp3
前两块做adsl负载均衡,那么后两块网卡做 failover.
有条件试试,?脚本要小改一下.本质问题就是pf是否支持trunk网口 ^_^

man trunk

TRUNK(4) OpenBSD Programmer's Manual? TRUNK(4)
NAME
trunk - link aggregation and link failover interface
SYNOPSIS
pseudo-device trunk [count]
DESCRIPTION
The trunk interface allows aggregation of multiple network interfaces as
one virtual trunk interface.
? A trunk interface can be created using the ifconfig trunkN create com-
mand.? It can use different link aggregation protocols specified using
the trunkproto proto option.? Child interfaces can be added using the
trunkport child-iface option and removed using the -trunkport child-iface
option.
? The driver currently supports the trunk protocols roundrobin (the de-
fault), failover, and none.? The roundrobin protocol distributes outgoing
traffic using a round-robin scheduler through all active ports; the
failover protocol sends outgoing traffic only through the master or the
next active port.? Both protocols receive traffic from all attached
ports.? The interface link state is used to validate if the port is ac-
tive or not.? The none protocol is intended to do nothing: it disables
any traffic without disabling the trunk interface itself.
? The configuration can be done at runtime or by setting up a
hostname.if(5) configuration file for netstart(8).
EXAMPLES
Create a simple round robin trunk with two bge(4) Gigabit Ethernet inter-
faces:
? # ifconfig bge0 up
# ifconfig bge1 up
# ifconfig trunk0 trunkport bge0 trunkport bge1
192.168.1.1 netmask 255.255.255.0
? The following example uses an active failover trunk to set up roaming be-
tween wired and wireless networks using two network devices.? Whenever
the wired master interface is unplugged, the wireless failover device
will be used:
? # ifconfig em0 up
# ifconfig ath0 192.168.1.1 netmask 255.255.255.0 nwid my_net
# ifconfig trunk0 trunkproto failover trunkport em0 trunkport ath0
192.168.1.1 netmask 255.255.255.0
SEE ALSO
inet(4), hostname.if(5), ifconfig(8), netstart(8)
HISTORY
The trunk device appeared in OpenBSD 3.8.
AUTHORS
The trunk driver was written by Reyk Floeter <reyk@openbsd.org>.
OpenBSD 3.9? May 5, 2005? 1

发表于:技术相关上一篇: 下一篇: