Forum Discussion
jrmorris_151361
Nimbostratus
May 15, 2015Can't get LB::server addr to display in CLIENT_ACCEPTED
I am trying to get some logging sorted out currently, and I would like to be able to display the [LB::server addr] under CLIENT_ACCEPTED. Here is my iRule. I can get the output in LB_SELECTED, just not CLIENT even though I thought it was possible.
when CLIENT_ACCEPTED {
Start log entry and display client src/dst information
The RESOLV command below is dependant on 10.200.0.50 being UP. Otherwise, the session will fail
log local0. "********** START OF LOG ENTRY FOR [RESOLV::lookup @10.200.0.50 [IP::client_addr]] to [RESOLV::lookup @10.200.0.50 [LB::server addr]] **********"
log local0. "Client Src: [IP::client_addr]:[TCP::client_port], Client Dst: [clientside {IP::local_addr}]:[clientside {TCP::local_port}]"
}
when LB_SELECTED {
if {[IP::addr "[IP::client_addr]/22" equals "[LB::server addr]/22"]} {
log local0. "Load Balanced Dst: [LB::server addr]"
log local0. "*********** END OF LOG ENTRY ***********"
snat automap
}
}
2 Replies
- nitass
Employee
server is not selected in CLIENT_ACCEPTED event. you may try LB::select.
LB::select
https://devcentral.f5.com/wiki/iRules.LB__select.ashx - cjunior
Nacreous
if it is not cause a problem in your logic, you can connect in LB first, try this:
when CLIENT_ACCEPTED { LB::connect log local0. "===== [LB::server addr]" }[]
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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
