
Chapter 4: Configuring the High-Level Network
4-52
IP addresses
You can specify the client_addr or the server_addr variable within a rule
to select a pool. For example, if you want to load balance based on part of
the client’s IP address, you might want a rule that states:
“All client requests with the first byte of their source address equal to 206
will load balance using a pool named clients_from_206 pool. All other
requests will load balance using a pool named other_clients_pool.”
Figure 4.20 shows a rule that implements the preceding statement.
Figure 4.20 A rule based on the client IP address variable
For additional examples of rules using IP packet header information, see
Additional rule examples, on page 4-65.
Port numbers
BIG-IP includes rule variables that you can use to select a pool based on the
port number of the client or server. These variables are client_port and
server_port.
To configure a rule to select a pool based on a port number, use the syntax
shown in the example in Figure 4.21.
Figure 4.21 A rule based on a TCP or UDP port number
IP protocol numbers
BIG-IP includes a rule variable, ip_protocol, that you can use to select a
pool based on an IP protocol number.
rule clients_from_206_rule {
if ( client_addr equals 206.0.0.0 netmask 255.0.0.0 ) { {
use ( clients_from_206 )
}
else {
use ( other_clients_pool )
}
}
rule my_rule {
if (client_port > 1000) {
use (slow_pool)
}
else {
use (fast_pool)
}
}
Comentarios a estos manuales