301B practice question 29 of 30
What does the following iRule do? when CLIENT_ACCEPTED { if { [matchclass [IP::client_addr] equals WebClient1-Whitelist1] }{ #log local0. "Valid client IP: [IP::client_addr] - forwarding traffic" #Pool WebClient1 } else { log local0. "Invalid client IP: [IP::client_addr] - discarding" discard } }
Full set: 210 questionsThis iRule executes upon a new client connection (CLIENTACCEPTED). It checks if the client's source IP address ([IP::clientaddr]) is a member of the data group (class) named WebClient1-Whitelist1. The if condition is true if a match is found. However, the code block for a successful match is commented out, meaning no action is taken and the connection proceeds. The else block executes if the client IP is not found in the data group. In this case, it logs a message and then silently drops the connection using the discard command.
A. The iRule compares a client IP to a list. If the client IP is on the list, discard and log the discard: This reverses the logic; the discard action happens when the IP is not on the list.
C. The iRule compares a client IP to a list. If the client IP is on the list, the client is sent to Pool WebClient1...: The Pool command is commented out with a # and therefore does not execute.
D. The iRule compares a client IP to a list. If the client IP is NOT on the list, the client is sent to Pool WebClient1...: This reverses the logic and incorrectly assumes the commented-out Pool command is active.
F5, Inc. (2021). F5 iRules Wiki. DevCentral.
matchclass command page: "This command returns 1 if the item is found in the class, and 0 if it is not." (Note: class match is the modern equivalent).
discard command page: "Silently discards the connection. No RST or FIN is sent."
IP::clientaddr command page: "Returns the client-side IP address."
The logic is derived directly from the documented behavior of these commands and standard if/else conditional structure.
Keep practicing
Take the free 301B practice test
Ten exam-style questions with answers and explanations, plus the exam facts and study guides.
More questions
Other 301B practice questions
- Question 3An LTM Specialist connects to an LTM device via the serial console cable and receives unr…
- Question 5An LTM Specialist realizes that a datacenter engineer has changed the console baud rate. …
- Question 7An LTM device pair is configured for failover and connection mirroring. The LTM devices a…
- Question 13An LTM Specialist has just manually failed the active LTM device over to the standby LTM …
- Question 17-- Exhibit – -- Exhibit -- Refer to the exhibit. An LTM Specialist has created a virtual …
- Question 19Which command should an LTM Specialist use on the command line interface to show the heal…
