Dear all,
I have a question about iRule and the activation of connection mirroring on a VIP.
On the majority on my services, I’ve bound an iRule to send a log to my syslog server. This iRule, is sending information such as client ip address, the requested VIP, the SNAT address and the real server (node) it has been load balanced to. Here is an example of the output I have into my syslog server
Mar 20 07:20:15 1.1.1.8 : Client IP: 10.45.49.80:55726 -> 1.1.1.144:443 to SNAT To: 1.1.1.122:55726 -> 10.32.96.179:443
When I enable the “connection mirroring” for a particular service, that I want to have the connection table being transferred to the standby device (we are running in an active-standy mode), it seems not only the connection will be sent to the standby device, but the iRule will also be executed. This will send a log to my syslog server that comes from the standby device ip address. I’m wondering if that is a normal behavior with F5 LTM.
One of the strange thing is the, even if the iRules are the same on both devices, the log being sent to my syslog server is not the same line I’ve put into the iRule. In fact, the line being sent by the standby device in that case, seems using an older version of the iRule I have used a while ago. I really don’t understand that behavior.
Here are the two different lines that are sent to my syslog server:
Mar 23 07:09:44 1.1.1.7 : Client IP: 10.45.49.65:48994 -> 1.1.1.18:389 to SNAT To: 1.1.1.120:48994 -> 10.32.104.172:389
Mar 23 07:09:44 1.1.1.8 Client IP: 10.45.49.65%7:48994 -> Dest VIP: 1.1.1.18%7:389 to SNAT To: 1.1.1.120%7:48994 -> 10.32.104.172%7:389
The .8 is the standby device and the .7 is the active device. The .8 shows the wrong line, and after double check the iRule on the standby device, it is exactly the same as the active device. I really don’t understand.
Here is the line I have into my iRules:
HSL::send $hsl "<[lindex [split [virtual name] /] 1]>: Client IP: [getfield $cip_LCT % 1]:$cport_LCT -> [getfield $vip_LCT % 1]:$vport_LCT to SNAT To: [getfield [IP::local_addr] % 1]:[TCP::local_port] -> [getfield [IP::server_addr] % 1]:[TCP::server_port] "
Is there someone who can help my on this problem?
Thanks you all and best regards, Yanick