Forum Discussion
netwerker_31936
Nimbostratus
May 03, 2017irule to create a hash of source and destination IPs
I have a firewall farm sandwiched between two LTM 4200s running V11.4. The FW VS is 0.0.0.0 all ports [all traffic is LB'd to a FW]. I would like to use persistence based on a single hash value of both the source and destination IP addresses so that each unique source/destination pair persists to a single FW. What would that irule look like?
1 Reply
Maybe this will work.
when CLIENT_ACCEPTED { scan [IP::client_addr] "%u.%u.%u.%u" a b c d scan [IP::local_addr] "%u.%u.%u.%u" e f g h set src_dst_hash [ crc32 [ concat $a $b $c $d $e $f $g $h ] ] persist hash $src_dst_hash }
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