Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Other *NIX Forums > *BSD
User Name
*BSD This forum is for the discussion of all BSD variants.
FreeBSD, OpenBSD, NetBSD, etc.


  Search this Thread
Old 07-26-2017, 03:43 AM   #1
LQ Newbie
Registered: Feb 2017
Distribution: Slackware, FreeBSD, pfSense
Posts: 7

Rep: Reputation: Disabled
OpenBSD pf round-robin weight


Using this guide I've successfully done configuring pf load balancing multiwan.
( )
However, my two connections should be weighted 1:15.
In the pf.conf manual ( ) I've read (for me) some obscure
reference to it at the round-robin section, but no example.

Can you provide me some instructions or reference how to do it?

Thanks in advance
Old 07-26-2017, 05:39 AM   #2
Registered: Jan 2016
Distribution: None. Just OpenBSD.
Posts: 131

Rep: Reputation: 45
There is an example of round-robin weights in pf.conf(5):
     In this example, a NAT gateway is set up to translate internal addresses
     using a pool of public addresses (  A given source address
     is always translated to the same pool address by using the source-hash
     keyword.  The gateway also translates incoming web server connections to
     a group of web servers on the internal network.

         match out on $ext_if inet from any to any nat-to \
         match in  on $ext_if proto tcp from any to any port 80 \
             rdr-to { weight 2, weight 1, \
             weight 8 } round-robin
The GRAMMAR section shows weight defined as a component of a host.
1 members found this post helpful.
Old 07-27-2017, 01:01 AM   #3
LQ Newbie
Registered: Feb 2017
Distribution: Slackware, FreeBSD, pfSense
Posts: 7

Original Poster
Rep: Reputation: Disabled
Indeed, thank you! I should read more carefully...
Now the config looks like this and I'm getting the full speed of my connections:

pass in on $lan_if from $lan_net \
route-to { ($wan_if $wan_gw) weight 1, ($wan2_if $wan2_gw) weight 15 } \


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Round Robin DNS biosboy4 Linux - Networking 5 08-28-2015 09:57 AM
round robin dns linuxengineer Linux - Server 1 11-16-2010 03:55 AM
round robin dns linuxengineer Linux - Networking 1 11-16-2010 03:54 AM
Round Robin with Squid marche Linux - Newbie 0 12-19-2008 10:00 AM
round robin for servers deepagodkhindi Programming 5 05-11-2003 05:50 AM > Forums > Other *NIX Forums > *BSD

All times are GMT -5. The time now is 09:36 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration