Forum Discussion

R_S's avatar
R_S
Icon for Nimbostratus rankNimbostratus
Jul 15, 2021

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]"

}

 

  • 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's avatar
    R_S
    Icon for Nimbostratus rankNimbostratus

    Thank you  

     

    Will IP::server_addr give me the F5 Load Balancer's IP and LB::server pool pool member and pool name ?

    • spalande's avatar
      spalande
      Icon for Nacreous rankNacreous

      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's avatar
        R_S
        Icon for Nimbostratus rankNimbostratus

        Thanks again  

        What value will return me the IP address of the F5 Load balancer?