Citrix Systems 9.2 Network Router User Manual


 
C
HAPTER
8
Advanced Expressions: IP and MAC
Addresses, Throughput, VLAN IDs
You can configure expressions that parse IP and MAC addresses, IP subnets, and
transaction throughput rates.
In This Chapter
Expressions for IP Addresses and IP Subnets
Expressions for MAC Addresses
Expressions for Numeric Client and Server Data
Expressions for IP Addresses and IP Subnets
You can use advanced expressions to parse IP addresses and subnets. For
example, you can identify whether a request has originated from a client in a
particular subnet, as follows:
client.ip.src.in_subnet(147.1.0.0/16)
The following is an example of a Rewrite policy that examines subnets and
provides a different rewrite action for the Host header, depending on the subnet in
the request:
add rewrite action URL1-rewrite-action replace
"http.req.header(\"Host\")" "\"www.mycompany1.com\""
add rewrite policy URL1-rewrite-policy
"http.req.header(\"Host\").contains(\"www.test1.com\") &&
client.ip.src.in_subnet(147.1.0.0/16)" URL1-rewrite-action
add rewrite action URL2-rewrite-action replace
"http.req.header(\"Host\")" "\"www.mycompany2.com\""
add rewrite policy URL2-rewrite-policy
"http.req.header(\"Host\").contains(\"www.test2.com\") &&
client.ip.src.in_subnet(10.202.0.0/16)" URL2-rewrite-action