Forum Discussion
Insert LTM IP and pool member IP in header in the response to client
Hi
I want to insert the header in the response to client with the IP address of the LTM pool member that served the request and the Big-IP LTM IP address?
What is the difference between IP::local_addr and IP::server_addr ?
Is below a correct iRule.
when HTTP_RESPONSE {
HTTP::header insert "[IP::server_addr]:[IP::local_addr]"
}
8 Replies
- spalande
Nacreous
You can use something like below.
when HTTP_RESPONSE { HTTP::header insert lb_server "[IP::server_addr]:[TCP::server_port]" }Alternatively, you can just use [LB::server], which will print the pool name as well along with the member
- R_S
Nimbostratus
Thank you
Will IP::server_addr give me the F5 Load Balancer's IP and LB::server pool pool member and pool name ?
- spalande
Nacreous
No. IP::server_addr will give you node IP address (without port). TCP::server_port will give node port.
But if you just use LB::server it will give you node IP, port (member) and pool name.
- R_S
Nimbostratus
Thanks again
What value will return me the IP address of the F5 Load balancer?
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