R4(config)#ip route 0.0.0.0 0.0.0.0 192.168.20.2
.
R1(config)#ip route 192.168.10.0 255.255.255.0 192.168.20.1
R1(config)#router ospf 1
R1(config-router)#router-id 1.1.1.1
R1(config-router)#net 1.1.1.1 0.0.0.0 area 1
R1(config-router)#net 192.168.30.0 0.0.0.255 area 1
R1(config-router)#redistribute static subnets--------------静态路由重分发
R1(config-router)#redistribute connected subnets-----------直联网段重分发
.
R2(config)#ip route 0.0.0.0 0.0.0.0 12.0.0.1
R2(config)#router ospf 1
R2(config-router)#router-id 2.2.2.2
R2(config-router)#net 2.2.2.2 0.0.0.0 area 0
R2(config-router)#net 192.168.30.0 0.0.0.255 area 1
R2(config-router)#net 192.168.40.0 0.0.0.255 area 0
R2(config-router)#net 192.168.50.0 0.0.0.255 area 0
R2(config-router)#default-information originate---------------默认路由重分发
.
R3(config)#ip route 0.0.0.0 0.0.0.0 12.0.0.2
.
R5(config)#router ospf 1
R5(config-router)#router-id 3.3.3.3
R5(config-router)#net 3.3.3.3 0.0.0.0 area 0
R5(config-router)#net 192.168.50.0 0.0.0.255 area 0
R5(config-router)#redistribute rip subnets---------------------RIP重分发
R5(config)#router rip
R5(config-router)#v 2
R5(config-router)#no auto-summary
R5(config-router)#net 192.168.60.0
R5(config-router)#redistribute ospf 1 metric 3---------------OSPF重分发
.
R6(config)#router rip
R6(config-router)#v 2
R6(config-router)#no au
R6(config-router)#net 192.168.60.0
R6(config-router)#net 192.168.70.0
原文地址:http://blog.51cto.com/13348945/2095357