Forum Discussion

robson_78577's avatar
robson_78577
Icon for Nimbostratus rankNimbostratus
Aug 29, 2013

Debugging Flow Messages through MBLB

Hi all,

 

Using a virtual Server with MBLB Profile, the LTM knows internally how to deliver a TCP message from a client based on TCP connections . So, Is there a way to debug these events using irules?

 

Tks

 

5 Replies

  • just wondering if putting log in irule event is not helpful.

     

  • Colin_Walker_12's avatar
    Colin_Walker_12
    Historic F5 Account

    When you say "Debug these events", what data is it you're trying to obtain, exactly? As nitass said above, a log statement will likely net you some info, but it depends largely on what you're looking for specifically.

     

    Colin
  • Hi guys,

     

    I need data information about how LTM deliver the message and how to correlate with the TCP connection. Considerong MBLB IS message-based oriented, how it works?

     

    I'm working on a irule and using MBLB, but its impossible use some commands on events, like TCP::local_port on SERVER_DATA. Some commands works well when IRemove the MBLB, but I need to use it.

     

    So I need a way to identify and debug message flow.

     

    Tks in advance

     

  • I'm working on a irule and using MBLB, but its impossible use some commands on events, like TCP::local_port on SERVER_DATA. Some commands works well when IRemove the MBLB, but I need to use it.

    doesn't TCP::local_port in SERVER_DATA work?

    this is mine.

    root@(ve11a)(cfg-sync Changes Pending)(Active)(/Common)(tmos) list ltm virtual bar
    ltm virtual bar {
        destination 172.28.20.111:7
        ip-protocol tcp
        mask 255.255.255.255
        pool foo
        profiles {
            mblb { }
            tcp { }
        }
        rules {
            myrule
        }
        source 0.0.0.0/0
        source-address-translation {
            type automap
        }
        vs-index 23
    }
    root@(ve11a)(cfg-sync Changes Pending)(Active)(/Common)(tmos) list ltm pool foo
    ltm pool foo {
        members {
            200.200.200.101:7 {
                address 200.200.200.101
            }
            200.200.200.111:7 {
                address 200.200.200.111
            }
        }
    }
    root@(ve11a)(cfg-sync Changes Pending)(Active)(/Common)(tmos) list ltm rule myrule
    ltm rule myrule {
        when CLIENT_ACCEPTED {
      TCP::collect
    }
    when CLIENT_DATA {
      log local0. "[IP::remote_addr][TCP::remote_port] > [IP::local_addr]:[TCP::local_port] payload=[TCP::payload]"
      TCP::release
      TCP::notify request
      TCP::collect
    }
    when SERVER_CONNECTED {
      TCP::collect
    }
    when SERVER_DATA {
      log local0. "[IP::local_addr]:[TCP::local_port] > [IP::remote_addr]:[TCP::remote_port] payload=[TCP::payload]"
      TCP::release
      TCP::notify response
      TCP::collect
    }
    
    [root@ve11a:Active:Changes Pending] config  tail -f /var/log/ltm
    Aug 31 13:40:33 ve11a info tmm[1027]: Rule /Common/myrule : 172.28.20.1759863 > 172.28.20.111:7 payload=1
    Aug 31 13:40:33 ve11a info tmm[1027]: Rule /Common/myrule : 200.200.200.14:59863 > 200.200.200.111:7 payload=1
    Aug 31 13:40:34 ve11a info tmm[1027]: Rule /Common/myrule : 172.28.20.1759863 > 172.28.20.111:7 payload=2
    Aug 31 13:40:34 ve11a info tmm[1027]: Rule /Common/myrule : 200.200.200.14:59863 > 200.200.200.101:7 payload=2
    Aug 31 13:40:35 ve11a info tmm[1027]: Rule /Common/myrule : 172.28.20.1759863 > 172.28.20.111:7 payload=3
    Aug 31 13:40:35 ve11a info tmm[1027]: Rule /Common/myrule : 200.200.200.14:59863 > 200.200.200.111:7 payload=3
    Aug 31 13:40:36 ve11a info tmm[1027]: Rule /Common/myrule : 172.28.20.1759863 > 172.28.20.111:7 payload=4
    Aug 31 13:40:36 ve11a info tmm[1027]: Rule /Common/myrule : 200.200.200.14:59863 > 200.200.200.101:7 payload=4
    
  • Hi Nitaas,

     

    Yes, it's working. But just when I remove MBLB profile. But I will do some tests on Monday, and I will post my Irule.

     

    Tks in advance.