LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > *BSD
User Name
Password
*BSD This forum is for the discussion of all BSD variants.
FreeBSD, OpenBSD, NetBSD, etc.

Notices


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

Rep: Reputation: Disabled
OpenBSD pf round-robin weight


Hi!

Using this guide I've successfully done configuring pf load balancing multiwan.
( https://www.openbsd.org/faq/pf/pools.html )
However, my two connections should be weighted 1:15.
In the pf.conf manual ( http://man.openbsd.org/pf.conf ) 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, 06:39 AM   #2
jggimi
Member
 
Registered: Jan 2016
Distribution: None. Just OpenBSD.
Posts: 103

Rep: Reputation: 37
There is an example of round-robin weights in pf.conf(5):
Code:
     In this example, a NAT gateway is set up to translate internal addresses
     using a pool of public addresses (192.0.2.16/28).  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 192.0.2.16/28 \
             source-hash
         match in  on $ext_if proto tcp from any to any port 80 \
             rdr-to { 10.1.2.155 weight 2, 10.1.2.160 weight 1, \
                      10.1.2.161 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, 02:01 AM   #3
kzl
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:

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


Reply


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 10:57 AM
round robin dns linuxengineer Linux - Server 1 11-16-2010 04:55 AM
round robin dns linuxengineer Linux - Networking 1 11-16-2010 04:54 AM
Round Robin with Squid marche Linux - Newbie 0 12-19-2008 11:00 AM
round robin for servers deepagodkhindi Programming 5 05-11-2003 06:50 AM

LinuxQuestions.org > Forums > Other *NIX Forums > *BSD

All times are GMT -5. The time now is 03:32 AM.

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