Forum Discussion
iRule - Specific Source to Specific Node
Hello All, can someone please help me with an iRule to send specific host who access VS IP to be sent always to specific node. appreciate your help
4 Replies
- Brad_Parker
Cirrus
Here is a very basic way of doing it.
when CLIENT_ACCEPTED { if { [IP::addr [IP::client_addr] equals 8.8.8.8] }{ node 10.0.0.1 } }Are you wanting to map multiple sources to multiple nodes? That would require a little more logic but can be accomplished with a data group with the value being the node you want a particular source to go to.
when CLIENT_ACCEPTED { if { [class match [IP::client_addr] equals source_dg] }{ node [class lookup [IP::client_addr] source_dg] } else { pool default_pool } } - Tariq_Sako_9038
Nimbostratus
thanks a lot for your kind help, the first one seems great, but will the rest of clients proceed normally load balanced to the nodes? or should i add (else) too there?
- Brad_Parker
Cirrus
With the first one if it doesn't match the IF statement then it will use the default pool assigned to the VIP. Typically if I'm going to use an iRule to load balance more than just a one off exception I use the iRule to pick the pool or node for all traffic. The first one I would just consider an exception so I wouldn't use the iRule to pick the pool or node for all traffic.
- Tariq_Sako_9038
Nimbostratus
Thanks a lot Brad for your kind help, i really appreciate your time and efforts.
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