F5 BIG-IP LTM Specialist: Maintain and Troubleshoot — Question 47
An IT administrator wants to log which server is being load balanced to by a user with IP address 10.10.10.25.
Which iRule should the LTM Specialist use to fulfill the request?
Answer options
- A. when SERVER_CONNECTED { if { [IP::addr [IP::remote_addr]] equals 10.10.10.25]} { log local0. "client 10.10.10.25 connected to pool member [IP::addr [LB::server addr]]" } }
- B. when CLIENT_ACCEPTED { if { [IP::addr [clientside [IP::remote_addr]] equals 10.10.10.25]} { log local0. "client 10.10.10.25 connected to pool member [IP::addr [LB::server addr]]" } }
- C. when SERVER_CONNECTED { if { [IP::addr [clientside [IP::remote_addr]] equals 10.10.10.25]} { log local0. "client 10.10.10.25 connected to pool member [IP::addr [LB::server addr]]" } }
- D. when CLIENT_ACCEPTED { if { [IP::addr [IP::remote_addr] equals 10.10.10.25]} { log local0. "client 10.10.10.25 connected to pool member [IP::addr [LB::server addr]]" }
Correct answer: C
Explanation
The correct answer is C, as it uses the SERVER_CONNECTED event along with the proper syntax to log the connection of the specified client IP to the load balancer server. Options A and D incorrectly use SERVER_CONNECTED and CLIENT_ACCEPTED respectively, but either misidentify the IP address source or use incorrect syntax. Option B also misuses the event type and syntax, failing to capture the connection correctly.