nerdexam
F5

101 · Question #47

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. The iRule routes requests to pool2 when the URI ends with 'xt', which matches a URI such as 'file.txt' because 'txt' ends with 'xt'.

Section 2: F5 Solutions and Technology

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

(55 responses)
  • A
    5% (3)
  • B
    80% (44)
  • C
    4% (2)
  • D
    11% (6)

Why each option

The iRule routes requests to pool2 when the URI ends with 'xt', which matches a URI such as 'file.txt' because 'txt' ends with 'xt'.

Apool1

pool1 is only selected when the URI ends with 'htm'; a URI ending in 'xt' does not satisfy that first condition and therefore bypasses pool1.

Bpool2Correct

The second condition in the iRule checks whether the HTTP URI ends with the string 'xt'. A URI such as 'document.txt' satisfies this condition because the last two characters are 'xt', causing the LTM to direct the request to pool2.

CNone. The request will be dropped.

The request is not dropped because the second elseif condition matches a URI ending in 'xt' and provides an explicit pool assignment, so the connection is forwarded normally.

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

The pool can be determined from the iRule logic - the 'xt' suffix match in the elseif branch unambiguously selects pool2 for the described request.

Concept tested: F5 iRule URI string matching and pool selection

Source: https://clouddocs.f5.com/api/irules/HTTP__uri.html

Topics

#iRules#HTTP_REQUEST#URI matching#pool selection

Community Discussion

No community discussion yet for this question.

Full 101 Practice