nerdexam
F5

201 · Question #347

A virtual server is listening at 10.10.1.100:any and has the following iRule associated with it: when CLIENT_ACCEPTED { if {[TCP::local_port] equals 21 } { pool ftppool } elseif {[TCP::local_port]…

The correct answer is D. Unknown. The pool cannot be determined from the information provided. The iRule specifies pool assignments only for ports 21 and 23, leaving connections to port 22 without an explicit pool selection.

Section 7: Configure Advanced Features

Question

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

when CLIENT_ACCEPTED { if {[TCP::local_port] equals 21 } { pool ftppool } elseif {[TCP::local_port] equals 23 } { pool telnetpool } If a user connects to 10.10.1.100 and port 22, which pool will receive the request?

Options

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

How the community answered

(24 responses)
  • A
    8% (2)
  • B
    4% (1)
  • C
    13% (3)
  • D
    75% (18)

Why each option

The iRule specifies pool assignments only for ports 21 and 23, leaving connections to port 22 without an explicit pool selection.

Aftppool

The `ftppool` is only selected if the `TCP::local_port` is 21, not 22.

Btelnetpool

The `telnetpool` is only selected if the `TCP::local_port` is 23, not 22.

CNone. The request will be dropped.

While the iRule does not assign a pool for port 22, it does not explicitly contain a command to drop the request; the question asks which pool will receive the request, which cannot be determined from the iRule's explicit logic.

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

The iRule explicitly checks for `TCP::local_port` 21 or 23. If a connection is made to port 22, neither of these conditions is met, and there is no `else` statement to define a default pool, making the destination pool undetermined by the iRule itself.

Concept tested: iRule conditional logic and lack of default action

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

Topics

#iRules#CLIENT_ACCEPTED event#TCP::local_port#pool selection

Community Discussion

No community discussion yet for this question.

Full 201 Practice