Forum Discussion
Dave_73612
Nimbostratus
Jul 28, 2009Pool redirect based on source IP Range
Hi guys,
I need to write an IRule to route traffic to different pools based on source IP range.
Would this be the best syntax to use?
when CLIENT_ACCEPTED ...
hoolio
Cirrostratus
Dec 01, 2009Hi Randy,
That iRule looks straightforward enough. Which LTM version are you testing with? Do you have ASM or WAM enabled on the VIP? What type of VIP are you using the iRule on?
If it's not working as you expect, can you add debug logging to confirm the client IP address and whether the pool selection is being hit?
when CLIENT_ACCEPTED {
log local0. "client IP:port [IP::client_addr][TCP::client_port]: [virtual name] [IP::local_addr][TCP::local_port]"
if { [IP::addr [IP::client_addr] equals 209.221.139.195] } {
log local0. "client IP:port [IP::client_addr][TCP::client_port]: Matched IP check, selecting Segregation_Pool"
pool Segregation_Pool
}
}
when LB_SELECTED {
log local0. "client IP:port [IP::client_addr][TCP::client_port]: Selected server: [LB::server]"
}
when SERVER_CONNECTED {
log local0. "client IP:port [IP::client_addr][TCP::client_port]: Connected server: [IP::server_addr]:[TCP::server_port]"
}
Aaron
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