Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 18 Feb 2009 14:21:34 +0200
From:      Artis Caune <artis.caune@gmail.com>
To:        freebsd-pf@freebsd.org
Subject:   weighted rrd
Message-ID:  <9e20d71e0902180421h74344e8epb3dbbb35687d5c7f@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
Hi,

I'm using redundant firewalls with carp and redirecting smtp traffic
to internal cluster of boxes:
    mx_external = "1.1.1.1"
    table <mx_internal> const { 10.0.0.1, 10.0.0.2 }

    rdr on $ext_if proto tcp from <spamd-white> to $mx_external port
25 -> <mx_internal> round-robin

but problem is that some boxes are quad xeon, some old pentium 4 and I
need to weight connection count on each box (jus like cisco slb
weight).


I can do it like this:
    mx_external = "1.1.1.1"
    mx_internal = "10.0.0.1, 10.0.0.1, 10.0.0.1, 10.0.0.1, 10.0.0.2"
    table <mx_internal> const { $mx_internal }    # 10.0.0.1
duplicates are skipped

    rdr on $ext_if proto tcp from <spamd-white> to $mx_external port
25 -> { $mx_internal } round-robin

So server 10.0.0.1 get 4 connections and server 10.0.0.2 only one.

It just works, but maybe there are some nicer way of how to configure this?




-- 
regards,
Artis Caune

<----. CCNA | BSDA
<----|====================
<----' didii FreeBSD



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?9e20d71e0902180421h74344e8epb3dbbb35687d5c7f>