Learn F5 Technologies, Get Answers & Share Community Solutions Join DevCentral

Filter by:
  • Solution
  • Technology
Clear all filters
Answers

2 UDP connections and than nothing

Hello all. Running into a issue. We have a old client that uses UDP connect to the VIP and than UDP down to the node.Normally this config wouldnt be a big deal, but with this app, its looking to receive the packet in the same port and what it sent. Same goes for the node. The port they are using is 5316/UDP. So for source port, I set it to Preserved Strict. that took care of the port. From there, I grabbed a iRule from here to create make use of the SNAT pool that will be sending the request from the F5 to the Node.

    when RULE_INIT {

    # The only configuration needed is to set the name of the SNAT pool as $static::snatpool_name

    # Configure the name of the SNAT pool here
    set static::snatpool_name "Broadview2_UDP_SNAT"

    # Hide the members command from the iRule parser (comment)
    set static::members_cmd "members -list $static:: Broadview2_UDP_SNAT"

    # Clear any pre-existing array of the same name
    unset -nocomplain static::snat_ips

    # Initialize a counter for the number of SNAT pool members
    set static::i 0

    # Loop through the SNAT pool members and add them to an array for faster access
    # If the SNAT pool is modified, the RULE_INIT code needs to be re-run to re-read the SNAT pool
    # Make a simple change like adding a space to a comment to force a re-run of RULE_INIT.
    foreach static::snat_ip [eval $static::members_cmd] {
        set static::snat_ips($static::i) [lindex $static::snat_ip 0]
        incr static::i
    }
    # Save the number of SNAT IPs to avoid getting the count on every connection(comment)
    set static::array_size [array size static::snat_ips]
    log local0. "Loaded $static::array_size SNAT IPs from $static:: Broadview2_UDP_SNAT: [array get static::snat_ips]"

    # Clear the variables we will not use anymore
    unset static:: Broadview2_UDP_SNAT static::members_cmd static::i static::snat_ip 
}
when CLIENT_ACCEPTED {

    # Use a local array to configure SNAT addresses.
    # These addresses need to be defined in a SNAT pool to ensure TMM sends gratuitous ARPs during a failover.
    # In this example, we use 5 addresses of any subnet.  You will probably want to change these to be in the same subnet.
    # Any number of addresses can be used. ( comment)


    set snat_ips(1) 10.241.127.241
    set snat_ips(1) 10.241.127.242
    set snat_ips(1) 10.241.127.243
    set snat_ips(1) 10.241.127.244
    set snat_ips(1) 10.241.127.245
set snat_ips(1) 10.241.127.246
    set snat_ips(1) 10.241.127.247
    set snat_ips(1) 10.241.127.248
    set snat_ips(1) 10.241.127.249
    set snat_ips(1) 10.241.127.250

    # Calculate the crc32 checksum of the client IP
    # Use the modulo of the checksum and the number of SNAT IPs to choose from to select a SNAT IP
    snat $snat_ips([expr {[crc32 [IP::client_addr]] % [array size snat_ips]}])
}

So from here, we are pretty good. The problem is that after 2 clients connect to the Virtual Server, the 3 and 4 client are hung. They dont do anything. Its not like Im out of SNAT IPs. One thing I did notice from the dump is that the client connections always go to the last snat IP. In addition, I tried using Stateless, but it just hangs. Any advise or suggestions?

Design: 1-Arm VIP Type: Standard SNAT: SNAT_Pool Broadview_SNAT Source Port: Preserve Strict

RGW

0
Rate this Discussion

Replies to this Discussion