Figure 1 shows how BGP processes routes. BGP routes can be imported from other protocols or learned from peers. To reduce the routing size, you can configure route summarization after BGP selects routes. In addition, you can configure route-policies and apply them to route import, receipt, or advertisement to filter routes or modify route attributes.
For details about route import, see Route Import; for details about BGP route selection rules, see BGP Route Selection; for details about route summarization, see Route Summarization; for details about advertising routes to BGP peers, see BGP Route Advertisement.
For details about import or export policies, see "Routing Policies" in NetEngine 8000 F Feature Description — IP Routing.
For details about BGP load balancing, see Load Balancing Among BGP Routes.
BGP itself cannot discover routes. Therefore, it needs to import other protocol routes, such as IGP routes or static routes, to the BGP routing table. Imported routes can be transmitted within an AS or between ASs.
Prefers routes without bit errors.
If the bestroute bit-error-detection command is run, BGP preferentially selects routes without bit error events.
Prefers the route with the largest PrefVal value.
PrefVal is Huawei-specific. It is valid only on the device where it is configured.
Prefers the route with the largest Local_Pref value.
If a route does not carry Local_Pref, the default value 100 takes effect. To change the value, run the default local-preference command.
Prefers a locally originated route to a route learned from a peer.
Prefers a route that carries the Accumulated Interior Gateway Protocol Metric (AIGP) attribute.
After the load-balancing as-path-ignore command is run, the routes with different AS_Path values can load-balance traffic.
Prefers the route with the Origin type as IGP, EGP, and Incomplete in descending order.
If the bestroute med-plus-igp command is run, BGP preferentially selects the route with the smallest sum of MED multiplied by a MED multiplier and IGP cost multiplied by an IGP cost multiplier.
Prefers local VPN routes, LocalCross routes, and RemoteCross routes in descending order.
LocalCross routes indicate the routes that are leaked between local VPN instances or routes imported between public network and VPN instances.
If the ERT of a VPNv4 route in the routing table of a VPN instance on a PE matches the IRT of another VPN instance on the PE, the VPNv4 route is added to the routing table of the second VPN instance. This route is called a LocalCross route. If the ERT of a VPNv4 route learned from a remote PE matches the IRT of a VPN instance on the local PE, the VPNv4 route is added to the routing table of that VPN instance. This route is called a RemoteCross route.
Prefers EBGP routes to IBGP routes.
If the peer high-priority command is run, the device preferentially selects the VPNv4, VPNv6, and EVPN routes learned from IPv4 or IPv6 peers.
If the bestroute nexthop-priority ipv4 command is run, the device preferentially selects the routes that are learned from VPNv4 or VPNv6 peers and are then leaked to a VPN instance and that carry IPv4 next hop addresses.
If the bestroute nexthop-priority ipv6 command is run, the device preferentially selects the routes that are learned from VPNv4 or VPNv6 peers and are then leaked to a VPN instance and that carry IPv6 next hop addresses.
Prefers the route that recurses to an IGP route with the smallest cost.
If the bestroute igp-metric-ignore command is run, BGP no longer compares the IGP cost.
Prefers the route with the shortest Cluster_List.
By default, Cluster_List takes precedence over Router ID during BGP route selection. To enable Router ID to take precedence over Cluster_List during BGP route selection, run the bestroute routerid-prior-clusterlist command.
Prefers the route advertised by the router with the smallest router ID.
After the bestroute router-id-ignore command is run, BGP does not compare router IDs during route selection.
If each route carries an Originator_ID, the originator IDs rather than router IDs are compared during route selection. The route with the smallest Originator_ID is preferred.
Prefers the route learned from the peer with the smallest IP address.
If BGP Flow Specification routes are configured locally, the first configured BGP Flow Specification route is preferentially selected.
Prefers the locally imported route in the RM routing table.
If a direct route, static route, and IGP route are imported, BGP preferentially selects the direct route, static route, and IGP route in descending order.
Prefers the Add-Path route with the smallest recv pathID.
Prefers the RemoteCross route with the smallest RD.
Prefers locally received routes over the routes imported between VPN and public network instances.
Prefers the route that was learned the earliest.
For details about BGP route attributes, see BGP Attributes.
For details about the BGP route selection process, see Figure 2.
On a large-scale network, the BGP routing table can be very large. Route summarization can reduce the size of the routing table.
Route summarization is the process of summarizing specific routes with the same IP prefix into a summary route. After route summarization, BGP advertises only the summary route rather than all specific routes to BGP peers.
IPv4 supports both automatic and manual route summarization, whereas IPv6 supports only manual route summarization.