How do you determine the most specific network route ONTAP 9.2 and later versions will use for network traffic?
Applies to
- ONTAP 9.2 and later versions
- IPv4
Description
- How ONTAP chooses a route when it needs to initiate a new request or reply to a request.
- To determine the most specific route(s) to the destination, run the following command from the ONTAP CLI:
set advanced; network route active-entry show -vserver vserver -node node-01
- This will include routes that originate from the LIFs on the node specified
- The command "route show" will only show routing configurations (not the actual routes in the routing table)
- Alternatively, ROUTE-ACTIVE.XML can be reviewed in the AutoSupport section of ActiveIQ
- From the available routes determine which route has the "narrowest" (most-specific or smallest) subnet that the destination IP will fit into.
- For example, if the destination IP address is 10.1.1.1, looking at routing table with the following destinations:
- "default" or 0.0.0.0/0 matches and has a /0 (all zeroes) netmask
- 10.1/16 matches and has a /16 (255.255.0.0) netmask
- 10.1.1/24 matches and has a /24 (255.255.255.0) netmask
- 10.1.1.1/32 matches and has a /32 (all ones) netmask (32 is more specific than 24, 16, and 0). This is an example of a single host route, an exact match to a single IP address, making it the most specific route
- For example, if the destination IP address is 10.1.1.1, looking at routing table with the following destinations:
(The actual routing decision takes place looking at most-specific to least-specific address, ending up a the default route 0.0.0.0/0 when nothing else matches, including link-local addresses.
Additional Information
- How does ONTAP 9.2 and later versions select a route?
- ip subnet calculator
- The process is similar in IPv6, but instead of a specifiying a netmask (or more formally, a subnet mask) to define a subnet it use a network prefix; the larger the prefix the smaller the subnet.