nerdexam
F5

201 · Question #43

A virtual server at 10.10.1.100:80 has the rule listed below applied. when HTTP_REQUEST { if {[HTTP::uri] ends_with "htm" } { pool pool1 } elseif {[HTTP::uri] ends_with "xt" } { pool pool2 } If a

The correct answer is B. pool2. This question presents a truncated iRule and asks which pool a request would be directed to based on its conditional logic.

Section 7: Configure Advanced Features

Question

A virtual server at 10.10.1.100:80 has the rule listed below applied. when HTTP_REQUEST { if {[HTTP::uri] ends_with "htm" } { pool pool1 } elseif {[HTTP::uri] ends_with "xt" } { pool pool2 } If a

Options

  • Apool1
  • Bpool2
  • CNone. The request will be dropped.
  • DUnknown. The pool cannot be determined from the information provided.

How the community answered

(41 responses)
  • A
    2% (1)
  • B
    88% (36)
  • C
    7% (3)
  • D
    2% (1)

Why each option

This question presents a truncated iRule and asks which pool a request would be directed to based on its conditional logic.

Apool1

This pool would be selected only if the request URI ended with 'htm', which is not implied by the correct answer.

Bpool2Correct

Assuming the complete question implies a URI that ends with 'xt' (e.g., '/document.xt'), the iRule's `elseif` condition `[HTTP::uri] ends_with 'xt'` would evaluate as true, directing the request to `pool2`.

CNone. The request will be dropped.

The iRule explicitly provides `pool` commands for both `if` and `elseif` conditions, ensuring the request is directed to a pool if either condition is met, rather than being dropped.

DUnknown. The pool cannot be determined from the information provided.

While the question is truncated, the iRule's logic is clear: if the URI ends with 'htm' it goes to pool1, otherwise if it ends with 'xt' it goes to pool2, meaning the pool can be determined if the URI is known.

Concept tested: F5 BIG-IP iRule HTTP_REQUEST event and conditional logic

Source: https://techdocs.f5.com/en-us/bigip-15-1-0/big-ip-external-api-and-irules-reference/tcl-commands.html

Topics

#iRules#HTTP_REQUEST event#URI matching#pool selection

Community Discussion

No community discussion yet for this question.

Full 201 Practice