BGP全称叫边界网关协议(Border Gateway Protocol),是一种高级距离矢量协议。主要用于超大型网络之间交换路由协议,如何进行最佳路径选择,以下将对13条选路原则进行阐述。
首先BGP在进行最优路径选择是有一个前提:路由都是打>(有资格成为最优路由),吓一跳可达,且关闭了自动汇总(no synchronized)。具体原则如下:
1、Prefer highest weight (local to router).
2、Prefer highest local preference (global within AS).
3、Prefer route originated by the local router (next hop = 0.0.0.0).
4、Prefer shortest AS path.
5、Prefer lowest origin code (IGP < EGP < incomplete).
6、Prefer lowest MED (exchanged between autonomous systems).