R1(config-router)#router ospf 1
R1(config-router)#redistribute rip metric subnets (其他协议分布到ospf中默认为subnets 但像ospf的直连路由和静态路由就不是这样了,必须看清需求)
R1(config-router)#router rip
R1(config-router)#redistribute ospf x metric xx (x表示进程号 xx表示种子度量值 )
因为在R1上运行多协议,所以充分布必须在R1上作,同时lz你也配错了
R1上你配置的net 192.168.20.0 0.0.0.255 area 0是错的 这是把这条路由宣称到ospf中,但其实这是rip的路由
R1(config-router)#router ospf 1
R1(config-router)#redistribute rip metric 100 subnets
R1(config-router)#router rip
R1(config-router)#redistribute ospf 1 metric 3
R1: en
config t
int lo 0
ip address 10.1.1.1 255.255.255.0
no shutdown
exit
int f0/0
ip address 192.168.10.1 255.255.255.0
no shutdown
exit
int f0/1
ip address 192.168.20.1 255.255.255.0
no shutdown
exit
router ospf 100
net 10.1.1.0 0.0.0.255 area 0
net 192.168.10.0 0.0.0.255 area 0
redistribute rip subnets
exit
router rip
version 2
no auto-summary
net 192.168.20.0 0.0.0.255
net 10.1.1.0 0.0.0.255
redistribute ospf 100
end
R0:
router rip
version 2
no auto-summary
net 30.1.1.0
net 192.168.20.0