Forum Discussion
monica_74227
Nimbostratus
Jun 10, 2009outbound iRule help
hey guys, i make a irule to use choose diffrent links as following:
when CLIENT_ACCEPTED {
if { [matchclass [IP::local_addr] equals $::CNC_class]} {
pool ISP-WANGTONG-FIRST
}
elseif { [matchclass [IP::local_addr] equals $::CT_class]} {
pool ISP-DIANXIN-FIRST
}
else {
pool ISP-GW-POOL
}
}
when LB_SELECTED {
if {[IP::addr [LB::server addr] equals 221.218.250.62] and [IP::addr [IP::client_addr] equals 10.6.1.1] or [IP::addr [IP::client_addr] equals 10.6.1.2] } {
snat 221.218.250.61
}
elseif {[IP::addr [LB::server addr] equals 202.224.233.89] and [IP::addr [IP::client_addr] equals 10.6.1.1] or [IP::addr [IP::client_addr] equals 10.6.1.2]} {
snat 202.224.233.90
}
else {
snat automap
}
}
Thank you for correcting me !
- The_Bhattman
Nimbostratus
What exactly is your question? Are you have problems getting it to work? If so what describe the problem in detail. - monica_74227
Nimbostratus
Posted By cmbhatt on 06/12/2009 3:02 PM
- monica_74227
Nimbostratus
hey guys, I fixed the iRule, but always generate errors, thank you for your help: - hoolio
Cirrostratus
There is a typo: mathclass should be matchclass. Also, you should use parentheses to ensure the logic in LB_SELECTED is correct: - monica_74227
Nimbostratus
Posted By hoolio on 06/15/2009 8:39 AM
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