201 · Question #87
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 only assigns pools for connections to specific ports (21 or 23); since the connection is to port 22, neither condition is met, and the pool cannot be determined without further virtual server configuration details.
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
(27 responses)- A15% (4)
- B4% (1)
- C7% (2)
- D74% (20)
Why each option
The iRule only assigns pools for connections to specific ports (21 or 23); since the connection is to port 22, neither condition is met, and the pool cannot be determined without further virtual server configuration details.
`ftppool` is assigned only if the `TCP::local_port` is 21, not 22.
`telnetpool` is assigned only if the `TCP::local_port` is 23, not 22.
The request might be dropped, but it's not the only possible outcome; a default pool might be configured on the virtual server, making 'Unknown' a more accurate answer due to incomplete information.
The iRule's conditional statements only specify pool assignments for connections to local port 21 (`ftppool`) and local port 23 (`telnetpool`). Since the user connects to port 22, neither of these conditions are met, and without a default pool configured on the virtual server or an `else` block in the iRule, the pool cannot be determined from the information provided.
Concept tested: iRule conditional pool selection and default pool behavior
Source: https://clouddocs.f5.com/api/irules/TCP__local_port.html
Topics
Community Discussion
No community discussion yet for this question.