rip与ospf的重发布
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
R0
interface Loopback0
ip address 192.168.1.1 255.255.255.0 配置个环回地址
!
interface FastEthernet0/0
ip address 192.168.2.1 255.255.255.0
duplex auto
speed auto
!
router ospf 1 R1左边端口用ospf 1发布
redistribute rip metric 100 subnets 将rip引入到ospf中
network 192.168.2.2 0.0.0.0 area 0
!
router rip R1右边接口用rip2发布
version 2
redistribute ospf 1 metric 3 将ospf引入到rip中
network 192.168.3.0
no auto-summary
R2
interface Loopback0 配置个环回地址
ip address 192.168.4.1 255.255.255.0
!
interface FastEthernet0/0
no ip address
shutdown
duplex auto
speed auto
!
interface FastEthernet0/1
ip address 192.168.3.2 255.255.255.0
duplex auto
speed auto
!
router rip R2我们都用rip2发布
version 2
network 192.168.3.0
network 192.168.4.0
no auto-summary
RIP和OSPF相互重分发的问题
实验Top:(参考BSCI书里面的重分发章节里面的具体配置top稍微改变一点而来的自己的top)
问题所在:
1、自己做的实验,在进行重分发实验之前,为什么在R1的路由表中能够看到10.0.0.4/30(类似于Cisco官方PPT介绍的10.0.0.8/30的网段),而且它是通过RIP动态的学习到的路由条目呢?
2、在进行重分发之后,在R3上面,我自己做的实验是可以看到10.0.0.0/30这个网段被重分发进来,而Cisco的PPT上面却是没有显示这条路由条目的呢?
我真的不知道为什么会这样的?难道是我理解错了,还是自己看少了一些东西,IOS里面集成了的一些特性?对于上面的那两个问题,书上有个注意对官方PPT截图4的说明:“图中,路由器A没有看到子网10.0.0.8/30,而路由器C没有看到子网10.0.0.0/30,这些子网直接与路由器B项链,因此命令redistribute rip 或redistribute ospf 不会重分发它们。需要在路由器B上添加命令redistribute connected,才能使他重分发这些子网。”
就我个人所知道的IGP协议,也就是只有IS-IS是不重分发边界路由器的本区域直连网段,其他的动态路由协议都是会自动重分发边界路由器的直连网段。
下面是小弟的配置与截图同BSCI的PPT截图:
R1 configuration:
interface Loopback1
ip address 10.1.1.1 255.255.255.0
!
interface Loopback2
ip address 10.2.1.1 255.255.255.0
!
interface Loopback3
ip address 10.3.1.1 255.255.255.0
!
interface Serial0/1
description link to R2
ip address 10.0.0.1 255.255.255.252
serial restart-delay 0
clock rate 64000
!
router rip
version 2
network 10.0.0.0
no auto-summary
R2 configuration:
interface Serial0/1
description link to R1
ip address 10.0.0.2 255.255.255.252
serial restart-delay 0
!
interface Serial
0/2
description link to R3
ip address 10.0.0.5 255.255.255.252
serial restart-delay 0
clock rate 64000
!
router ospf 1
router-id 2.2.2.2
log-adjacency-changes
redistribute rip metric 200 subnets
network 10.0.0.4 0.0.0.3 area 0
!
router rip
version 2
redistribute ospf 1 metric 10
passive-interface Serial0/2
network 10.0.0.0
no auto-summary
R3 configuration:
interface Loopback1
ip address 10.8.1.3 255.255.255.0
ip ospf network point-to-point
!
interface Loopback2
ip address 10.9.1.3 255.255.255.0
ip ospf network point-to-point
!
interface Loopback3
ip address 10.10.1.3 255.255.255.0
ip ospf network point-to-point
!
interface Serial0/2
description link to R2
ip address 10.0.0.6 255.255.255.252
serial restart-delay 0
!
router ospf 1
router-id 3.3.3.3
log-adjacency-changes
network 10.0.0.0 0.255.255.255 area 0