cisco按需路由实验配置

 按需路由:


一、按需路由的优点:
1、静态路由缺点
   必须要手动配置,同时在网络拓扑变化后也需要手动更新!在大型网络中配置工作量非常大
2、动态路由缺点
   虽然大大简化了,人工配置的负担,但是却占用了大量的网络带宽和路由资源
3、按需路由:ODR
   与动态路由相比,ODR提供IP路由选择信息的的开销非常小,而与静态路由相比,ODR的手工配置更少


二、按需路由的工作原理
 
1、ODR依赖于CDP在中央路由器和分支路由器之间传输信息,因此在中央路由器和分支路由器之间的所有链路上必须启用CDP
2、末节路由器使用CDP将自己所有直连网络的IP前缀信息发送给中央路由器,中央路由器将一条指向自己的默认路由发送给分支路由器,并将ODR报告的末节网络加入到路由表中
3、ODR并非一种路由选择协议,因为它交换的信息仅限于IP前缀和和默认路由(ODR不报告度量值,中央路由器将所有的路由的度量值设置为1跳)

三、网络拓扑图

             
           (S0/0)---------12.12.12.0/24---------(S0/0)[R2]  lo1: 2.2.2.2
         /  
      [R1](S0/1)---------13.13.13.0/24--------(S0/0)[R3]  lo1: 3.3.3.3
         \ 
           \(S0/2)---------14.14.14.0/24---------(S0/0)[R4] lo1: 4.4.4.4


第一步:基础配置,使同一网段可以ping通
1、基础配置(以R1为例)
Router>enable
Router#conf t
Router(config)#hostname R1 
R1(config)#no ip domain lookup
R1(config)#line console 0
R1(config-line)#logging syn
R1(config-line)#no exec-t

2、IP地址的配置
中心路由器:
R1:
R1(config)#interface s0/0
R1(config-if)#ip address 12.12.12.1 255.255.255.0
R1(config-if)#no shut
R1(config-if)#interface s0/1
R1(config-if)#ip address 13.13.13.1 255.255.255.0
R1(config-if)#no shut
R1(config-if)#interface s0/2
R1(config-if)#ip address 14.14.14.1 255.255.255.0
R1(config-if)#no shut

末节路由器:
R2:
R2(config)#interface s0/0
R2(config-if)#ip address 12.12.12.2 255.255.255.0
R2(config-if)#no shut
R2(config-if)#interface lo1
R2(config-if)#ip address 2.2.2.2 255.255.255.0
R3:
R3(config-line)#interface s0/0
R3(config-if)#ip address 13.13.13.3 255.255.255.0
R3(config-if)#no shut
R3(config)#interface lo1
R3(config-if)#ip address 3.3.3.3 255.255.255.0
R4:
R4(config)#interface s0/0 
R4(config-if)#ip address 14.14.14.4 255.255.255.0
R4(config-if)#no shut
R4(config-if)#interface lo1
R4(config-if)#ip address 4.4.4.4 255.255.255.0

第二步:配置ODR
1、ODR的配置很简单,只需要在中心路由器上启用ODR就可以了,末节路由器上除了基本配置配置不需要做任何配置!

2、具体配置
R1#conf t
R1(config)#router odr
R1(config-router)#

3、检查路由表(show ip route)
①在中心路由器R1上
     2.0.0.0/24 is subnetted, 1 subnets
o       2.2.2.0 [160/1] via 12.12.12.2, 00:00:35, Serial0/0
     3.0.0.0/24 is subnetted, 1 subnets
o       3.3.3.0 [160/1] via 13.13.13.3, 00:00:51, Serial0/1
     4.0.0.0/24 is subnetted, 1 subnets
o       4.4.4.0 [160/1] via 14.14.14.4, 00:00:28, Serial0/2
     12.0.0.0/24 is subnetted, 1 subnets
C       12.12.12.0 is directly connected, Serial0/0
     13.0.0.0/24 is subnetted, 1 subnets
C       13.13.13.0 is directly connected, Serial0/1
     14.0.0.0/24 is subnetted, 1 subnets
C       14.14.14.0 is directly connected, Serial0/2

②在末节路由器上
     2.0.0.0/24 is subnetted, 1 subnets
C       2.2.2.0 is directly connected, Loopback1
     12.0.0.0/24 is subnetted, 1 subnets
C       12.12.12.0 is directly connected, Serial0/0
o*   0.0.0.0/0 [160/1] via 12.12.12.1, 00:00:18, Serial0/0

�n────◆◇"
                    cp

 

你可能感兴趣的:(职场,休闲,Applechaning)