How does BGP choose route ?
BGP of VRP platform is to compare at route table of the whole network. The protocol route (including static route and direct route) compares preference (namely, cost, display with display ip route), the lower is first.
If choosing BGP route, choose the best route in many BGP routes and obey the following rules.
1. Unconditionally choose route with Label (From VRPv5R001B01D37).
2. Compare PrefVal, the higher is first.
3. Compare local preference, the higher is first.
4. Convergence route is prior to non-convergence route.
5. Compare the length of as-path, the shorter is first.
6. Compare origin, IGP>EGP>IMCOMPLETE。
7. Compare MED, the lower is first.
8. EBGP > IBGP.
(Note: EBGP > IBGP > LocalCross > RemoteCross, LocalCross means local VPN cross route, RemoteCross means it receives the route from PE)
9. Compare the cost of next hop IGP, the lower is first.
(Note: For VPNV4 route, the route crossed to private network, ignore the step. So it cannot be iterated.)
10. Load balance, if the lists above are the same, it is equal route and can load balance (From VRPv5R001B01D39, note: as-path must be the same).
11. Compare the length of CLUSTER ID, the shorter is first.
12. Compare Originator ID (If there is no Originator ID, use ROUTER ID), the smaller is first.
13. Compare PEER IP ADDRESS, the smaller is first.