Forum Discussion
Insert LTM IP and pool member IP in header in the response to client
Thank you
Will IP::server_addr give me the F5 Load Balancer's IP and LB::server pool pool member and pool name ?
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_SJul 17, 2021Nimbostratus
Thanks again
What value will return me the IP address of the F5 Load balancer?
- spalandeJul 17, 2021Nacreous
You can useIP::local_addr for F5 IP address. Please note, on clientside events (client --> F5) it returns VIP IP addr. And on serverside (F5 ---> server) it returns self IP address that will talk to server (offcouse if SNAT is enabled)
take a look at below article.
https://clouddocs.f5.com/api/irules/IP__local_addr.html
- R_SJul 17, 2021Nimbostratus
I am wanting to add the F5 local address into the HTTP response header to client, would local address value helps (server ---> F5 --> Client..
- spalandeJul 17, 2021Nacreous
When you say local IP address, I'm assuming you are mentioning F5 selfIp address?
Below iRule will insert f5_server header with value of <f5_floating_selfIP>__<node_ip>.
when HTTP_RESPONSE { HTTP::header insert f5_server "[IP::local_addr]_[IP::server_addr]" }
I think I overlooked your original request and iRule.my bad. So your original iRule was ok, I would just add name of the header. Hope this helps.
- R_SJul 17, 2021Nimbostratus
Thank you very much
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