nerdexam
F5

201 · Question #312

A virtual server is listening at 10.10.1.100:80 and has the following iRule associated with it: when HTTP_REQUEST { if {[HTTP::uri] ends_with "txt" } { pool pool1 } elseif {[HTTP::uri] ends_with…

The correct answer is D. Unknown. The pool cannot be determined from the information provided. The provided iRule snippet contains severe syntax errors and is incomplete, preventing a deterministic evaluation of which pool would be selected.

Section 7: Configure Advanced Features

Question

A virtual server is listening at 10.10.1.100:80 and has the following iRule associated with it:

when HTTP_REQUEST { if {[HTTP::uri] ends_with "txt" } { pool pool1 } elseif {[HTTP::uri] ends_with "php" } { pool pool2 }

Options

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

How the community answered

(45 responses)
  • A
    4% (2)
  • B
    7% (3)
  • C
    16% (7)
  • D
    73% (33)

Why each option

The provided iRule snippet contains severe syntax errors and is incomplete, preventing a deterministic evaluation of which pool would be selected.

Apool1

Pool1 would only be selected if the iRule were syntactically correct and the URI ended with 'txt', which cannot be assumed given the iRule's invalid structure.

Bpool2

Pool2 would only be selected if the iRule were syntactically correct and the URI ended with 'php', which cannot be assumed given the iRule's invalid structure.

CNone. The request will be dropped.

While a malformed iRule might lead to connection drops, the exact behavior is undefined, and it cannot be definitively stated that the request will be dropped without knowing the BIG-IP's error handling for such iRules.

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

The iRule snippet provided is syntactically incorrect with misplaced and missing braces, which would prevent it from parsing or executing properly, thus making the pool selection indeterminable from the given information.

Concept tested: iRule syntax and execution flow

Source: https://techdocs.f5.com/en-us/bigip-15-0-0/big-ip-irules-reference/irule-syntax.html

Topics

#iRules#HTTP_REQUEST event#HTTP::uri#pool selection logic

Community Discussion

No community discussion yet for this question.

Full 201 Practice