Forum Discussion

Samer_Odeh_8110's avatar
Samer_Odeh_8110
Icon for Nimbostratus rankNimbostratus
Mar 18, 2015

F5 LTM customized Packet cloning

Hello every body

I have an application using SMPP, SMPP is TCP based protocol and it establish sessions to send traffic, SMPP has unique command IDs to Establish session and tear them up, below image is simple protocol flow:

In below example in packet 8 in attached tcpdump, you will see under SMPP (Short Message Peer to Peer) layer a command ID: 0x00000009 which represent bind command (establish a connection/SMPP session).

What I need to similar to customized clone pool concept but on pool member level and on certain condition, I need an iRule or may be an iCall procedure to check for SMPP bind command by scanning packet PDU, similar example is below: https://devcentral.f5.com/questions/balancing-smpp-traffic-based-on-recipient-address

when CLIENT_ACCEPTED {
    set s_seq_idx 1
    set first_bind_resp 1
    set smsc1 
    set smsc2 
    TCP::collect
}
when CLIENT_DATA {
    while { [TCP::payload length] > 16 } {
        binary scan [TCP::payload] IH8IIa* len oper status seq p
        if { [TCP::payload length] < $len &&}  // We need here to add check for bind command id as well
         {
            TCP::collect $len
            return
        }

My challenge is to replicate SMPP bind packet to all available pool members in certain pool 😃 , Once SMPP Bind packet is replicated, as result we will get established SMPP sessions with all available pool members, and F5 LTM then will be able to load-balance other incoming traffic with all pool members as far as connection is established. If concept is OK, the rest is not challenging as we need to consider other bind command IDs to be replicated (0x00000001, 0x00000002 and 0x00000009), and of course we need to replicate unbind as well 0x00000006 if possible.

Thank you so much in advance.

Sincerely, SAM

  • and F5 LTM then will be able to load-balance other incoming traffic with all pool members as far as connection is established.

     

    is subsequent traffic on the same (this) tcp connection or a new connection?

     

    if it is on the same tcp connection, isn't it the irule Nat gave (Balancing SMPP traffic based on recipient address)?

     

    if it is a new tcp connection, doesn't client send another bind?

     

  • Thank you for reply, the (Balancing SMPP traffic based on recipient address) solution is to load balance traffic of multiple SMPP (TCP) sessions based on certain parameter in the packet.

     

    In my case I have only one Established connection from client side , so I want to clone only authentication packet which has bind command (which actually establish SMPP connection), as a result from single bind command by the client I can have multiple sessions to multiple pool members, other packets (which have different SMPP command IDs) will not be cloned and will be load balance normally between pool members (round robin or ratio ...)

     

    Thank you Samer

     

  • sorry to not explain well. i mean in Nat irule, it does save bind message and re-send it when new server is selected.

    bind message is saved here.

       00000002 {
          set bind_message [TCP::payload $len]
       }
    

    and it is re-sent here.

       } else {
          TCP::collect -all
          TCP::respond $bind_message
       }
    
  • Thank you so much, it is brilliant idea,

     

    Can you please send me full irule so I can give it a try, my email is:

     

    samer.od at gmail.com

     

    Thank you in advance

     

    • nitass's avatar
      nitass
      Icon for Employee rankEmployee
      i am sorry i do not have it now. you may try and post here if you encounter any problem. alternatively, you may contact f5 pre-sale engineer in your country or f5 professional service. i understand what you are looking for can be done.