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

区域间和外部路由汇总

(2005-10-12 15:02:34)
分类: ~~~ IGP ~~~
CISCO允许对地址进行汇总,以通过限制区域间通告的路由来达到节省资源的目的。
CISCO路由器支持两种类型的地址汇总:区域间汇总和外部路由汇总。区域间汇总用于在区域间汇总地址,而外部汇总用于收集到某个域中的一系列外部路由的汇总。区域间和外部路由汇总
 
 
 
路由器A将通过V。35交叉电缆连接到路由器B上。路由器B作为DCE为路由器A提供时钟。B和C通过以太网集线器连接。C通过交叉电缆连接到D上。C作为DCE为D提供时钟。D和E通过以太网集线器连接。B和C上的第二个以太网接口将不连到任何地方,所以需要禁用其活跃状态。这里使用以太网接口代替回送接口的原因是,回送接口在区域边界间是作为/32位网络通告的。
 
RIP运行D和E之间;E将通告所有连接的子网。D将把学习到的RIP路由重分布到OSPF中,这里不使用相互的重分布,因为不需要它来验证汇总。但是,如果你希望E能够看见OSPF网络,就需要加上它。所有IP地址分配如图。
 
//router a
int e0
  ip addr 192.1.1.2 255.255.255.0
 
int s0
  ip addr 152.1.2.1 255.255.255.252
 
router ospf 64
  network 152.1.2.0 0.0.0.255 area 1  //指定运行OSPF的接口以及该接口位于的区域
 
 
 
//router b
int e1/0
  ip addr 152.1.1.129 255.255.255.192
  no keepalive
 
int e0/0
  ip addr 152.1.1.1 255.255.255.128
 
int s0/0
  ip addr 152.1.2.2 255.255.255.252
  no ip direct-broadcast
  no ip mroute-cache
  no fair-queue
  clockrate 1000000
 
router ospf 64
  netw 152.1.1.0 0.0.0.255 area 0
  netw 152.1.2.0 0.0.0.255 area 1
 
 
 
//router c
int e1/0
  ip addr 152.1.1.193 255.255.255.192
  no ip direct-broadcast
  no keepalive
 
int e0/0
  ip addr 152.1.1.2 255.255.255.128
  no ip direct-broadcast
 
int s0/0
  ip addr 152.1.3.2 255.255.255.252
  no ip direct-broadcast
  no ip mroute-cache
  no fair-queue
  clockrate 1000000
 
router ospf 64
  netw 152.1.1.0 0.0.0.255 area 0
  netw 152.1.3.0 0.0.0.255 area 2
 
 
//router d
int e0
  ip addr 130.1.4.1 255.255.255.0
  no ip direct-broadcast
 
int s0
  ip addr 152.1.3.1 255.255.255.252
  no ip direct-broadcast
  ip ospf interface-retry 0
 
router ospf 64
  redistribute rip metric 10 sunets  //重分布RIP到OSPF中(对于此实验,仅仅只需要一个方向上的重分布)
  network 152.1.3.0 0.0.0.255 area 2
 
router rip
  network 130.1.0.0
 
 
 
//router e
int lo0
  ip addr 130.1.1.1 255.255.255.0
  no ip direct-broadcast
 
int lo1
  ip addr 130.1.2.1 255.255.255.0
  no ip direct-broadcast
 
int lo2
  ip addr 130.1.3.1 255.255.255.0
  no ip direct-broadcast
 
int lo3
  ip addr 130.1.5.1 255.255.255.0
 
router rip
  netw 130.1.0.0
 
 
//监视和测试配置
 
show ip ro检测一下路由表
O IA  152.1。1.128/26  [110/65] VIA 152.1.2.2  SERIAL 0
O IA  512.1.1.192/26   [110/94] VIA 152.1.2.2 SERIAL 0
 
因为所有它些网络都是区域0的一部分。所以区域边界路由器ABR B和C都可以将网络汇总到一个项目152.1。1.0/24中:
 
routerb# router ospf 64
routerb(config-router)# area 0 range 152.1.1.0 255.255.255.0
 
routerc# router ospf 64
routerc(config-router)# area range 152.1.1.0 255.255.255.0
 
show ip ro
O IA 152.1.1.0/24  [110/84]VIA 152.1.2.2 SERIAL 0
 
路由器D做为ASBR,将把E学到的RIP重分布到OSPF中。使用SHOW IP RO
130.1.0.0/24 IS SUBNETTED, 7 SUBNETS
O E2  130.1。3.0
O E2  130.1。2.0
O E2  130.1。1.0
O E2  130.1。7.0
O E2  130.1。6.0
O E2  130.1。5.0
O E2  130.1。4.0
 
 
routerd# router ospf 64
routerd(config-router)# summary-address 130.1.0.0 255.255.248.0
 
 
sh ip ro
130.1.0.0/21 IS SUBNETTED,1 SUBNETS
O E2 130.1.0.0
 

0

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

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

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

新浪公司 版权所有