How does ONTAP 9.2 and later versions select a route?
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:
- ONTAP will select the most specific routes (static) to the destination address
- If ONTAP finds two or more routes that qualify as the most specific route and the source LIF address is known
- 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
- Select a route with a gateway in the same network as that LIF address, if possible
- ONTAP will use the weighted metric as a tie-breaker
- If the routes are of equal metric, pick the route that is listed higher in the routing table
- The lower metric will be higher in the routing table
- How ONTAP weights metrics based on media type
- If the routes are of equal metric, pick the route that is listed higher in the routing table
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
-
find meDestination 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
- Network traffic not sent or sent out of an unexpected interface after upgrade to 9.2 or later using routing groups
- Name services fail due to multiple default gateways with the same metric
- AutoSupport fails to send in ONTAP when routed through an intercluster 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