You can create static routes manually to:
You can assign weights to ECMP routes. You can create null routes to prevent routing loops.
Monitored Static Routes: If a manually created (static) route goes down, a backup route is not automatically activated. You must manually delete the inactive primary static route. However, if you configure the static route as a monitored route, the NetScaler appliance can automatically activate a backup route.
Static route monitoring can also be based on the accessibility of the subnet. A subnet is connected to a single interface, but it can be logically accessed through other interfaces. Subnets bound to a VLAN are accessible only if the VLAN is up. VLANs are logical interfaces through which NetScaler transmits and receives packets. A static route is marked as DOWN if the next hop resides on a subnet that is unreachable.
In a high availability (HA) setup, the default value for monitored state routes (MSRs) on the secondary node is UP. The value is set to avoid a state transition gap upon failover, which might result in dropping packets on those routes.
Consider the following simple topology, in which a NetScaler is load balancing traffic to a site across multiple servers.
Router R1 moves traffic between the client and NetScaler. The appliance can reach servers S1 and S2 through routers R2 or R3. It has two static routes through which to reach the servers' subnet, one with R2 as the gateway and another with R3 as the gateway. Both these routes have monitoring enabled. The administrative distance of the static route with gateway R2 is lower than the administrative distance of the static route with gateway R3. Therefore, R2 is preferred over R3 to forward traffic to the servers. Also, the default route on the NetScaler points to R1 so that all Internet traffic exits properly.
If R2 fails while monitoring is enabled on the static route, which uses R2 as the gateway, NetScaler marks it as DOWN. NetScaler now uses the static route with R3 as the gateway and forwards the traffic to the servers through R3.
NetScaler supports monitoring of IPv4 and IPv6 static routes. You can configure NetScaler to monitor an IPv4 static route by:
You can configure NetScaler to monitor an IPv6 static route by:
Weighted Static Routes: When NetScaler makes routing decisions involving routes with equal distance and cost, that is, Equal Cost Multi-Path (ECMP) routes, it balances the load between them by using a hashing mechanism based on the source and destination IP addresses. For an ECMP route, however, you can configure a weight value. NetScaler then uses both the weight and the hashed value for balancing the load.
Null Routes: If the route chosen in a routing decision is inactive, NetScaler chooses a backup route. If all the backup routes become inaccessible, the appliance might reroute the packet to the sender, which might result in a routing loop leading to network congestion. To prevent this situation, you can create a null route, which adds a null interface as a gateway. The null route is never the preferred route, because it has a higher administrative distance than the other static routes. But it is selected if the other static routes become inaccessible. In that case, the appliance drops the packet and prevents a routing loop.