Tools

Channel Area

Service Product Area

Forum Affairs

BGP route selection on the firewall

116

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.

Other related questions:

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.

When multiple routes are reached at the same destination, BGP adopts the following policy to route:
1. Optimize the route with the highest preferred value (PrefVal);
2. Preferred route with the highest local precedence (Local_Pref);
3. Aggregate routes are preferred (aggregation routes have priority over non-aggregated routes);
4. Local manual aggregation routes have a higher priority than local auto-aggregated routes.
5. Routes imported through the network command take precedence over locally routes imported through the import-route command.
6. Preferred AS path (AS_Path) the shortest route;
7. Compare the Origin attribute, and select the route with the Origin type IGP, EGP, and Incomplete;
8. Preferred route with the lowest MED value;
9. Route learned from EBGP (EBGP route priority is higher than IBGP route);
10. The route with the lowest IGP metric for the AS to reach the BGP next hop is preferred. If load balancing is configured and multiple As_Path identical external routes are configured, multiple routes are selected for load balancing based on the configured number of routes.
11. Optimize the shortest route for Cluster_List;
12. Optimize the route with the smallest Originator_ID;
13. It is preferred that the router with the smallest router ID be advertised;
14. Compare the IP address of the peer, preferably from a peer with a smaller IP Address.