Forum Discussion
genseek_32178
Jun 12, 2012Nimbostratus
iRule syntax
Hi,
We ve the following iRule configured,
iRule X
when CLIENT ACCEPTED {
if {[IP::addr [ IP::local_addr] equals 10.10.10.x ] } {
snatpool pool1
} elseif {[IP::addr [IP::local_addr] equals 20.10.20.x ] } {
snatpool pool2
Here, the ranges 10.10.10.x and 20.10.20.x refer to source address or destination address?
- hooleylistCirrostratusIn a clientside context event like CLIENT_ACCEPTED (when the client establishes a connection to the virtual server), [IP::local_addr] returns the client's destination address. If you're not using a network virtual server, the command returns the virtual server's IP address.
- genseek_32178NimbostratusThanks for the reply Aaron but my qstn remains unanswered.. I will put it more clearly..
- hooleylistCirrostratusIf the client's destination IP address was 10.10.10.x, the iRule would apply a SNAT using snatpool pool1 on the serverside connection. If the client's destination IP address was 20.10.20.x, the iRule would apply a SNAT using snatpool pool2 on the serverside connection. So IP::local_addr in CLIENT_ACCEPTED refers to the client's destination (TMM's local address for the clientside context).
- genseek_32178NimbostratusThanks now it clears....but one more...say iRule is modified as below..
- genseek_32178NimbostratusThanks now it clears....but one more...say iRule is modified as below..
- hooleylistCirrostratusRegardless of how the virtual server is defined, calling [IP::local_addr] in a clientside context event like CLIENT_ACCEPTED will return the client's destination IP address. See this post for more info:
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