|
假设总部和分支机构使用的都是思科设备,其实不用太复杂的命令配置,开了CDP之后,仅需要一条命令就可以在分支路由器上自动生成静态,下面就来看看具体是怎么实施的吧!~
一. 实验目的
使用ODR实现按需。
ODR能够使hub and spoke结构中的hub路由器自动地向spoke路由器(又称为stub站点)提供缺省路由,stub站点路由器不需要运行动态路由协议,也不需要 配置任何的静态路由,几乎没有系统资源的占用,就能够实现本地所有的直连子网向hub器的自动通告.
二. 实验拓扑
650) this.width=650;">
三. 配置要点
R6(config)#router odr
(仅需在全局配置模式使用此命令即可)
四. 验证结果
用debug可以看到学习的过程:
R6#debug cdp packets
CDP packet info debugging is on
R6#
01:05:23: CDP-PA: version 2 packet sent out on Serial0/1
01:05:23: CDP-PA: version 2 packet sent out on Serial0/2
01:05:23: CDP-PA: version 2 packet sent out on Serial0/3
01:05:34: CDP-PA: Packet received from R1 on interface Serial0/1
01:05:34: **Entry found in cache**
01:05:34: CDP-PA: Packet received from R2 on interface Serial0/2
01:05:34: **Entry found in cache**
01:05:41: CDP-PA: Packet received from R3 on interface Serial0/3
01:05:41: **Entry found in cache**
可以查看四台路由器,观察表的变化:
R6#show ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
o - ODR, P - periodic downloaded static route
Gateway of last resort is not set
1.0.0.0/24 is subnetted, 1 subnets
o 1.1.1.0 [160/1] via 11.11.11.1, 00:00:49, Serial0/1
2.0.0.0/24 is subnetted, 1 subnets
o 2.2.2.0 [160/1] via 22.22.22.2, 00:00:49, Serial0/2
33.0.0.0/24 is subnetted, 1 subnets
C &nbs
1 |
|