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.(.NET文件的)拓扑图如下:
autostart = False
[localhost]
`3640`
p_w_picpath = C:\Program Files\Dynamips\p_w_picpaths\C3640-JS.BIN
ram = 128
idlepc = 0xffffffff80425144
confreg = 0x2142
`ROUTER Router1`
model = 3640
console = 2001
slot0 = NM-1E
slot1 = NM-4T
E0/0 = Router2 E0/0
S1/0 = Router3 S1/0
S1/1 = Router4 S1/1
`ROUTER Router2`
model = 3640
console = 2002
slot0 = NM-1E
slot1 = NM-4T
`ROUTER Router3`
model = 3640
console = 2003
slot0 = NM-1E
slot1 = NM-4T
`ROUTER Router4`
model = 3640
console = 2004
slot0 = NM-1E
slot1 = NM-4T
5.配置如下:
RouterA:
en
config t
host RouterA
inter e0/0
ip add 192.168.1.1 255.255.255.0
no shut
inter s1/0
ip add 192.168.2.1 255.255.255.0
no shut
inter s1/1
ip add 192.168.3.1 255.255.255.0
exit
router odr
RouterB:
en
config t
host RouterB
inter e0/0
ip add 192.168.1.2 255.255.255.0
no shut
inter loopback 0
ip add 166.1.1.1 255.255.255.0
exit
RouterC:
en
config t
host RouterC
inter s1/0
ip add 192.168.2.2 255.255.255.0
no shut
inter loopback 0
ip add 177.2.2.2 255.255.255.0
exit
RouterD:
en
config t
host RouterD
inter s1/1
ip add 192.168.3.2 255.255.255.0
no shut
inter loopback 0
ip add 188.3.3.3 255.255.255.0
exit
6:验证结果
RouterA:
RouterA#show ip route
Codes: C - connected, S - static, I - IGRP, 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, E - EGP
       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 not set
     188.3.0.0/24 is subnetted, 1 subnets
o       188.3.3.0 [160/1] via 192.168.3.2, 00:00:49, Serial1/1
     177.2.0.0/24 is subnetted, 1 subnets
o       177.2.2.0 [160/1] via 192.168.2.2, 00:00:13, Serial1/0
     166.1.0.0/24 is subnetted, 1 subnets
o       166.1.1.0 [160/1] via 192.168.1.2, 00:00:01, Ethernet0/0
C    192.168.1.0/24 is directly connected, Ethernet0/0
C    192.168.2.0/24 is directly connected, Serial1/0
C    192.168.3.0/24 is directly connected, Serial1/1
RouterA#
RouterB:
RouterB#show ip route
Codes: C - connected, S - static, I - IGRP, 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, E - EGP
       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.1 to network 0.0.0.0
     166.1.0.0/24 is subnetted, 1 subnets
C       166.1.1.0 is directly connected, Loopback0
C    192.168.1.0/24 is directly connected, Ethernet0/0
o*   0.0.0.0/0 [160/1] via 192.168.1.1, 00:00:17, Ethernet0/0
RouterB#
RouterC:
RouterC#show ip route
Codes: C - connected, S - static, I - IGRP, 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, E - EGP
       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.2.1 to network 0.0.0.0
     177.2.0.0/24 is subnetted, 1 subnets
C       177.2.2.0 is directly connected, Loopback0
C    192.168.2.0/24 is directly connected, Serial1/0
o*   0.0.0.0/0 [160/1] via 192.168.2.1, 00:00:22, Serial1/0
RouterC#
RouterD:
RouterD#
RouterD#show ip route
Codes: C - connected, S - static, I - IGRP, 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, E - EGP
       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.3.1 to network 0.0.0.0
     188.3.0.0/24 is subnetted, 1 subnets
C       188.3.3.0 is directly connected, Loopback0
C    192.168.3.0/24 is directly connected, Serial1/1
o*   0.0.0.0/0 [160/1] via 192.168.3.1, 00:00:26, Serial1/1
RouterD#
OVER!
 
ODR路由实验_实验