加载中…
个人资料
  • 博客等级:
  • 博客积分:
  • 博客访问:
  • 关注人气:
  • 获赠金笔:0支
  • 赠出金笔:0支
  • 荣誉徽章:
正文 字体大小:

BGP Weight属性--两种操纵方法对比

(2006-11-12 15:33:30)
分类: ~~~ BGP ~~~

BGP <wbr>Weight属性--两种操纵方法对比

Routes with a higher weight are preferred when multiple routes exist to the same destination. Look at the above example:

  1. RTA has learned about network 175.10.0.0 from autonomous system 400 (AS400) and will propagate the update to RTC.
  2. RTB has also learned about network 175.10.0.0 from AS400 and will propagate it to RTC.
  3. RTC has now two ways for reaching 175.10.0.0 and has to decide which way to go.

If on RTC we can set the weight of the updates coming from RTA to be higher than the weight of updates coming from RTB, then we will force RTC to use RTA as a next hop to reach 175.10.0.0. This is achieved by using multiple methods:

RTC#

router bgp 300 
neighbor 1.1.1.1 remote-as 100 
neighbor 1.1.1.1 weight 200 
!-- route to 175.10.0.0 from RTA has 200 weight
neighbor 2.2.2.2 remote-as 200 
neighbor 2.2.2.2 weight 100 
!-- route to 175.10.0.0 from RTB will have 100 weight

Routes with higher weight are preferred when multiple routes exist to the same destination. RTA is preferred as the next hop.

The same outcome as above can be achieved by using route maps.

RTC#

router bgp 300 
neighbor 1.1.1.1 remote-as 100 
neighbor 1.1.1.1 route-map setweightin in 
neighbor 2.2.2.2 remote-as 200 
neighbor 2.2.2.2 route-map setweightin in 
... 
ip as-path access-list 5 permit ^100$ 
... 
route-map setweightin permit 10 
match as-path 5 
set weight 200 
!-- anything that applies to access-list 5, such as packets from AS100, have weight 200 
route-map setweightin permit 20
set weight 100
!-- anything else would have weight 100

0

阅读 收藏 喜欢 打印举报/Report
  

新浪BLOG意见反馈留言板 欢迎批评指正

新浪简介 | About Sina | 广告服务 | 联系我们 | 招聘信息 | 网站律师 | SINA English | 产品答疑

新浪公司 版权所有