Forum Discussion
Emad
Cirrostratus
May 18, 2016FQDN Node with Route Domains
How can we add route domain in FQDN based nodes. In Address based node it can be added with %1 but how this will be done in FQDN based nodes.
Marlon_Goncalve
Employee
Jul 09, 2025had to work on this with a customer of mine yesterday... we came up with the following irule to deal with it..
when RULE_INIT {
set static::TESTdebug 1
set static::TESTfqdn_pool TEST_snf_uat_22_pool
}
when CLIENT_ACCEPTED {
# Only apply this logic to TCP port 22 (SFTP)
if { [TCP::local_port] == 22 } {
# Check if client IP Address is in the Data Group (BBDMS_SNF_Parallel_DG)
if { [class match [IP::client_addr] equals BBDMS_SNF_Parallel_DG] } {
# Get the list of active pool members
set members [active_members -list $static::TESTfqdn_pool]
set member_count [llength $members]
if { $member_count >= 1 } {
# Loop through pool members using a dynamic index
if {[info exists static::poolndx]} {
# Increment index and loop back if necessary
set static::poolndx [expr ($static::poolndx + 1) % $member_count]
} else {
# Initialize the pool index on the first use
set static::poolndx 0
}
# Select the member based on the index
set membaddr [lindex [lindex $members $static::poolndx] 0]
# Log selected member (for debugging)
if { $static::TESTdebug > 0 } {
log local0. "Selected pool member: $membaddr%1549 port 22"
}
# Assign traffic to the selected node
node $membaddr%1549 22
} else {
# No active members in the pool; optionally handle this case
log local0. "No active members in pool $static::TESTfqdn_pool"
reject
}
} else {
# Fallback to default pool
pool CBM_SFTP.f5.com_22_pool
}
}
}
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects