Forum Discussion
Roy_Jee
Nimbostratus
Sep 19, 2019Irule to differentiate source traffic
i have an issue regarding source traffic please assist. Scenario: VIP:10.10.50.100 Pool members :10.10.70.100 , 10.10.70.101 when traffic from user having last octet of ip in ...
Sep 19, 2019
Hi RoyMalik,
Can you try this?
when CLIENT_ACCEPTED {
set lastOctet [getfield [IP::client_addr] "." 4]
if {[expr $lastOctet % 2] == 0} {
log local0. "$lastOctet is even"
node 10.10.70.100
} else {
log local0. "$lastOctet is odd"
node 10.10.70.101
}
}or you can use this iRule.
when HTTP_REQUEST {
switch -glob [IP::client_addr] {
"*1" -
"*3" -
"*5" -
"*7" -
"*9" { node "nodeName_10.10.70.101" }
default { node "nodeName_10.10.70.100" }
}
}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
