Forum Discussion
I rule
Can some give me an Irule to loadbalance multiple pools for the same VIP
pool x 443 would be default
Pool y 5222
pool z 5223
37 Replies
- G_romano_187703
Nimbostratus
Hi,
Try this,
when CLIENT_ACCEPTED { if { [TCP::server_port equals 5223}{ Pool pool-tcp-port-5223 } elseif {[TCP::server_port] equals 5222} {pool pool-tcp-port-5222} elseif{ [TCP::server_port equals 443}{ pool pool-tcp-port-443 } } Bye!!!
Giorgio- abi1980_184094
Nimbostratus
thanks romano will try and let you know - abi1980_184094
Nimbostratus
germano one more quick question Can i use a single SNAT for all these pools
- nitass
Employee
when CLIENT_ACCEPTED { if { [TCP::server_port equals 5223}{ Pool pool-tcp-port-5223 } elseif {[TCP::server_port] equals 5222} {pool pool-tcp-port-5222} elseif{ [TCP::server_port equals 443}{ pool pool-tcp-port-443 } }
i understand serverside connection is not available in CLIENT_ACCEPTED, so you may use TCP::local_port instead of TCP::server_port.
Can i use a single SNAT for all these pools
of course.
- abi1980_184094
Nimbostratus
Thanks for the reply Nitass Can you explain me the difference between server_port and local_port - G_romano_187703
Nimbostratus
Hi nitass, Soru but I don't understand when you said: "i understand serverside connection is not available in CLIENT_ACCEPTED, so you may use TCP::local_port instead of TCP::server_port." At this link (https://clouddocs.f5.com/api/irules/TCP__server_port.html) the event CLIENT_ACCEPTED is a valid event! Where do I wrong? Thanx Giorgio
- nitass_89166
Noctilucent
when CLIENT_ACCEPTED { if { [TCP::server_port equals 5223}{ Pool pool-tcp-port-5223 } elseif {[TCP::server_port] equals 5222} {pool pool-tcp-port-5222} elseif{ [TCP::server_port equals 443}{ pool pool-tcp-port-443 } }
i understand serverside connection is not available in CLIENT_ACCEPTED, so you may use TCP::local_port instead of TCP::server_port.
Can i use a single SNAT for all these pools
of course.
- abi1980_184094
Nimbostratus
Thanks for the reply Nitass Can you explain me the difference between server_port and local_port - G_romano_187703
Nimbostratus
Hi nitass, Soru but I don't understand when you said: "i understand serverside connection is not available in CLIENT_ACCEPTED, so you may use TCP::local_port instead of TCP::server_port." At this link (https://clouddocs.f5.com/api/irules/TCP__server_port.html) the event CLIENT_ACCEPTED is a valid event! Where do I wrong? Thanx Giorgio
- nitass_89166
Noctilucent
Can you explain me the difference between server_port and local_port
iRules Concepts: Considering Context part 1 by Colin Walker
https://devcentral.f5.com/articles/irules-concepts-considering-context-part-1TCP::local_port
https://devcentral.f5.com/wiki/iRules.TCP__local_port.ashxTCP::server_port
https://devcentral.f5.com/wiki/iRules.TCP__server_port.ashx- abi1980_184094
Nimbostratus
thanks for sharing
- nitass
Employee
Can you explain me the difference between server_port and local_port
iRules Concepts: Considering Context part 1 by Colin Walker
https://devcentral.f5.com/articles/irules-concepts-considering-context-part-1TCP::local_port
https://devcentral.f5.com/wiki/iRules.TCP__local_port.ashxTCP::server_port
https://devcentral.f5.com/wiki/iRules.TCP__server_port.ashx- abi1980_184094
Nimbostratus
thanks for sharing
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* 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