Faintly_Lucky
Mar 17, 2011Nimbostratus
iRule not triggered on target VIP after using the virtual iRule command to direct traffic to it
My company has a pair of 1600s (9.4.8 HF4) that accept and load balance all of the syslog traffic generated by our devices to several syslog pools.
Recently, we had a requirement come down to pass access-control messages from the TACACS servers for a certain subset of devices to a different, dedicated pool.
So, I wrote up a rule on the main syslog VIP that switched on the addresses of the TACACS servers and pushed them to a secondary VIP that I created specifically to handle the traffic.
I wrote another rule that matched the addresses of the pertinent devices in the UDP payload and selected the proper pool for them and applied it to the secondary VIP, then implemented the rule on the main VIP.
The rule on the main VIP acted like it should:
Mar 16 13:48:53 tmm tmm[1706]: Rule syslog-pool-select-v4 : Sending traffic to other virtual as expected
Mar 16 13:48:53 tmm tmm[1706]: Rule syslog-pool-select-v4 : Sending traffic to other virtual as expected
Mar 16 13:48:54 tmm tmm[1706]: Rule syslog-pool-select-v4 : Sending traffic to other virtual as expected
Mar 16 13:49:13 tmm tmm[1706]: Rule syslog-pool-select-v4 : Sending traffic to other virtual as expected
The secondary VIP rule never logged anything and when I checked the statistics, they were zeroed like the rule wasn't being triggered even though I confirmed that it was applied to the secondary VIP.
Any Ideas?
Thanks in advance,
Lucky
Main Syslog VIP
rule syslog-pool-select-v4 {
when CLIENT_ACCEPTED {
set addr [IP::client_addr]
switch $addr {
xxx.xxx.xxx.xxx -
xxx.xxx.xxx.xxx { virtual seim-syslog-tacacs
log local0.info "Sending traffic to other virtual as expected" }
}
if { [matchclass $addr starts_with $::syslog_chan1_string] }
{ pool syslog_pool_Channel_1 }
elseif { [matchclass $addr starts_with $::syslog_chan2_string] }
{ pool syslog_pool_Channel_2 }
else { pool syslog_pool_Channel_0 }
}
}
Secondary Syslog VIP
rule syslog-tacacs-pool-select {
when CLIENT_DATA {
set addr [findstr [UDP::payload] Address 8 ,]
if { [matchclass $addr equals $::XXXXX_subnets_network] } { pool syslog_pool_XXXXXX
log local0.info "I selected the XXXXX pool, YAY!.....addr $sddr" }
else { pool syslog_pool_Channel_1
log local0.info "selected syslog channel 1" }
}
}