路由器1:
Router(config)#router ospf 100
Router(config-router)#network 192.168.12.0 0.0.0.255 area 0
路由器2:
Router(config-router)#router ospf 101
Router(config-router)#network 192.168.12.0 0.0.0.255 area 0
Router(config-router)#network 192.168.23.0 0.0.0.255 area 0
路由器3:
Router(config)#router ospf 102
Router(config-router)#network 192.168.23.0 0.0.0.255 area 0
Router(config-router)#network 192.168.34.0 0.0.0.255 area 0
路由器4:
Router(config)#router ospf 103
Router(config-router)#network 192.168.34.0 0.0.0.255 area 0