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

BGP聚合(as-se、summary-only)

(2005-10-18 09:46:09)
分类: ~~~ BGP ~~~
BGP聚合(as-se、summary-only)
 
 
//// router a ////
 
int lo0
  ip addr 1.1.1.1 255.255.255.0
int lo1
  ip addr 192.1.24.1 255.255.255.0
int lo2
  ip addr 192.1.25.1 255.255.255.0
 
int s0/0
  ip addr 192.1.1.1 255.255.255.0
 
router bgp 100
  neighbor 192.1.1.2 remote-as 200
  netw 192.1.24.0
  netw 192.1.25.0
 
 
//// router b ////
 
int lo0
  ip addr 2.2.2.2 255.255.255.0
 
int s0/0
  ip addr 192.1.1.2 255.255.255.0
 
router bgp 200
  neighbor 192.1.1.1 remote-as 100
  neighbor 193.1.1.2 remote-as 200
  neighbor 194.1.1.1 remote-as 300
  neighbor 193.1.1.2 next-hop-self
 
 
 
//// router c ////
 
int lo0
  ip addr 3.3.3.3 255.255.255.0
 
int e0
  ip addr 193.1.1.2 255.255.255.0
 
router bgp 200
  neighbor 193.1.1.1 remote-as 200
 
 
 
 
//// router d ////
 
int lo0
  ip addr  4.4.4.4 255.255.255.0
 
int lo1
  ip addr 192.1.26.1 255.255.255.0
 
int lo2
  ip addr 192.1.27.1 255.255.255.0
 
router bgp 300
  netw 192.1.26.0
  netw 192.1.27.0
  neighbor 194.1.1.2 remote-as 200
 
 
//// 监视和测试配置 ////
在C上用show ip bgp显示BGP表。注意C已通过IBGP从路由器B知道了所有4个网络。周时注意下一跳地址为193.1.1.1,因为在B上的BGP进程上用了next-hop-self命令。
 
C# show ip bgp
  *>i192.1.24.0    193.1.1.1      100      100 i
  *>i192.1.25.0    193.1.1.1      100      100 i
  *>i192.1.26.0    193.1.1.1      100      300 i
  *>i192.1.27.0    193.1.1.1      100      300 i
 
现在,我们将这四个网络聚合进来自B的一个通告中。在B上,在BGP进程中加入下面命令。
router bgp 200
aggregate-address 192.1.24.0 255.255.252.0 as-set
 
C#  sh ip bgp
  *>i192.1.24.0    193.1.1.2      100      100 i
  *>i192.1.24.0/22 193.1.1.2      100      {100,300}i
  *>i192.1.25.0    193.1.1.2      100      100 i
  *>i192.1.26.0    193.1.1.2      100      300 i
  *>i192.1.27.0    193.1.1.2      100      300 i
 
为了发送聚合而隐藏更具体的路由,可选参数summary-only可加到聚合命令上。当更具体的路由不能增加任何益处,如有利于转发流量的路由(如前面讨论的多宿主情况下),此参数被使用。
 
router bgp 200
  aggregate-address 192.1.24.0 255.255.252.0 summary-only as-set
 
 
 
 
 
 

0

阅读 收藏 喜欢 打印举报/Report
前一篇:BGP汇总
后一篇:BGP路由反射器
  

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

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

新浪公司 版权所有