雏鹰部落

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
查看: 1716|回复: 5

[讨论/求助] 【提问】BGP 选路规则问题2

[复制链接]
发表于 2012-12-27 17:23:29 | 显示全部楼层 |阅读模式
学习任何一样东西,其实都有相通的道理和方法,知识摆在眼前,不学都是自己的损失:
1、积极主动思考及沉淀
2、积极参与交流及讨论
3、敢于犯错,敢于呈现
4、深度挖掘,追根究底
5、虚心求教,耐心分享
……



BGP AS规划如上,R1、R2、R3各自在BGP进程中network loopback路由(不做任何策略);
在R4及R5上分别进行路由汇总:
aggregate-address 172.16.0.0 255.255.0.0 as-set summary-only
如此一来,R6将分别从R4及R5上收到汇总路由:172.16.0.0/16
请问,R6将如何优选?为什么?

总有些人整天没事喜欢钻牛角,我特么就是这么个人,于是乎又有:


请问,现在R6该如何优选?


本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?立即注册

x
发表于 2012-12-27 21:23:03 | 显示全部楼层
本帖最后由 紫川凌 于 2012-12-27 21:46 编辑

问题一

R6#show ip bgp
BGP table version is 2, local router ID is 6.6.6.6
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete

   Network          Next Hop            Metric LocPrf Weight Path
*> 172.16.0.0       4.4.4.4                  0             0 400 {100,200} i
*                   5.5.5.5                  0             0 500 300 i
R6#show ip bgp 172.16.0.0
BGP routing table entry for 172.16.0.0/16, version 2
Paths: (2 available, best #1, table Default-IP-Routing-Table)
Flag: 0x820
  Advertised to **-groups:
     1         
  400 {100,200}, (aggregated by 400 4.4.4.4)
    4.4.4.4 (metric 2) from 4.4.4.4 (4.4.4.4)
      Origin IGP, metric 0, localpref 100, valid, external, best

  500 300, (aggregated by 500 5.5.5.5)
    5.5.5.5 (metric 2) from 5.5.5.5 (5.5.5.5)
      Origin IGP, metric 0, localpref 100, valid, external

问题二

R6#show ip bgp sum      
BGP router identifier 6.6.6.6, local AS number 600
BGP table version is 3, main routing table version 3
1 network entries using 117 bytes of memory
2 path entries using 104 bytes of memory
3/1 BGP path/bestpath attribute entries using 372 bytes of memory
2 BGP AS-PATH entries using 48 bytes of memory
0 BGP route-map cache entries using 0 bytes of memory
0 BGP filter-list cache entries using 0 bytes of memory
BGP using 641 total bytes of memory
BGP activity 3/2 prefixes, 8/6 paths, scan interval 60 secs

Neighbor        V    AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
4.4.4.4         4   400      57      57        3    0    0 00:01:54        1
5.5.5.5         4   500      49      53        3    0    0 00:26:50        1
R6#
R6#show ip bgp 172.16.0.0
BGP routing table entry for 172.16.0.0/16, version 3
Paths: (2 available, best #2, table Default-IP-Routing-Table)
  Advertised to **-groups:
     1         
  400 {999,100,200}, (aggregated by 400 4.4.4.4)
    4.4.4.4 (metric 2) from 4.4.4.4 (4.4.4.4)
      Origin IGP, metric 0, localpref 100, valid, external
  500 300, (aggregated by 500 5.5.5.5)
    5.5.5.5 (metric 2) from 5.5.5.5 (5.5.5.5)
      Origin IGP, metric 0, localpref 100, valid, external, best

将R5 clear一下

R6#show ip bgp sum
BGP router identifier 6.6.6.6, local AS number 600
BGP table version is 4, main routing table version 4
1 network entries using 117 bytes of memory
2 path entries using 104 bytes of memory
3/1 BGP path/bestpath attribute entries using 372 bytes of memory
2 BGP AS-PATH entries using 48 bytes of memory
0 BGP route-map cache entries using 0 bytes of memory
0 BGP filter-list cache entries using 0 bytes of memory
BGP using 641 total bytes of memory
BGP activity 3/2 prefixes, 9/7 paths, scan interval 60 secs

Neighbor        V    AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
4.4.4.4         4   400      68      69        4    0    0 00:12:31        1
5.5.5.5         4   500      64      68        4    0    0 00:00:28        1
R6#show ip bgp 172.16.0.0
BGP routing table entry for 172.16.0.0/16, version 4
Paths: (2 available, best #2, table Default-IP-Routing-Table)
Flag: 0x820
  Advertised to **-groups:
     1         
  500 300, (aggregated by 500 5.5.5.5)
    5.5.5.5 (metric 2) from 5.5.5.5 (5.5.5.5)
      Origin IGP, metric 0, localpref 100, valid, external
400 {999,100,200}, (aggregated by 400 4.4.4.4)
    4.4.4.4 (metric 2) from 4.4.4.4 (4.4.4.4)
      Origin IGP, metric 0, localpref 100, valid, external, best

所以结果很明显,选择最老的那条路由。而且aggregate-address XX as-set后括号中的AS不管有多少都当做1来处理。


发表于 2012-12-27 23:19:04 | 显示全部楼层
不错的帖子
 楼主| 发表于 2012-12-27 23:29:35 | 显示全部楼层
雪候鸟 发表于 2012-12-27 23:19
不错的帖子

miss you
发表于 2012-12-28 08:23:57 | 显示全部楼层
不错,感谢分享
发表于 2012-12-28 10:17:19 | 显示全部楼层
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|熊猫同学技术论坛|小黑屋| 网络工程师论坛 ( 沪ICP备09076391 )

GMT+8, 2024-4-19 00:51 , Processed in 0.080558 second(s), 19 queries , Gzip On.

快速回复 返回顶部 返回列表