Forum Discussion
SSHSSH_97332
Nimbostratus
Feb 11, 2012Will IRules direct to a down pool memebr ?
i have VS with 1 pool having 2 pool members , each pool members has a monitor . i have an IRule that have the following logic : if client src-ip = X , direct to pool member 1 , else direct to the p...
nitass
Employee
Feb 17, 2012e.g.
[root@ve1023:Active] config b virtual bar list
virtual bar {
snat automap
pool foo
destination 172.28.19.79:80
ip protocol 6
rules myrule
}
[root@ve1023:Active] config b pool foo list
pool foo {
members {
200.200.200.101:80 {
monitor fake
}
200.200.200.102:80 {}
}
}
[root@ve1023:Active] config b rule myrule list
rule myrule {
when CLIENT_ACCEPTED {
log local0. "\[IP::client_addr\]: [IP::client_addr]"
log local0. "\[LB::status pool foo member 200.200.200.101 80\]: [LB::status pool foo member 200.200.200.101 80]"
log local0. "\[LB::status pool foo member 200.200.200.102 80\]: [LB::status pool foo member 200.200.200.102 80]"
if {[IP::addr [IP::client_addr] equals 172.28.19.0/24]}{
if {[LB::status pool foo member 200.200.200.101 80] eq "up"}{
pool foo member 200.200.200.101 80
} elseif {[LB::status pool foo member 200.200.200.102 80] eq "up"}{
pool foo member 200.200.200.102 80
} else {
reject
}
} else {
if {[LB::status pool foo member 200.200.200.102 80] eq "up"}{
pool foo member 200.200.200.102 80
} elseif {[LB::status pool foo member 200.200.200.101 80] eq "up"}{
pool foo member 20.200.200.101 80
} else {
reject
}
}
}
when SERVER_CONNECTED {
log local0. "[IP::client_addr]:[TCP::client_port] -> [IP::local_addr clientside]:[TCP::local_port clientside] -> [IP::remote_addr]:[TCP::remote_port]"
}
}
[root@ve1023:Active] config cat /var/log/ltm
Feb 17 02:18:13 local/tmm info tmm[4822]: Rule myrule : [IP::client_addr]: 172.28.19.251
Feb 17 02:18:13 local/tmm info tmm[4822]: Rule myrule : [LB::status pool foo member 200.200.200.101 80]: up
Feb 17 02:18:13 local/tmm info tmm[4822]: Rule myrule : [LB::status pool foo member 200.200.200.102 80]: up
Feb 17 02:18:13 local/tmm info tmm[4822]: Rule myrule : 172.28.19.251:45472 -> 172.28.19.79:80 -> 200.200.200.101:80
Feb 17 02:18:55 local/ve1023 notice mcpd[3746]: 01070638:5: Pool member 200.200.200.101:80 monitor status down.
Feb 17 02:19:01 local/tmm info tmm[4822]: Rule myrule : [IP::client_addr]: 172.28.19.251
Feb 17 02:19:01 local/tmm info tmm[4822]: Rule myrule : [LB::status pool foo member 200.200.200.101 80]: down
Feb 17 02:19:01 local/tmm info tmm[4822]: Rule myrule : [LB::status pool foo member 200.200.200.102 80]: up
Feb 17 02:19:01 local/tmm info tmm[4822]: Rule myrule : 172.28.19.251:45473 -> 172.28.19.79:80 -> 200.200.200.102:80
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects