Forum Discussion

jnowlin_44976's avatar
Icon for Nimbostratus rankNimbostratus
Nov 09, 2011

redirect to specific pool member based on subnet

i am looking for a way to redirect clients based on their subnet to specific pool members. and then if they do not match a subnet speficified they are load balanced between the pool members. i have seen some examples close to this but mainly dealing with redirecting clients to seperate pools. preferably if i could have a groups of subnets directed to a single nodes that would be ideal and fall back to load balance if subnet is not listed. any help would be appreciated thanks




bigip ltm version 9.4.5 build 1086.1


1 Reply

  • this is on 10.2.3 but i think it could be applicable for 9.4.x. please feel free to revise.

    [root@ve1023:Active] config  b virtual bar list
    virtual bar {
       snat automap
       ip protocol tcp
       rules myrule
    [root@ve1023:Active] config  b rule myrule list
    rule myrule {
       when CLIENT_ACCEPTED {
            if {[IP::addr [IP::client_addr] equals]} {
                    pool foo member 80
            } else {
                    pool foo member 80
            log local0. "[IP::client_addr]:[TCP::client_port] -> [IP::remote_addr]:[TCP::remote_port]"
    [root@ve1023:Active] config  b pool foo list
    pool foo {
       members {
    [root@ve1023:Active] config  curl -I
    HTTP/1.1 200 OK
    Date: Wed, 09 Nov 2011 16:46:10 GMT
    Server: Apache/2.2.3 (CentOS)
    Last-Modified: Tue, 08 Nov 2011 12:26:29 GMT
    ETag: "4183f1-30-47e02740"
    Accept-Ranges: bytes
    Content-Length: 48
    Connection: close
    Content-Type: text/html; charset=UTF-8
    [root@ve1023:Active] config  tail -f /var/log/ltm
    Nov  9 08:45:59 local/tmm info tmm[4766]: Rule myrule : ->