Forum Discussion
ZANOOB
Cirrus
Jul 23, 2021iRule not working to have a RADIUS presistant load balancing.
Hello All, I having trouble with an iRule that I created to load balance the RADIUS traffic on F5. I have a virtual server created that is listening on "all ports" and I have created an iRule ...
Jul 24, 2021
Hi ZANOOB,
[RADIUS::avp 31 string] may be returning empty string. If empty, iRule will throw an error.
Can you investigate the ltm logs and try this iRule?
when CLIENT_DATA {
if { [UDP::local_port] == 1813 } {
set CALLID [RADIUS::avp 31 string]
set IP [RADIUS::avp 8 ip4]
if { $IP != "" } {
table set $IP [LB::server addr] 900
log local0. "Radius maps $IP to [LB::server addr] for $CALLID"
}
}
}
when CLIENT_ACCEPTED {
if { ([UDP::local_port] != 1812) && ([UDP::local_port] != 1813) } {
log local0. "packet on port [UDP::local_port] dropped"
drop
}
elseif {
set CALLID [RADIUS::avp 31 string]
log local0. "persisted $CALLID"
if { $CALLID ne "" } {
persist uie $CALLID
}
}
}
when CLIENT_DATA {
if { [UDP::local_port] == 1813 } {
set CALLID [RADIUS::avp 31 string]
set IP [RADIUS::avp 8 ip4]
if { $IP ne "" && $CALLID ne "" } {
table set $IP [LB::server addr] 900
log local0. "Radius maps $IP to [LB::server addr] for $CALLID"
}
}
}
when LB_SELECTED {
log local0. "Selected [LB::server addr] [LB::server port]"
}
when SERVER_DATA {
if { $CALLID ne "" } {
persist add uie $CALLID
log local0. "persist added for $CALLID to [LB::server addr]"
}
}Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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
