nerdexam
F5

201 · Question #346

A virtual server is listening at 10.10.1.100:80 and has the following iRule associated with it: when HTTP_REQUEST { if { [HTTP::header UserAgent] contains "MSIE" } { pool MSIE_pool } else { pool…

The correct answer is B. Mozilla_pool. The iRule directs the request to a specific pool based on the 'User-Agent' HTTP header.

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::header UserAgent] contains "MSIE" } { pool MSIE_pool } else { pool Mozilla_pool } which pool will receive the request?

Options

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

How the community answered

(63 responses)
  • A
    6% (4)
  • B
    73% (46)
  • C
    17% (11)
  • D
    3% (2)

Why each option

The iRule directs the request to a specific pool based on the 'User-Agent' HTTP header.

AMSIE_pool

The `MSIE_pool` would only be selected if the `User-Agent` header contained 'MSIE', which is not specified in the question.

BMozilla_poolCorrect

The iRule's `if` condition checks if the `User-Agent` header *contains* 'MSIE'. Since no 'User-Agent' is provided in the question, this condition evaluates to false, causing the `else` block to execute and direct the request to the `Mozilla_pool`.

CNone. The request will be dropped.

The iRule includes an `else` block that ensures a pool is always selected, preventing the request from being dropped due to an unhandled condition.

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

The iRule's logic is deterministic; without a specific 'User-Agent' header, the `if` condition is false, leading directly to the `else` block for pool selection.

Concept tested: iRule HTTP header evaluation and conditional logic

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

Topics

#iRules#HTTP_REQUEST event#pool selection#conditional logic

Community Discussion

No community discussion yet for this question.

Full 201 Practice