301B practice question 20 of 30

Given the iRule: when HTTP_REQUEST { if {([HTTP::username] ne "") and ([HTTP::password] ne "") } { log local0. "client ip [IP::remote_addr] credentials provided [HTTP::username] [HTTP::password]"} else { pool old_application_pool } } The associated virtual server has a default pool named new_application_pool. Which functionality does the iRule provide?

Full set: 210 questions
Answer options
A: Allows clients with credentials to access the old_application_pool and logs the access of clients without credentials to the new_application_pool.
B: Allows clients without credentials to access the old_application_pool and logs the access of clients with credentials to the new_application_pool. Correct answer
C: Allows clients with credentials to access the old_application_pool and logs the attempted access of clients with credentials to the new_application_pool.
D: Allows clients without credentials to access the old_application_pool and logs the attempted access of clients without credentials to the new_application_pool.
Correct Answer:
B. Allows clients without credentials to access the old_application_pool and logs the access of clients with credentials to the new_application_pool.
Explanation

If both HTTP::username and HTTP::password are present the rule only logs the event; with no pool statement executed, traffic continues to the virtual server’s default pool (newapplicationpool). When either credential field is empty, the else clause explicitly directs the request to oldapplicationpool. Thus unauthenticated clients are routed to oldapplicationpool, while authenticated clients are merely logged and proceed to newapplicationpool.

Why Incorrect

A. Authenticated clients are not sent to oldapplicationpool.
C. Authenticated traffic is not steered to oldapplicationpool at all.
D. Logging occurs for authenticated, not unauthenticated, clients.

References

1) F5 Networks, “HTTP::username / HTTP::password – iRules commands,” BIG-IP TMOS v14.1, clouddocs.f5.com/api/irules/HTTPusername.html.

2) F5 Networks, “pool – iRules command,” BIG-IP TMOS v15.1, clouddocs.f5.com/api/irules/pool.html.

3) F5 Networks, Local Traffic Manager: Concepts v15.1, “Default Pools,” Ch.3, p.56.

Scroll to Top