lab14:RIP与OSPF重分发

2010-11-03_101451 

需求:RIP和OSPF之间在R2上作双向重发布,能够相互学习到对方的路由。

配置:

router ospf 1
router-id 2.2.2.2
log-adjacency-changes
 redistribute rip subnets
network 2.2.2.2 0.0.0.0 area 0
network 12.1.1.2 0.0.0.0 area 0
router rip
version 2
 redistribute ospf 1 metric 1
network 23.0.0.0
no auto-summary

验证:

R1

Gateway of last resort is not set

     1.0.0.0/24 is subnetted, 1 subnets
C       1.1.1.0 is directly connected, Loopback0
     2.0.0.0/32 is subnetted, 1 subnets
O       2.2.2.2 [110/65] via 12.1.1.2, 00:03:32, Serial1/0
     3.0.0.0/24 is subnetted, 1 subnets
O E2    3.3.3.0 [110/20] via 12.1.1.2, 00:00:23, Serial1/0
     23.0.0.0/24 is subnetted, 1 subnets
O E2    23.1.1.0 [110/20] via 12.1.1.2, 00:00:52, Serial1/0
     12.0.0.0/24 is subnetted, 1 subnets
C       12.1.1.0 is directly connected, Serial1/0

R3#show ip route

Gateway of last resort is not set

     1.0.0.0/32 is subnetted, 1 subnets
R       1.1.1.1 [120/1] via 23.1.1.1, 00:00:24, Serial1/0
     2.0.0.0/24 is subnetted, 1 subnets
R       2.2.2.0 [120/1] via 23.1.1.1, 00:00:24, Serial1/0
     3.0.0.0/24 is subnetted, 1 subnets
C       3.3.3.0 is directly connected, Loopback0
     23.0.0.0/24 is subnetted, 1 subnets
C       23.1.1.0 is directly connected, Serial1/0
     12.0.0.0/24 is subnetted, 1 subnets
R       12.1.1.0 [120/1] via 23.1.1.1, 00:00:24, Serial1/0

思考与总结:

1.redistribute rip subnets,将RIP网络路由重分发到OSPF网络中,subnets命令可以确保RIP网络中的无类子网路由能够正确的被发布。

2.其他路由协议重分发到OSPF协议中时,默认度量值为20(BGP除外,他的度量值是1),ospf的度量值为成本。


你可能感兴趣的:(职场,休闲,rip,分发,ospf)