Using Equal Cost Multiple Path (ECMP)
By using the Equal Cost Multiple Path (ECMP) mechanism on a cluster deployment, active cluster nodes advertise the virtual server IP addresses. The cluster node which receives the advertised traffic steers the traffic to the node that must process the traffic. There can be redundant steering in spotted and partially striped virtual servers. Therefore, from NetScaler 11 onwards, spotted and partially striped virtual server IP addresses advertise the owner nodes, which reduce the redundant steering.
To use ECMP, you must first perform the following:
- Enable the required routing protocol (OSPF, RIP, BGP, or ISIS) on the cluster IP address.
- Bind the interfaces and the spotted IP address (with dynamic routing enabled) to a VLAN.
- Configure the selected routing protocol and redistribute the kernel routes on the ZebOS by using the vtysh shell.
Perform similar configurations on the cluster IP address and on the external connecting device.
- Make sure that the licenses on the cluster support dynamic routing, otherwise ECMP does not work.
- ECMP is not supported for wildcard virtual servers since RHI needs a VIP address to advertise to a router and wildcard virtual servers do not have associated VIP addresses.
Figure 1. ECMP topology
When you use ECMP mechanism for traffic distribution on a cluster deployment, the active cluster nodes advertise the virtual server IP addresses to the upstream router. The ECMP router can reach the VIP address via SNIP0, SNIP1, or SNIP2. The traffic flow in the Figure 1 is described as follows:
- The client sends a request to the VIP hosted on cluster.
- The upstream router, based on the learned routes of the VIP, forwards the packet to any one of the nodes. Let’s say NS1. The node NS1 is the flow receiver.
- The flow receiver (NS1) determines the node that must process the traffic, which is called the flow processor. For example, Node NS2 is the flow processor.
- The flow receiver (NS1) with SNIP1 (22.214.171.124) steers the request to the flow processor (NS2) with SNIP2 (126.96.36.199).
- The flow processor (NS2) establishes a connection with the server.
- The server processes the request and sends the response to the SNIP address that sent the request to the server.
- Only ACTIVE nodes advertise VIP routes.
- INACTIVE nodes do not advertise VIP routes.
- All ACTIVE nodes advertise striped VIPs.
- Only ACTIVE owner nodes advertise spotted or partially striped VIPs.
To configure ECMP on the cluster by using the command line interface
Log on to the cluster IP address.
Enable the routing protocol.
enable ns feature <feature>
Example: To enable the OSPF routing protocol.
enable ns feature ospf
Add a VLAN.
add vlan <id>
add vlan 97
Bind the interfaces of the cluster nodes to the VLAN.
bind vlan <id> -ifnum <interface_name>
bind vlan 97 -ifnum 0/1/2 1/1/2 2/1/2
Add a spotted SNIP address for each node and enable dynamic routing on it.
add ns ip <SNIP> <netmask> -ownerNode <positive_integer> -dynamicRouting ENABLED
add ns ip 188.8.131.52 255.0.0.0 -ownerNode 0 -dynamicRouting ENABLED -type SNIP add ns ip 184.108.40.206 255.0.0.0 -ownerNode 1 -dynamicRouting ENABLED -type SNIP add ns ip 220.127.116.11 255.0.0.0 -ownerNode 2 -dynamicRouting ENABLED -type SNIP
Bind one of the spotted SNIP addresses to the VLAN. When you bind one spotted SNIP address to a VLAN, all other spotted SNIP addresses defined on the cluster in that subnet are automatically bound to the VLAN.
bind vlan <id> -IPAddress <SNIP> <netmask>
bind vlan 97 -ipAddress 18.104.22.168 255.0.0.0
You can use NSIP addresses of the cluster nodes instead of adding SNIP addresses. If so, you do not have to perform steps 3–6.
Configure the routing protocol on ZebOS using vtysh shell.
To configure an OSPF routing protocol on node IDs 0, 1, and 2.
vtysh ! interface vlan97 ! router ospf owner-node 0 ospf router-id 22.214.171.124 exit-owner-node owner-node 1 ospf router-id 126.96.36.199 exit-owner-node owner-node 2 ospf router-id 188.8.131.52 exit-owner-node redistribute kernel network 184.108.40.206/8 area 0 !
For VIP addresses to be advertised, RHI setting is done by using the vserverRHILevel parameter as follows:
add ns ip <IPAddress> <netmask> -type VIP -vserverRHILevel <vserverRHILevel>
For OSPF specific RHI settings, there are more settings that can be done as follows:
add ns ip <IPAddress> <netmask> -type VIP -ospfLSAType ( TYPE1 | TYPE5 ) -ospfArea <positive_integer>
Use the add ns ip6 command to perform the preceding commands on IPv6 addresses.
Configure ECMP on the external switch. The following sample configurations are provided for the Cisco® Nexus 7000 C7010 Release 5.2(1) switch. Similar configurations must be performed on other switches.
//For OSPF (IPv4 addresses) Global config: Configure terminal feature ospf Interface config: Configure terminal interface Vlan10 no shutdown ip address 220.127.116.11/8 Configure terminal router ospf 1 network 18.104.22.168/8 area 0.0.0.0 --------------------------------- //For OSPFv3 (IPv6 addresses) Global config: Configure terminal feature ospfv3 Configure terminal interface Vlan10 no shutdown ipv6 address use-link-local-only ipv6 router ospfv3 1 area 0.0.0.0 Configure terminal router ospfv3 1
In a cluster setup, on an owner node that has a spotted SNIP address configuration, you can now disable the ownerDownResponse option. By default, the option is enabled, allowing the node to respond to an ICMP/ARP/ICMP6/ND6 request coming from the upstream router. You can now disable this option to allow the router to monitor if a cluster node is active or inactive. When the router sends a request, if the option is disabled, it identifies the owner node to be inactive and unavailable for traffic distribution.
add ns ip <ipddress> <netmask> -ownernode <node-id> –ownerDownResponse disable