Forum Discussion

cerpika_14370's avatar
cerpika_14370
Icon for Nimbostratus rankNimbostratus
Jun 25, 2009

persistence table manipulation

I have users coming into the BIG-IP from several transparent proxies that sit in front of the BIG-IP. The BIG-IP then forwards them (using a forwarding VS) to their destination server.

 

 

I need a way to make sure if that server then tries to make a brand new connection back to the same client, the BIG-IP sends the connection through the same proxy that the original connection was sent through.

 

 

Any ideas?

 

 

I wanted to use the 'persist add UIE' command and create a persistence record for the second connection, but that command does not allow me to specify the 'node' value of the persistence record.

 

 

TIA!

22 Replies

  • You can use the session command to add a session table entry to map the client IP address to a proxy pool member on the client to forwarding VS connection. You could then look up the session table entry for the server to client connection.

     

     

    Deb has posted a few good examples which show how to use the session table. As you'll be trying to access the same session table entries from different VIPs, you'll need to add the entries using the 'any virtual' option:

     

     

    http://devcentral.f5.com/wiki/default.aspx/iRules/session

     

     

    session add uie [list $myVar any virtual]

     

     

    and to retrieve it:

     

     

    set session_data [session lookup uie [list $myVar any virtual]]

     

     

    Here are a few of Deb's posts on this to get you started:

     

     

    looking inside persistence table, through different Virtual Servers

     

    http://devcentral.f5.com/Default.aspx?tabid=53&forumid=5&tpage=1&view=topic&postid=1688717129

     

     

    source address persistence

     

    http://devcentral.f5.com/Default.aspx?tabid=53&forumid=5&tpage=1&view=topic&postid=16855

     

     

    URI Session ID based persistence issue

     

    http://devcentral.f5.com/Default.aspx?tabid=53&forumid=5&tpage=1&view=topic&postid=15647

     

     

    Try reading over these posts and reply if you have any questions.

     

     

    Aaron
  • Wow! Thanks Aaron. I had been looking at the session command, and am glad to know I was on the right track.

     

     

    Is there a way to look at the session table, similar to a 'b persist show all' ?
  • In 9.4.x the session information is actually stored in the persistence table, so 'b persist show all' should show the records. Note, you can't see the token associated with the record though.

     

     

    Aaron
    • nitass's avatar
      nitass
      Icon for Employee rankEmployee
      no but you can lookup for specific persistence record. persist https://clouddocs.f5.com/api/irules/persist.html
    • lorvain_176032's avatar
      lorvain_176032
      Icon for Nimbostratus rankNimbostratus
      yes but how to obtain built-in persistence data information. persist lookup only return data for persist made on irule, right ? thanks for feedback
    • nitass's avatar
      nitass
      Icon for Employee rankEmployee
      what does built-in persistence data information mean? what do you want to achieve? yes.
    • nitass_89166's avatar
      nitass_89166
      Icon for Noctilucent rankNoctilucent
      the persist lookup command does not work with cookie hash. i am not sure if it is expected behavior or a bug.
    • nitass_89166's avatar
      nitass_89166
      Icon for Noctilucent rankNoctilucent
      i checked with support and found it (persist lookup cookie hash irule command) is not supported yet. ID527197 Add support for 'persist lookup cookie' cr. Wu, Hiroki, Daniel
    • nitass's avatar
      nitass
      Icon for Employee rankEmployee
      the persist lookup command does not work with cookie hash. i am not sure if it is expected behavior or a bug.
    • nitass's avatar
      nitass
      Icon for Employee rankEmployee
      i checked with support and found it (persist lookup cookie hash irule command) is not supported yet. ID527197 Add support for 'persist lookup cookie' cr. Wu, Hiroki, Daniel