Why does the switch not select a direct route as the optimal route

1

By default, the switch selects routes in the following order:

Longest mask > route preference > route cost

When a direct route is not selected as the optimal route, check whether the switch has imported an external route with a longer mask than the direct route. If such a route exists, check whether the switch imports the more exact external route. This may be caused by incorrect routing configuration.

Other related questions:
What is a direct route for S series switches
Direct route: indicates the route of a subnet connected by a router interface. The interface and its connected subnet are in the same network segment, so the direct route always serves as the network segment route of the outbound interface. Direct routes are discovered by link-layer protocols and indicate routes that are in the same network segment as the interface address of a router. The routes are not maintained by network administrators and not obtained by a router using a certain algorithm. As long as the interface is active, the router writes the routing information of the network segment to the routing table. Direct routes cannot make a router obtain routes which are not directly connected to the router.

What are rules for route selection
  • Rule 1: The route with higher priority is preferred. A small value indicates a high priority. If a route cannot be selected using this rule, go to rule 2.
  • Rule 2: If two routes have the same priority, the route with the higher internal protocol preference is preferred. A small value indicates a high priority. If a route cannot be selected using this rule, go to rule 3.
  • Rule 3: If two routes have the same priority and belong to the same protocol, the route with the lower-cost value is preferred. If the cost values of two routes are the same, load balancing can be formed. If the number of routes for forming load balancing exceeds the maximum value (such as m) set by the system, the total number of only the first m routes act as the active routes.

  • How does an S series switch select the RPF route
    If the longest match policy is not configured for route selection, a multicast router selects an optimal route as the RPF route based on route precedences. If the longest match policy is configured for route selection, a multicast router selects a route with the longest matched mask in RPF selection. If the masks of routes have the same length, the router selects an optimal route based on route precedences. A multicast router selects an optimal route respectively from the static multicast routing table, MBGP routing table, MIGP routing table, and unicast routing table, and then selects one route from the four routes as the RPF route. Route selection rules are as follows: - If the longest match policy is configured for route selection: 1. A route with the longest matched mask is selected from the four routes. 2. If the masks of four routes have the same length, the route with the highest preference is selected. 3. If the four routes have the same preferences, a route is selected in the order of static multicast route, MBGP route, MIGP route, and unicast route. - If the longest match policy is not configured for route selection: 1. The route with the highest preference is selected. 2. If the four routes have the same preferences, a route is selected in the order of static multicast route, MBGP route, MIGP route, and unicast route.

    BGP route selection on the firewall
    When there are multiple routes to the same destination, BGP selects routes according to the following rules: 1. Prefers the route with the highest PreVal. 2. Prefers the route with the highest Local_Pref. 3. A summarized route is preferred. A summarized route takes precedence over a nonsummarized route. 4. A locally and manually summarized route takes precedence over a locally and automatically summarized route. 5. A route imported using the network command is preferred over a route imported using the import-route command. 6. Prefers the route with the shortest AS_Path. 7. Prefers the route with the highest Origin type. IGP is higher than EGP, and EGP is higher than Incomplete. 8. Prefers the route with the lowest MED. 9. Prefers routes learned from EBGP (EBGP routes have higher priorities than IBGP routes). 10. Prefers routes in an AS with the lowest IGP metric to BGP. If load balancing is configured, and multiple external routes with the same As_Path exist, select multiple routes based on the configured number of routes for load balancing. 11. Prefers the route with the shortest Cluster_List. 12. Prefers the route with the smallest Originator_ID. 13. Prefers the route advertised by the device with the smallest router ID. 14. Prefers the route learned from the peer with the smallest address if the IP addresses of peers are compared in the route selection process.

    If you have more questions, you can seek help from following ways:
    To iKnow To Live Chat
    Scroll to top