UDP TCP Packet Duplication
If you ever need an iApp based on this template to duplicate traffic to virtual servers instead of to pool or nodes. Below is the procedure I used.
Create an iApp with dummy values for the “Destination Server Questions” section during creation
Uncheck the strict updates on the iApp to make manual changes
Replace the dummy string records created by the iApp in the data gorup with the virtual server names that you want the traffic to be duplicated to. The label values will not be used
Data group string records should look like this
Change this iRule (name should be ending with “_distribute” ) with the one below
when CLIENT_ACCEPTED {
binary scan [UDP::payload] ssssa256a* a b c d destinationwithpad data
#log "sending from $a.$b.$c.$d to pool: $destinationwithpad"
UDP::payload replace 0 [UDP::payload length] $data
snat "$a.$b.$c.$d"
#get just dest without pad
set destination [findstr $destinationwithpad "" 0 "~"]
#log $destination
set nodeandport [split $destination ":"]
virtual [lindex $nodeandport 0]
}
Duplicated traffic would be sent to the virtual server name listed on the data group