Forum Discussion
static sticky entry using source address persistence
All the traffic from a particular source IP ,always need to go a specific backend server.How can i acheive that on F5.
On cisco we have can configure using static sticky entry .Need some assistance as we are in process of migration of all our application from cisco to F5.
cisco config.
sticky ip-netmask 255.255.255.255 address source vip_STICKY serverfarm pool timeout 1 replicate sticky 8 static client source 192.168.10.5 rserver app1
how to achive this in f5
7 Replies
You may simply use source_addr as Default Persistence Profile in your virtual-server's config.
If you want to replicate the persistence to HA peer you'll have to enable Mirror Persistence in the source_addr persistence profile.
- haripriya_20011
Nimbostratus
1 particular client IP need to make a connection to only 1 backend server. we want to make sure the that client :192.168.10.5 has a sticky entry stick to only app1 memeber
this vip contains 12 members in th pool
Then you'll have to use an iRule similar to this:
when CLIENT_ACCEPTED { if { [IP::client_addr] == "192.168.10.5" } { pool my_Pool member 10.1.2.200 80 } }- haripriya_20011
Nimbostratus
Christophe thanks for your response ,so how i can verify that all the connection from the client 192.168.10.5 are always going to the pool member 10.1.2.200
please let me know
- Stanislas_Piro2
Cumulonimbus
you can verify with tmsh command:
show sys connection cs-client-addr 192.168.10.5 cs-server-addr vs_server_ip - haripriya_20011
Nimbostratus
Thanks all for your response ,I have one more question .if I need have 2 client IPs need to always connects to 2 different servers .Then how should my irule look like . DO i need 2 irules for it .
client :192.168.10.5 -----> server 10.1.2.200 client : 192.168.11.6 ------> server 10.1.2.205
No, you don't need a second iRule, just add an "elseif" statement to the previous iRule.
Have a look to iRule's Wiki (https://devcentral.f5.com/wiki/iRules.HomePage.ashx). There are a lot of example there.
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