Chinaunix首页 | 论坛 | 博客
  • 博客访问: 7180431
  • 博文数量: 3857
  • 博客积分: 6409
  • 博客等级: 准将
  • 技术积分: 15948
  • 用 户 组: 普通用户
  • 注册时间: 2008-09-02 16:48
个人简介

迷彩 潜伏 隐蔽 伪装

文章分类

全部博文(3857)

文章存档

2017年(5)

2016年(63)

2015年(927)

2014年(677)

2013年(807)

2012年(1241)

2011年(67)

2010年(7)

2009年(36)

2008年(28)

分类:

2012-12-26 20:13:35

原文地址:ODR 路由配置实例 作者:net527127

CiscoODR优化大规模

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

 

 

 

 

 

 

五台路由均为2691 IOS为c2691-m-z.12.3-12a.bin

三台主机VPC

 

R1配置:

R1#show run
Building configuration...

Current configuration : 1061 bytes
!
version 12.3
service timestamps debug datetime msec
service timestamps log datetime msec
service password-encryption
!
hostname R1
!
boot-start-marker
boot-end-marker
!
enable secret 5 $1$6dVj$wDHFRE37AG97KBxz5/eiP/
!
no aaa new-model
ip subnet-zero
!
!
ip cef
no ip domain lookup
!
!
!        
!        
!        
FastEthernet0/0
no ip address
shutdown
duplex auto
speed auto
!        
interface FastEthernet0/1
no ip address
shutdown
duplex auto
speed auto
!        
interface Serial1/0
ip address 192.168.1.1 255.255.255.0
serial restart-delay 0
!        
interface Serial1/1
no ip address
shutdown
serial restart-delay 0
!        
interface Serial1/2
no ip address
shutdown
serial restart-delay 0
!        
interface Serial1/3
no ip address
shutdown
serial restart-delay 0
!        
ip http server
ip classless
!        
!        
!        
line con 0
password zefa
logging synchronous
login   
no exec
transport preferred all
transport output all
line aux 0
transport preferred all
transport output all
line vty 0 4
password zefa
login   
transport preferred all
transport input all
transport output all
!        
end       
         

R2配置:

R2#show run
Building configuration...

Current configuration : 1104 bytes
!
version 12.3
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R2
!
boot-start-marker
boot-end-marker
!
enable secret 5 $1$L4V6$vEuaUR5DKfnRMG3jnqbFa0
!
no aaa new-model
ip subnet-zero
!
!
ip cef
no ip domain lookup
!
!
!        
!
!
interface FastEthernet0/0
no ip address
shutdown
duplex auto
speed auto
!
interface FastEthernet0/1
no ip address
shutdown
duplex auto
speed auto
!
interface Serial1/0
ip address 192.168.1.2 255.255.255.0
serial restart-delay 0
!
interface Serial1/1
ip address 10.1.1.1 255.255.255.0
serial restart-delay 0
!
interface Serial1/2
ip address 10.2.2.1 255.255.255.0
serial restart-delay 0
!
interface Serial1/3
ip address 10.3.3.1 255.255.255.0
serial restart-delay 0
!
router odr
!
ip http server
ip classless
!
!
!
line con 0
password zefa
logging synchronous
login
no exec
transport preferred all
transport output all
line aux 0
transport preferred all
transport output all
line vty 0 4
password zefa
login
transport preferred all
transport input all
transport output all
!
end

R3配置:

R3#show run
Building configuration...

Current configuration : 1070 bytes
!
version 12.3
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R3
!
boot-start-marker
boot-end-marker
!
enable secret 5 $1$.LCZ$aS/3Ue9aOdSIsl9wQCr0V/
!
no aaa new-model
ip subnet-zero
!
!
ip cef
no ip domain lookup
!
!
!        
!
!
interface FastEthernet0/0
ip address 172.16.1.1 255.255.255.0
duplex auto
speed auto
!
interface FastEthernet0/1
no ip address
shutdown
duplex auto
speed auto
!
interface Serial1/0
no ip address
shutdown
serial restart-delay 0
!
interface Serial1/1
ip address 10.1.1.2 255.255.255.0
serial restart-delay 0
!
interface Serial1/2
no ip address
shutdown
serial restart-delay 0
!
interface Serial1/3
no ip address
shutdown
serial restart-delay 0
!
ip http server
ip classless
!
!
!
line con 0
password zefa
logging synchronous
login
no exec
transport preferred all
transport output all
line aux 0
transport preferred all
transport output all
line vty 0 4
password zefa
login
transport preferred all
transport input all
transport output all
!
end

R3#

 

R4配置:

interface FastEthernet0/0
ip address 172.16.2.1 255.255.255.0
duplex auto
speed auto
!
interface FastEthernet0/1
no ip address
shutdown
duplex auto
speed auto
!
interface Serial1/0
no ip address
shutdown
serial restart-delay 0
!
interface Serial1/1
ip address 10.2.2.2 255.255.255.0
serial restart-delay 0
!
interface Serial1/2
no ip address
shutdown
serial restart-delay 0

R5配置:

interface FastEthernet0/0
ip address 172.16.3.1 255.255.255.0
duplex auto
speed auto
!
interface FastEthernet0/1
no ip address
shutdown
duplex auto
speed auto
!
interface Serial1/0
no ip address
shutdown
serial restart-delay 0
!
interface Serial1/1
ip address 10.3.3.2 255.255.255.0
serial restart-delay 0
!
interface Serial1/2
no ip address
shutdown
serial restart-dela

路由验证:

R1#
R1#show ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route

Gateway of last resort is 192.168.1.2 to network 0.0.0.0

C    192.168.1.0/24 is directly connected, Serial1/0
o*   0.0.0.0/0 [160/1] via 192.168.1.2, 00:00:04, Serial1/0
R1#

-----------------------------------------------------------------

R2#

Gateway of last resort is not set

     172.16.0.0/24 is subnetted, 3 subnets
o       172.16.1.0 [160/1] via 10.1.1.2, 00:00:56, Serial1/1
o       172.16.2.0 [160/1] via 10.2.2.2, 00:00:07, Serial1/2
o       172.16.3.0 [160/1] via 10.3.3.2, 00:00:14, Serial1/3
     10.0.0.0/24 is subnetted, 3 subnets
C       10.3.3.0 is directly connected, Serial1/3
C       10.2.2.0 is directly connected, Serial1/2
C       10.1.1.0 is directly connected, Serial1/1
C    192.168.1.0/24 is directly connected, Serial1/0
R2#

VPC的PING

VPCS 1 >1
VPCS 1 >ip 172.16.1.2 172.16.1.1 24
PC1 : 172.16.1.2 255.255.255.0 gateway

VPCS 1 >2
VPCS 2 >ip 172.16.2.2 172.16.2.1 24
PC2 : 172.16.2.2 255.255.255.0 gateway

VPCS 2 >3
VPCS 3 >ip 172.16.3.2 172.16.3.1 24
PC3 : 172.16.3.2 255.255.255.0 gateway

VPCS 3 >ping 172.16.1.1
172.16.1.1 icmp_seq=1 time=45.000 ms
172.16.1.1 icmp_seq=2 time=48.000 ms
172.16.1.1 icmp_seq=3 time=22.000 ms
172.16.1.1 icmp_seq=4 time=19.000 ms
172.16.1.1 icmp_seq=5 time=21.000 ms

VPCS 3 >2
VPCS 2 >ping 172.16.1.1
172.16.1.1 icmp_seq=1 time=21.000 ms
172.16.1.1 icmp_seq=2 time=53.000 ms
172.16.1.1 icmp_seq=3 time=18.000 ms
172.16.1.1 icmp_seq=4 time=52.000 ms
172.16.1.1 icmp_seq=5 time=20.000 ms

VPCS 2 >1
VPCS 1 >ping 192.168.1.1
192.168.1.1 icmp_seq=1 time=61.000 ms
192.168.1.1 icmp_seq=2 time=30.000 ms
192.168.1.1 icmp_seq=3 time=21.000 ms
192.168.1.1 icmp_seq=4 time=20.000 ms
192.168.1.1 icmp_seq=5 time=51.000 ms

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