Chinaunix首页 | 论坛 | 博客
  • 博客访问: 852915
  • 博文数量: 275
  • 博客积分: 3904
  • 博客等级: 中校
  • 技术积分: 4605
  • 用 户 组: 普通用户
  • 注册时间: 2012-04-17 21:10
文章分类

全部博文(275)

文章存档

2014年(9)

2013年(124)

2012年(142)

分类:

2012-06-20 14:05:39

  ODR-frame-Relay(按需路由在帧中继上的配置)

 

     

 

1. 需求说明:

  在大规模的路由网络中,例如在一个由省-地市-县-营业点组成的四级远程互连的路由网络中,如何维护大量的营业点路由器的直连 子网路由和配置营业点的静态路由成为一个巨大的负担.此案例中说明了如何利用cisco On-Demand Routing (ODR)技术来优化这种大规模路由网络的一个设想.

2.ODR简介:

  ODR技术(IOS 12.0.5T)能够使hub and spoke网络结构中的hub路由器自动地向spoke路由器(又称为stub站点)提供缺省路由,stub站点路由器不需要运行动态路由协议,也不需要 配置任何的静态路由,几乎没有系统资源的占用,就能够实现本地所有的直连子网向hub路由器的自动通告.

 

3.ODR需求:

  ODR使用Cisco Discovery Protocol (CDP)在hub路由器和spoke路由器之间传递路由信息,因此需要在hub和spoke路由之间的每条链路上启用cdp协议,cdp是一个 data-link层协议,可以运行在Lan/serial/frame-relay/atm等传输介质上.

 

4.ODR配置任务:

(1)在hub路由器启用ODR

(2)在hub路由器把ODR再发布到某个动态路由协议中

(3)启用hub路由器接口的cdp

(4)启用spoke路由器接口的cdp

 

5.路由设计:

  假定使用ospf协议来互连省级-地市级-县级网络,县级路由器同时作为ospf路由域的末节网络和ODR路由的hub路由 器,将营业点规划为stub site(即spoke),通过合适的ospf区域规划和路由汇总,就能够使ospf互连更大规模的网络,假如一个省有10个地市,每个地市有10个县, 每个县又有10个营业点,那么ospf只需管理大概100台路由器,而所有的营业点路由器(1000台)将通过ODR来自动管理路由信息而且几乎不占用系 统资源(因为cdp是data-link层协议而且流量很少).

所有的营业网点路由器(1000台)不部署任何路由协议和静态路由,它们通过cdp自动向县级路由器发布自己的所有直连路由,而且县级路由器会自动通过odr向它们发送0.0.0.0/0.

 

6.结论

这个方案中, 如果进行合适的体系化ip编址,ospf区域规划和路由汇总, 整个ospf路由域所维护的路由数量将得到最大的优化.只有省级和地市级路由器需要维护少量的ospf网络的主干路由和到营业点的汇总路由,县级和营业点 级路由器的负担都很小(普通25/26路由器即可).

 

 

 

 

 

 

 

一:实验拓扑:

  

 

 

 

二:实验步骤:

 

1: 1:R1,R2,R3配置帧中继.R1,R3做为spoke端,R2作为Hub端.

 

R1(config)#int lo 0

R1()#ip add 1.1.1.1 255.255.255.0

R1(config-if)#int s3/0

R1(config-if)#en fr

R1(config-if)#no fram inv

R1(config-if)#ip add 123.0.0.1 255.255.255.0

R1(config-if)#fram map ip 123.0.0.1 102 b

R1(config-if)#fram map ip 123.0.0.2 102 b

R1(config-if)#fram map ip 123.0.0.3 102 b

R1(config-if)#no sh

 

R2(config)#int lo 0

R2(config-if)#ip add 2.2.2.2 255.255.255.0

R2(config-if)#int s3/0

R2(config-if)#en fr

R2(config-if)#no fram inv

R2(config-if)#no sh

R2(config-if)#exit

R2(config)#int s3/0.123 mul

R2(config-subif)#ip add 123.0.0.2 255.2

R2(config-subif)#ip add 123.0.0.2 255.255.255.0

R2(config-subif)#fram map ip 123.0.0.1 201 b

R2(config-subif)#fram map ip 123.0.0.3 203 b

R2(config-subif)#no sh

 

 

R3(config)#int lo 0

R3(config-if)#ip add 3.3.3.3 255.255.255.0

R3(config-if)#int s3/0

R3(config-if)#en fr

R3(config-if)#no frame inv

R3(config-if)#ip add 123.0.0.3 255.255.255.0

R3(config-if)#fram map ip 123.0.0.3 302 b

R3(config-if)#fram map ip 123.0.0.2 302 b

R3(config-if)#fram map ip 123.0.0.1 302 b

R3(config-if)#no sh

 

 

//查看邻居信息,现在发现没有邻居.

R2#show cdp nei

Capability Codes: R - Router, T - Trans Bridge, B - Source Route Bridge

                  S - Switch, H - Host, I - IGMP, r - Repeater

 

Device ID        Local Intrfce     Holdtme    Capability Platform Port ID

 

// cdp run然后接口 cdp ena

 

R1(config)#cdp run     //帧中继上默认关闭

R1(config)#int s3/0

R1(config-if)#cdp enable //接口上默认关闭

 

R2(config)#cdp run

R2(config)#int s3/0.123 multipoint

R2(config-subif)#cdp enable

 

R3(config)#cdp run

R3(config)#int s3/0

R3(config-if)#cdp en

 

 

//再次查看邻居信息,发现现在邻居已经起来了.

R2#show cdp nei

Device ID        Local Intrfce     Holdtme    Capability Platform Port ID

R3               Ser 3/0.123        173          R        7206VXR   Ser 3/0

R1               Ser 3/0.123        140          R        7206VXR   Ser 3/0

2:在R2上做ODR.

 

R2(config)#router odr

 

 

//查看路由表

 

R1#show ip route

     1.0.0.0/24 is subnetted, 1 subnets

C       1.1.1.0 is directly connected, Loopback0

     123.0.0.0/24 is subnetted, 1 subnets

C       123.0.0.0 is directly connected, Serial3/0

o*   0.0.0.0/0 [160/1] via 123.0.0.2, 00:00:19, Serial3/0

 

R2#show ip route

     1.0.0.0/24 is subnetted, 1 subnets

o       1.1.1.0 [160/1] via 123.0.0.1, 00:00:33, Serial3/0.123

     2.0.0.0/24 is subnetted, 1 subnets

C       2.2.2.0 is directly connected, Loopback0

     3.0.0.0/24 is subnetted, 1 subnets

o       3.3.3.0 [160/1] via 123.0.0.3, 00:00:59, Serial3/0.123

     123.0.0.0/24 is subnetted, 1 subnets

C       123.0.0.0 is directly connected, Serial3/0.123

 

R3#show ip route

     3.0.0.0/24 is subnetted, 1 subnets

C       3.3.3.0 is directly connected, Loopback0

     123.0.0.0/24 is subnetted, 1 subnets

C       123.0.0.0 is directly connected, Serial3/0

o*   0.0.0.0/0 [160/1] via 123.0.0.2, 00:00:16, Serial3/0

 

 

 

3:在R2和R4上起OSPF.

 

R2(config-if)#ip os network point-to-point    //修改为点到点型网络,默认为BROADCAST

 

R2(config)#int f0/0

R2(config-if)#ip add 24.0.0.2 255.255.255.0

R2(config-if)#no sh

 

R2(config-router)#net 123.0.0.2 0.0.0.0 a 0

R2(config-router)#net 24.0.0.2 0.0.0.0 a 0

R2(config-router)#net 2.2.2.2 0.0.0.0 a 0

 

R4(config)#int f0/0

R4(config-if)#ip ospf network point-to-point  

 

R4(config)#int lo 0

R4(config-if)#ip add 4.4.4.4 255.255.255.0

R4(config)#int f0/0

R4(config-if)#ip add 24.0.0.4 255.255.255.0

R4(config-if)#no sh

R4(config-if)#exit

R4(config)#router os 1

R4(config-router)#no au

R4(config-router)#net 4.4.4.4 0.0.0.0 a 0

R4(config-router)#net 24.0.0.4 0.0.0.0 a 0

 

 

//查看路由表

R2#show ip route

     1.0.0.0/24 is subnetted, 1 subnets

o       1.1.1.0 [160/1] via 123.0.0.1, 00:00:12, Serial3/0.123

     2.0.0.0/24 is subnetted, 1 subnets

C       2.2.2.0 is directly connected, Loopback0

     3.0.0.0/24 is subnetted, 1 subnets

o       3.3.3.0 [160/1] via 123.0.0.3, 00:00:38, Serial3/0.123

     4.0.0.0/8 is variably subnetted, 2 subnets, 2 masks

O       4.4.4.4/32 [110/11] via 24.0.0.4, 00:00:45, FastEthernet0/0

o       4.4.4.0/24 [160/1] via 24.0.0.4, 00:02:17, FastEthernet0/0

     24.0.0.0/24 is subnetted, 1 subnets

C       24.0.0.0 is directly connected, FastEthernet0/0

     123.0.0.0/24 is subnetted, 1 subnets

C       123.0.0.0 is directly connected, Serial3/0.123

 

R4#show ip route

     2.0.0.0/32 is subnetted, 1 subnets

O       2.2.2.2 [110/11] via 24.0.0.2, 00:01:19, FastEthernet0/0

     4.0.0.0/24 is subnetted, 1 subnets

C       4.4.4.0 is directly connected, Loopback0

     24.0.0.0/24 is subnetted, 1 subnets

C       24.0.0.0 is directly connected, FastEthernet0/0

     123.0.0.0/24 is subnetted, 1 subnets

O       123.0.0.0 [110/5218] via 24.0.0.2, 00:01:19, FastEthernet0/0

 

//发现R4上没有到达R1,R3的路由

 

 

 

4:在R2上将ODR路由重分配进OSPF.

 

R2(config)#router os 1

R2(config-router)#redistribute odr metric 100 subnets        //将它的管理距离设置为100.

 

//再次查看R4的路由表

R4#show ip route

     1.0.0.0/24 is subnetted, 1 subnets

O E2    1.1.1.0 [110/100] via 24.0.0.2, 00:00:42, FastEthernet0/0

     2.0.0.0/32 is subnetted, 1 subnets

O       2.2.2.2 [110/11] via 24.0.0.2, 00:00:42, FastEthernet0/0

    3.0.0.0/24 is subnetted, 1 subnets

O E2    3.3.3.0 [110/100] via 24.0.0.2, 00:00:42, FastEthernet0/0

     4.0.0.0/24 is subnetted, 1 subnets

C       4.4.4.0 is directly connected, Loopback0

     24.0.0.0/24 is subnetted, 1 subnets

C       24.0.0.0 is directly connected, FastEthernet0/0

     123.0.0.0/24 is subnetted, 1 subnets

O       123.0.0.0 [110/5218] via 24.0.0.2, 00:00:42, FastEthernet0/0

// 完全符合工程要求

阅读(1205) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~