101 · Question #219
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] equ
The correct answer is D. Unknown. The pool cannot be determined from the information provided.. The iRule handles only ports 21 and 23 with no else clause, so a connection on port 22 may fall to a virtual server default pool that is not specified in the given information.
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
(47 responses)- A17% (8)
- B9% (4)
- C32% (15)
- D43% (20)
Why each option
The iRule handles only ports 21 and 23 with no else clause, so a connection on port 22 may fall to a virtual server default pool that is not specified in the given information.
ftppool is only selected when TCP::local_port equals 21; a connection on port 22 does not satisfy that condition.
telnetpool is only selected when TCP::local_port equals 23; a connection on port 22 does not satisfy that condition.
The request is not necessarily dropped - if the virtual server has a default pool assigned, that pool would handle the connection, but this cannot be confirmed from the information given.
When a client connects on port 22, neither the ftppool condition (port 21) nor the telnetpool condition (port 23) is satisfied, and the iRule contains no else or default routing clause. Because the provided information does not indicate whether the virtual server has a default pool configured, the pool that will ultimately receive the request cannot be determined from the given information alone.
Concept tested: F5 iRule TCP port-based routing with no default branch
Source: https://clouddocs.f5.com/api/irules/TCP__local_port.html
Topics
Community Discussion
No community discussion yet for this question.