您的位置:首页 > 电脑网络 > 电脑配件 > BGP路由的 Selection Criteria

BGP路由的 Selection Criteria

luyued 发布于 2011-04-28 17:22   浏览 N 次  
Step 1 The router checks whether the next-hop attribute indicates an IP address that is reachable according to the current routing table. It is not necessary to have a direct connection to the next hop. It can very well be several router hops away and the route to it learned by the Interior Gateway Protocol (IGP). If the next hop is not reachable, the router does not consider the BGP route as a candidate to become selected as the best.

BT4破解无线网络密码教程


Step 2 The router prefers the route with the higher weight. The weight is not carried with the updates; it is a value that is assigned to the route by the local router and considered only within the router itself.

Step 3 If the local preference attributes are different, the route with the highest value is selected as best.

Step 4 If one of the routes is injected into the BGP table by the local router, the local router prefers it to any routes that it receives from other BGP routers.

Step 5 At this point, the lengths of the AS paths are compared (the content is not checked;only the number of autonomous systems in each AS path is counted). The route with the shortest length is selected.

Step 6 If the AS-path lengths are the same, the origin code is checked. BGP will prefer the path with the lowest origin type: IGP is lower than exterior gateway protocol (EGP), and EGP is lower than Incomplete.场合着装

Step 7 The router next compares MED values but only if it receives the updates from the same neighboring AS. Routes with a lower MED are preferred.

Step 8 At this point it is clear that the destination network is outside the local AS and that there is not much difference among the alternatives. Because the IP packets to the destination network must leave the AS, it is better that they do so as quickly as possible. If any of the alternatives are received from a BGP peer in another AS, that alternative is preferred.

Step 9 If the router receives all alternatives from peer routers in the local AS, each of them will indicate an exit point, and the closest exit is used. Distance to the exit point is calculated by comparing the IGP costs against the BGP next hops, as indicated in the routing table.

Step 10 If the router receives all alternatives from External Border Gateway Protocol (EBGP) neighbors, the most stable path (the oldest path) is preferred.

Step 11 If the router still cannot differentiate among the routes, it nevertheless has to make a decision and select the best route. It checks the BGP sessions on which it received the updates and chooses the route that was received on the session for which the peer router has the lowest BGP router-ID.明星八卦


1.首先丢弃下一跳(Next_Hop)不可达的路由;

2.weight属性值高的优先 (只存在于本台路由器)

3.本地优先级(local preference)值高的优先 (只存在于当前的AS.)

4.本地创建的路由优先

5.具有最短AS path属性的优先

6.最低源属性优先 (IGP
7.最低MED(multi-exit discriminator)属性值优先 (只在AS之间交换)

8.对于目的地非本地AS,任意可选BGP对等体路径均为最优。

9.优先选择距离最短的IGP邻居

10.在EBGP路径选择中优先选择最稳定的路径即最早学到的路由 (防止路由震荡)。

11.优先选择具有最小router-id地址的邻居。

Linux 论坛 思科论坛 Cisco

图文资讯
广告赞助商