This article explains how to configure weighted static routes on NetScaler.
When the NetScaler is configured with multiple static routes to the same destination having the same cost or equal distance, it balances the load between the routes. This is called Equal-Cost Multi-Path (ECMP). For a static ECMP route, you can configure a weight value so that the NetScaler will use both the weight and the hashed value (based on the source and destination IP addresses) for balancing the load.
Run the following command to create a weighted static route using the NetScaler command line:
add route Network Netmask GatewayIPAddress –cost <value>
Example:
add route 172.16.20.0 255.255.255.0 10.10.10.5 -cost 1
add route 172.16.20.0 255.255.255.0 10.10.10.7 -cost 2
Run the following command to configure weight on an existing static route using the NetScaler command line:
set route Network Netmask GatewayIPAddress -weight <value>
Example:
set route 172.16.20.0 255.255.255.0 10.10.10.5 -weight 5
Run the following command to verify the routes configured:
Show route –detail
Network Netmask Gateway/OwnedIP State Type
------- ------- --------------- ----- ----
1) 172.16.20.0 255.255.255.0 10.10.10.5 UP STATIC
Distance: 1 Cost: 1 Weight: 5
2) 172.16.20.0 255.255.255.0 10.10.10.7 UP STATIC
Distance: 1 Cost: 2 Weight: 1
Citrix Documentation - Configuring Static Routes