BGP Cost Community
2014-03-10 15:30
169 查看
1.Cost Community概述
Cost Community是一个扩展的Community属性,只能传递给iBGP邻居或联邦peer(含联邦iBGP及联邦eBGP邻居),不能传递给eBGP邻居;
通过利用Cost Community,我们能够在一个AS或联邦内部自定义BGP的最优路径选择。Cost Community事实上是提供给我们除了“BGP13条选路规则”之外的又一“插入点”( point of insertion),相当于提供给我们另一个操控路由优选的手柄。
针对internal路由,在route-map中使用set extcommunity cost命令去设置cost community值。
在上述set命令后,配置一个ID(0-255)以及cost number(0- 4294967295)。Cost number值可以影响路径的优选,越小越优先。如果两个路径cost number值相等,那么拥有小ID值的被优选。
Cost community属性值是扩展community,在向邻居发送前需配置neighbor send-community extand。
下述命令可以跟route-map来设置Cost Community:
aggregate-address
neighbor default-originate route-map {in | out}
neighbor route-map
network route-map
redistribute route-map
2.Cost Community特性的限制
Cost Community特性只能部署在一个AS或联邦AS(大AS)内部。她是一个扩展Community属性并且只能传递给iBGP邻居或联邦邻居(联邦iBGP或联邦eBGP邻居),不能传递给eBGP邻居(不会报错,就是单纯的不携带)。
在部署Cost Community之前需确保AS或联邦内所有路由器都能识别她,并且要在AS或联邦内保证Cost Community配置的连续性,以防止潜在的环路问题。
Multiple cost community set clauses may be configured with the set extcommunity cost command in a single route map block or sequence. However, each set clause must be configured with a different ID value (0-255) for each point of insertion (POI). The ID value
determines preference when all other attributes are equal. The lowest ID value is preferred.
3.Cost Community如何影响BGP最佳路径选择
Cost Community事实上是提供给我们除了“BGP13条选路规则”之外的又一“插入点”( point of insertion),相当于提供给我们另一个操控路由优选的手柄。
默认情况下,这个插入点在“BGP13条选路规则”的规则八之后,规则九之前,也就是在负载均衡规则的前面。当一个BGP路由器有多条路径可达同一个目的地,选路规则进程会决定哪条路径是best,这条best的路径最终被安装进路由表使用。Cost Community允许我们在此之前横刀进入,干预路由的优选。如果路由器在本地路由优选过程中不能识别cost community,那么就默默的忽略cost community。
POI一共有两个,一个在规则八之后,体现在配置上就是set extcommunity cost igp,这是CISCO IOS的默认POI,也就是如果前面这条命令不加igp关键字,则默认就是igp;另一个POI是在所有的13条选路规则之前,也就是比weight的优先级还要高,体现在配置上就是set extcommunity cost pre-bestpath。
我们可以针对多条路径,在同一个POI设置不同的Cost Community。当这些路由进行PK时,cost value最低的优选,如果cost value相等,则优选拥有最小cost ID的路由。如果某条路由没有携带cost community,那么在cost community PK的这个环节,一个默认的cost value会被赋给这条路由, 这个值是2147483647,也就是cost community最大可选值4294967295的一半儿。
默认情况下,在CISCO IOS中如果BGP路由器收到的某条路由携带了Cost Community,那么这玩意儿就开始工作了(开始在POI影响选路规则并进行路由间的PK),如果本路由器想完全忽略Cost Community,那么可以在BGP进程中配置bgp bestpath cost-community ignore,即可无视Cost Community。
多条同一目的地的路径,可以针对特定的POI配置多个Cost
Cost Community是一个扩展的Community属性,只能传递给iBGP邻居或联邦peer(含联邦iBGP及联邦eBGP邻居),不能传递给eBGP邻居;
通过利用Cost Community,我们能够在一个AS或联邦内部自定义BGP的最优路径选择。Cost Community事实上是提供给我们除了“BGP13条选路规则”之外的又一“插入点”( point of insertion),相当于提供给我们另一个操控路由优选的手柄。
针对internal路由,在route-map中使用set extcommunity cost命令去设置cost community值。
在上述set命令后,配置一个ID(0-255)以及cost number(0- 4294967295)。Cost number值可以影响路径的优选,越小越优先。如果两个路径cost number值相等,那么拥有小ID值的被优选。
Cost community属性值是扩展community,在向邻居发送前需配置neighbor send-community extand。
下述命令可以跟route-map来设置Cost Community:
aggregate-address
neighbor default-originate route-map {in | out}
neighbor route-map
network route-map
redistribute route-map
2.Cost Community特性的限制
Cost Community特性只能部署在一个AS或联邦AS(大AS)内部。她是一个扩展Community属性并且只能传递给iBGP邻居或联邦邻居(联邦iBGP或联邦eBGP邻居),不能传递给eBGP邻居(不会报错,就是单纯的不携带)。
在部署Cost Community之前需确保AS或联邦内所有路由器都能识别她,并且要在AS或联邦内保证Cost Community配置的连续性,以防止潜在的环路问题。
Multiple cost community set clauses may be configured with the set extcommunity cost command in a single route map block or sequence. However, each set clause must be configured with a different ID value (0-255) for each point of insertion (POI). The ID value
determines preference when all other attributes are equal. The lowest ID value is preferred.
3.Cost Community如何影响BGP最佳路径选择
Cost Community事实上是提供给我们除了“BGP13条选路规则”之外的又一“插入点”( point of insertion),相当于提供给我们另一个操控路由优选的手柄。
默认情况下,这个插入点在“BGP13条选路规则”的规则八之后,规则九之前,也就是在负载均衡规则的前面。当一个BGP路由器有多条路径可达同一个目的地,选路规则进程会决定哪条路径是best,这条best的路径最终被安装进路由表使用。Cost Community允许我们在此之前横刀进入,干预路由的优选。如果路由器在本地路由优选过程中不能识别cost community,那么就默默的忽略cost community。
POI一共有两个,一个在规则八之后,体现在配置上就是set extcommunity cost igp,这是CISCO IOS的默认POI,也就是如果前面这条命令不加igp关键字,则默认就是igp;另一个POI是在所有的13条选路规则之前,也就是比weight的优先级还要高,体现在配置上就是set extcommunity cost pre-bestpath。
我们可以针对多条路径,在同一个POI设置不同的Cost Community。当这些路由进行PK时,cost value最低的优选,如果cost value相等,则优选拥有最小cost ID的路由。如果某条路由没有携带cost community,那么在cost community PK的这个环节,一个默认的cost value会被赋给这条路由, 这个值是2147483647,也就是cost community最大可选值4294967295的一半儿。
默认情况下,在CISCO IOS中如果BGP路由器收到的某条路由携带了Cost Community,那么这玩意儿就开始工作了(开始在POI影响选路规则并进行路由间的PK),如果本路由器想完全忽略Cost Community,那么可以在BGP进程中配置bgp bestpath cost-community ignore,即可无视Cost Community。
多条同一目的地的路径,可以针对特定的POI配置多个Cost
相关文章推荐
- 【风宇冲】Unity3D教程宝典之Raycast
- 【风宇冲】Unity3D教程宝典之 FX Maker
- Unity3D Pro 4.2.0 官方最新破解版(3D游戏开发工具和游戏引擎套件)
- Coroutines in Unity
- 分享Unity双开的方法
- 【风宇冲】Unity3D教程宝典之路径搜寻:第二讲SimplePath详细教程
- 【Unity3D自学记录】NGUI之ButtonMessage传参
- 微软社区大课堂 Microsoft Community Camp
- 微软社区大课堂 Microsoft Community Camp
- 【风宇冲】Unity3D教程宝典之两步实现超实用的XML存档 内容加密 + 防拷贝
- unity3d使用Log4.net进行日志记录
- unity的安装及软件介绍
- Unity3D与VS2008结合,加快Unity3D C#开发!
- 用C#重写Unity3D的Joystick
- Unity3D 中旋转和变换
- Unity3D不能创建工程
- unity摄像机和灯光组建重新理解
- [Unity3D]上海某大型游戏公司的基础面试题
- MVP Community Camp 社区大课堂
- MVP Community Camp 社区大课堂