Chinaunix首页 | 论坛 | 博客
  • 博客访问: 2556592
  • 博文数量: 632
  • 博客积分: 10716
  • 博客等级: 上将
  • 技术积分: 8413
  • 用 户 组: 普通用户
  • 注册时间: 2008-04-01 22:35














分类: 系统运维

2009-01-19 21:16:24

1 WEIGHT值最高的路径优先。WEIGHT是CISCO专有的参数,且只对配置该参数的本地路由器有效,不能传递。缺省条件下,本地始发的路径具有相同的WEIGHT值(32768),所有其它的路径的WEIGHT值为0。

2 LOCAL-PREF值(本地优先级)。CISCO IOS中,LOCAL-PREF缺省值为100。该属性只能在本AS内传递。

3 基于始发地(origination)评估路由,路由器本地始发的路径优先。依次降低的优先级顺序是:default-originate(针对每个邻居配置), default-information-originate(针对每种地址簇配置),network , redistribute , aggregate-address 。

4 评估AS-PATH的长度,AS-PATH列表最短的路径优先。但可以通过配置 bgp bestpath as-path ignore (隐藏命令)来忽略这一步。

5 评估路由的origin属性,origin属性值最低的路由优先。IGP:origin值=0;


6 评估MED。MED值最小的路径胜出。该属性可以传递出AS。缺省条件下,只有在两条路径的第一个AS相同的情况下才会进行比较。如果配置了:bgp always-compare-med,那么对于所有路径都将比较MED,而不考虑它们是否来自于同一个AS。

7 EBGP路径优先于IBGP路径。

8 BGP优先选择到BGP下一跳的IGP度量最低的路径。

9 如果配置了maximum-paths[ibgp]n, n在2-6之间,并且存在多条等价成本的路径,那么BGP会在IP路由选择表中插入最多n条接收到的路径。这就激活了BGP多路径负载分担特性。如果没有使用可选关键字ibgp,则多路径特性就仅仅应用于ebgp路径。当不激活这一选项时,它的缺省值为1。

10 当两条路径都是外部路径时,BGP将优先选择最先收到的路径(最老的路径)。

11 BGP优先选择来自于最低的路由器ID的BGP路由器的路由。

12 如果多条路径的始发路由器ID或路由器ID相同,那么BGP将优选CLUSTER-LIST长度最短的路径。

13 BGP优选来自于最低的邻居地址的路径。

1.Prefer the path with the largest WEIGHT. WEIGHT is a Cisco proprietary parameter, local to the router on which it is configured.

2.Prefer the path with the largest local preference (LOCAL_PREF).

3.Prefer the path that was locally originated through a network or aggregate BGP subcommand, or through redistribution from an IGP. Local paths sourced by network/redistribute commands are preferred over local aggregates sourced by the aggregate-address command.

4.Prefer the path with the shortest AS_PATH. The AS_PATH is a listing of the autonomous systems through which this particular update traveled to reach the local autonomous system. The fewer autonomous systems it crossed, the more preferred the route is. Note the following:
a.- This step is skipped if you configure bgp bestpath as-path ignore.
b.- An AS_SET counts as 1, no matter how many autonomous systems are in the set.
c.- The AS_CONFED_SEQUENCE is not included in the AS_PATH length.

5.Prefer the path with the lowest origin type: IGP is lower than EGP, and EGP is lower than INCOMPLETE.

6.Prefer the path with the lowest multi-exit discriminator (MED). Note the following:
a.- This comparison is done only if the first (neighboring) AS is the same in the two paths; any Confederation Sub-autonomous systems are ignored. In other words, MEDs are compared only if the first AS in the AS_SEQUENCE is the same for multiple paths. Any preceding AS_CONFED_SEQUENCE is ignored.
b.- If bgp always-compare-med is enabled, MEDs are compared for all paths. This option needs to be enabled over the entire AS, otherwise, routing loops can occur.
c.- If bgp bestpath med-confed is enabled, MEDs are compared for all paths that consist only of AS_CONFED_SEQUENCE (paths originated within the local confederation).
d.- Paths received from a neighbor with a MED of 4,294,967,295 will have the MED changed to 4,294,967,294 before insertion into the BGP table.
e.- Paths received with no MED are assigned a MED of 0, unless bgp bestpath missing-as-worst is enabled; in that case, they are assigned a MED of 4,294,967,294.
f.- The bgp deterministic med command also can influence this step.

7.Prefer external (eBGP) over internal (iBGP) paths. Paths containing AS_CONFED_SEQUENCE are local to the confederation and, therefore, are treated as internal paths. There is no distinction between Confederation External and Confederation Internal.

8.Prefer the path with the lowest IGP metric to the BGP next hop.

9.If the maximum-paths n command is enabled and there are multiple external or confederation external paths from the same neighboring AS or Sub-AS, BGP inserts up to n most recently received paths in the IP routing table. This allows eBGP multi-path load sharing. The maximum value of n is currently 6. The default value, when this option is disabled, is 1. The oldest received path is marked as the best path in the output of show ip bgp longer-prefixes, and the equivalent of next-hop-self is performed before forwarding this best path to internal peers.

10.If both paths are external, prefer the path that was received first (the oldest one). This step minimizes route flapping because a newer path won't displace an older one, even if it was the preferred route based on the RID. It is better practice to apply the additional decision steps in 11, 12, and 13 to iBGP paths only, to ensure a consistent best path decision within the network and thereby avoid loops. This step is skipped if any of the following is true:
a.- The bgp best path compare-routerid command is enabled.
b.- The router ID is the same for multiple paths because the routes were received from the same router.
c.- No current best path exists. An example of losing the current best path occurs when the neighbor offering the path goes down.

11.Prefer the route coming from the BGP router with the lowest router ID. The router ID is the highest IP address on the router, with preference given to loopback addresses. It can also be set manually using the bgp router-id command. If a path contains RR attributes, the originator ID is substituted for the router ID in the path selection process.

12.If the originator or RID is the same for multiple paths, prefer the path with the minimum cluster ID length. This will be present only in a BGP Route-Reflector environment in which clients peer with RRs or clients in other clusters. In this scenario, the client must be aware of the RR-specific BGP attribute.

13.Prefer the path coming from the lowest neighbor address. This is the IP address used in the BGP neighbor configuration, and it corresponds to the remote peer used in the TCP connection with the local router.

阅读(1315) | 评论(0) | 转发(0) |

登录 注册