summaryrefslogtreecommitdiffstats
path: root/usr.sbin/relayd/relayd.conf.5
diff options
context:
space:
mode:
authorblambert <blambert@openbsd.org>2014-08-29 09:03:36 +0000
committerblambert <blambert@openbsd.org>2014-08-29 09:03:36 +0000
commitd4264a38a83e18d7be76b3d80edc3b2118a5efcf (patch)
tree836f22463334dbe3c9380f09ca1148b584bb88b8 /usr.sbin/relayd/relayd.conf.5
parentThe image/x-ms-bmp extension is bmp, not mp. (diff)
downloadwireguard-openbsd-d4264a38a83e18d7be76b3d80edc3b2118a5efcf.tar.xz
wireguard-openbsd-d4264a38a83e18d7be76b3d80edc3b2118a5efcf.zip
Implement consistent host hashing for relayd, based on
work done by andre@ Re-add a randomized hash seed (which had apparently gotten inadvertently removed in the past). Allows for multiple relayd instances to be configured to forward traffic to the same host, falling back to the random seed when not explicitly configured to do so. ok reyk@
Diffstat (limited to 'usr.sbin/relayd/relayd.conf.5')
-rw-r--r--usr.sbin/relayd/relayd.conf.522
1 files changed, 17 insertions, 5 deletions
diff --git a/usr.sbin/relayd/relayd.conf.5 b/usr.sbin/relayd/relayd.conf.5
index 24f823fcd60..93800a18cb0 100644
--- a/usr.sbin/relayd/relayd.conf.5
+++ b/usr.sbin/relayd/relayd.conf.5
@@ -1,4 +1,4 @@
-.\" $OpenBSD: relayd.conf.5,v 1.147 2014/07/11 16:59:38 reyk Exp $
+.\" $OpenBSD: relayd.conf.5,v 1.148 2014/08/29 09:03:36 blambert Exp $
.\"
.\" Copyright (c) 2006 - 2014 Reyk Floeter <reyk@openbsd.org>
.\" Copyright (c) 2006, 2007 Pierre-Yves Ritschard <pyr@openbsd.org>
@@ -15,7 +15,7 @@
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
-.Dd $Mdocdate: July 11 2014 $
+.Dd $Mdocdate: August 29 2014 $
.Dt RELAYD.CONF 5
.Os
.Sh NAME
@@ -390,7 +390,7 @@ This will override the global timeout, which is 200 milliseconds by default.
The following options will set the scheduling algorithm to select a
host from the specified table:
.Bl -tag -width Ds
-.It Ic mode hash
+.It Ic mode hash Op Ic seed Ar string
Balances the outgoing connections across the active hosts based on the
hashed name of the relay, the hashed name of the table, and the IP
address and port of the relay.
@@ -406,7 +406,7 @@ active
.Xr pf 4
states.
This mode is only supported by redirections.
-.It Ic mode loadbalance
+.It Ic mode loadbalance Op Ic seed Ar string
Balances the outgoing connections across the active hosts based on the
hashed name of the relay, the hashed name of the table, the source IP
address of the client, and the IP address and port of the relay.
@@ -419,12 +419,24 @@ Distributes the outgoing connections using a round-robin scheduler
through all active hosts.
This is the default mode and will be used if no option has been specified.
This mode is supported by redirections and relays.
-.It Ic mode source-hash
+.It Ic mode source-hash Op Ic seed Ar string
Balances the outgoing connections across the active hosts based on the
hashed name of the redirection or relay, the hashed name of the table,
and the source IP address of the client.
This mode is only supported by relays.
.El
+.Pp
+For the
+.Ic hash ,
+.Ic loadbalance ,
+and
+.Ic source-hash
+modes, a random 32-bit hash seed is chosen during configuration.
+In order to facilitate consistent hashing between instances of
+.Xr relayd 8
+operating on multiple hosts, an explicit
+.Ic seed
+string may be specified.
.Sh REDIRECTIONS
Redirections represent a
.Xr pf 4