Skip to main content
NetApp Knowledge Base

How does ONTAP 9.2 and later versions select a route?

Views:
6,915
Visibility:
Public
Votes:
8
Category:
ontap-9
Specialty:
nas
Last Updated:

Applies to

ONTAP 9.2 and higher versions

Answer

ONTAP will take the following steps in order for route selection, beginning at the top and moving down, if the condition is not met:

  1. ONTAP will select the most specific routes (static) to the desitination address
  2. If ONTAP finds two or more routes that qualify as the most specific route and the source LIF address is known (Typically seen when a LIF resides on the same subnet as the destination)
    • Select a route with a gateway in the same network as that LIF address, if possible
      • This condition is met when a gateway is found in the same subnet as the destination
    • Else: ONTAP will select a route that is of the same port as that of LIF, if possible 
      • This condition is met when ONTAP finds a route that is associated with the same port that the source LIF is assigned to
    • Else: ONTAP will select a route with a gateway in the same network as another LIF address that can fulfill that service, if possible 
      • This condition applies to LIFs and service policies in ONTAP 9.6 and later
      • This condition is met when a client forces a request for a specific service, and the LIF in question does not have a route
        • ONTAP will send the response from a LIF that can reach the destination and is configured with the appropriate service 
  3. ONTAP will use the weighted metric as a tie-breaker

Note: 

  • It is possible to select a route on the remote nodes for outbound connections (DNS, NIS, LDAP, AD, etc.) if it is the most specific route
  • If there is a choice between an equally specific local and remote route, the local route will be preferred

Additional Information

Route selection examples
Scenario 1 - ONTAP responds to service via asymmetric route due to data LIF on same subnet

Cluster::*> network route active-entry show -vserver vserver -node node-01  

Vserver: vserver 
Node: nas-cm93-01 
Subnet Group: 0.0.0.0/0 
Destination             Gateway              Interface   Metric  Flags 
----------------------  -------------------  ---------   ------  ----- 
10.216.29/24            link#3               e0c             60  U 
172.16.1/24             link#4               e0d             60  U 
default                 10.216.29.1          e0c             65  UGS 
default                 172.16.1.1           e0d             67  UGS 

  • A TCP connection is made from client 172.16.1.50 to the filer’s LIF at 10.216.29.25. 
  • To send the return packet, ONTAP needs to select the most specific route. 
  • The most specific route in this case is the directly connected route on e0d. 
  • In this case, the traffic will route asymmetrically, entering via the e0c interface on the 10.216.29/24 network and egressing via e0d on the 172.16.1/24 network. 
Scenario 2 - ONTAP responds to service via configured conflicting route

cluster::*> network route active-entry show -vserver vserver -node node-01        
  
Vserver: vserver 
Node: nas-cm93-01 
Subnet Group: 0.0.0.0/0 
Destination             Gateway              Interface   Metric  Flags 
----------------------  -------------------  ---------   ------  ----- 
10.216.29/24            link#3               e0c             60  U 
172.16.1/24             10.216.29.1          e0c             65  UGS 
172.16.1/24             link#3               e0d             60  U 
default                 10.216.29.1          e0c             65  UGS 
default                 172.16.1.1           e0d             67  UGS 

  • The same connection is created from client 172.16.1.50 to LIF IP 10.216.29.25
  • However, the storage administrator has now added a conflicting route for the 172.16.1/24 pointing to the 10.216.29.1 gateway
  • Now when ONTAP finds the most specific route to the destination (172.16.1.50), it finds two entries 
    • The first route is to the gateway in the same subnet as our source address 10.216.29.25
    • The second is the directly connected route e0d

Destination             Gateway              Interface   Metric  Flags 
----------------------  -------------------  ---------   ------  ----- 
172.16.1/24             10.216.29.1          e0c             65  UGS 
172.16.1/24             link#3               e0d             60  U 

  • Using the rules above, ONTAP will pick the route with the gateway in the same network as our source address and send the traffic out e0c to gateway 10.216.29.1 
  • This will avoid asymmetric routing 
Scenario 3 - ONTAP sends service request via configured route
  • ONTAP needs to connect to a DNS server in the 172.16.1.0/24 network 
  • The routing table is the same and ONTAP is presented with the same routing decision

Destination             Gateway              Interface   Metric  Flags 
----------------------  -------------------  ---------   ------  ----- 
172.16.1/24             10.216.29.1          e0c             65  UGS 
172.16.1/24             link#3               e0d             60  U 

  • In this case, ONTAP will select the directly connected route off e0d because it has a lower metric
  • The reason this differs from scenario two is that ONTAP has no designated source address because it is initiating the connection instead of responding to a request that came in on a specific LIF

Note: 

  • ONTAP cannot act as a router, it will not forward traffic if defined as a L3 gateway for another host
  • ONTAP does not bridge its interfaces, L2 traffic received on one interface will not be forwarded out any other interface

 

NetApp provides no representations or warranties regarding the accuracy or reliability or serviceability of any information or recommendations provided in this publication or with respect to any results that may be obtained by the use of the information or observance of any recommendations provided herein. The information in this document is distributed AS IS and the use of this information or the implementation of any recommendations or techniques herein is a customer's responsibility and depends on the customer's ability to evaluate and integrate them into the customer's operational environment. This document and the information contained herein may be used solely in connection with the NetApp products discussed in this document.