RIP到OSPF的无缝切换_第1张图片
实验名称:RIPOSPF的无缝切换
 
实验人:王学光
        QQ451648253 E-maill[email protected]
实验环境:DynamipsGUI 2.8c3640-is-mz.124-10
 
实验要求:1.在各设备上配置相应的IP地址及RIP路由协议;在R1上做ping测试。
          2.在路由器R1Lo0上长ping 路由器R4Lo0,在不断网的前提下在R2R3R4上配置辅助地址并用OSPF宣告,再把R3R4的辅助地址及RIP删掉(R2只删掉辅助地址)。
 
实验步骤:
 
Step 1 :配置各设备的IP并启RIP路由协议
 
1 、配置路由器R1
    Router>enable
    Router#configure terminal
    Router(config)#hostname R1
    R1(config)#interface fastethernet 0/0
    R1(config-if)#no shutdown
    R1(config-if)#ip address 192.168.10.1 255.255.255.0
    R1(config-if)#exit
    R1(config)#interface lookback 0
    R1(config-if)#ip address 1.1.1.1 255.255.255.0
    R1(config-if)#exit
    R1(config)#router rip
    R1(config-router)#version 2
    R1(config-router)#no auto-summary
    R1(config-router)#net 192.168.10.0
    R1(config-router)#net 1.0.0.0
    R1(config-router)#exit
    R1(config)#
注:R2R3R4的配置方法与R1配置方法类似
 
2 、在R1上做ping测试
R1#ping 2.2.2.2 source 1.1.1.1
 
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 2.2.2.2, timeout is 2 seconds:
Packet sent with a source address of 1.1.1.1
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 20/43/84 ms
 
Step 2 :配置辅助地址及启动OSPF路由协议
 
1、      R2R3R4上配置辅助地址
R3(config)#interface fastethernet 0/0
R3(config-if)#ip address 172.16.1.2 255.255.255.0 secondary
R3(config-if)#interface fastethernet 0/0
R3(config-if)#ip address 172.16.2.1 255.255.255.0 secondary
R3(config-if)#exit
R3(config)#
注:R2R4配置与R3配置方法类似
 
2、      R2R3R4ospf路由协议
   
R3(config)#router ospf 10
R3(config-router)#net 192.168.20.0 0.0.0.255 area 1
R3(config-router)#net 172.16.1.0 0.0.0.255 area 1
R3(config-router)#net 192.168.30.0 0.0.0.255 area 0
R3(config-router)#net 172.16.2.0 0.0.0.255 area 0
R3(config-router)#exit
R3(config)#
注:R2R4配置方法与R3配制方法类似
 
3、      R2做路由重分发
R2(config)#router ospf 10
R2(config-router)# redistribute rip metric 10
R2(config-router)#exit
R2(config)#
 
4 、在R1上加一条默认路由并长ping路由器R4上的Lo02.2.2.2
R1(config)#ip route 0.0.0.0 0.0.0.0 192.168.10.2
 
R1#ping                      
Protocol [ip]:
Target IP address: 2.2.2.2
Repeat count [5]: 10000
Datagram size [100]:
Timeout in seconds [2]:
Extended commands [n]:
Sweep range of sizes [n]:
Type escape sequence to abort.
Sending 10000, 100-byte ICMP Echos to 2.2.2.2, timeout is 2 seconds:
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
4、      R3R4上删掉RIP路由协议及辅助地址(R2只删除辅助地址)
R3(config)#no router rip
R3(config)#interface fastethernet 1/0
R3(config-if)#no ip address 172.16.1.2 255.255.255.0
R3(config-if)#interface fastethernet 0/0
R3(config-if)#no ip address 172.16.2.1 255.255.255.0
R3(config-if)#exit
R3(config)#
 
说明:在R3R4R2(只删辅助地址)上删掉RIP和辅助地址后,看路由器R1ping是否中断过,如果中断说明配制方法有误;如果无中断,测试验成功。
 
注:在实验中值得注意的是在R2上做路由重分发时,一定是把RIP介绍给OSPF,否则实验将做不成功。