通過以下思路實現R1 ping 通 R5
R5(config-if)#router ospf 110
R5(config-router)#router-id 5.5.5.5
R5(config-router)#network 202.106.45.0 0.0.0.255 area 2
R5(config-router)#network 5.5.5.5 0.0.0.0 area 2
R2#show ip ospf neighbor(查看ospf的狀態)
Neighbor ID? ? Pri? State? ? ? ? ? Dead Time? Address? ? ? ? Interface
1.1.1.1? ? ? ? ? 1? FULL/BDR? ? ? ? 00:00:37? ? 202.106.12.1? ? FastEthernet0/0
R6上配置rip協議命令如下:
R6(config)#router rip
R6(config-router)#no auto-summary(關閉自動匯總)
R6(config-router)#network 11.0.0.0
R6(config-router)#network 11.11.11.0
R1上還需要運行RIP協議
R1(config)#router rip
R1(config-router)#ver 2
R1(config-router)#no auto-summary
R1(config-router)#network? 11.0.0.0
R1#show ip route rip(查看rip協議)
11.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
R? ? ? 11.11.11.11/32 [120/1] via 11.0.0.1, 00:00:12, FastEthernet0/0
R1上一個屬于ospf域,一個屬于rip域,將R1上的rip域引入ospf域,R2和R5還需要學R6上的rip
將R1上的rip引入ospf域
R1(config-router)#redistribute rip ?
metric? ? ? Metric for redistributed routes
metric-type? OSPF/IS-IS exterior metric type for redistributed routes
route-map? ? Route map reference
subnets (子網) ? ? Consider subnets for redistribution into OSPF
tag? ? ? ? ? Set tag for routes redistributed into OSPF
R1(config-router)#redistribute rip subnets(引入子網)
R2#show ip route
O E2? ? 11.11.11.11/32 [110/20] via 202.106.12.1, 00:00:18, FastEthernet0/0
R1#show ip ospf database ?(6種LSA如下)
adv-router? ? ? ? Advertising Router link states
asbr-summary? ? ? ASBR summary link states
database-summary? Summary of database
external? ? ? ? ? External link states
network? ? ? ? ? Network link states
nssa-external? ? NSSA External link states
opaque-area? ? ? Opaque Area link states
opaque-as? ? ? ? Opaque AS link states
opaque-link? ? ? Opaque Link-Local link states
router? ? ? ? ? ? Router link states
self-originate? ? Self-originated link states
summary? ? ? ? ? Network summary link states
|? ? ? ? ? ? ? ? Output modifiers