R1

R1(config)# interface Serial0/0/0
R1(config-if)# ip address 192.168.12.1 255.255.255.252
R1(config)# interface Loopback0
R1(config-if)# ip address 209.165.200.225 255.255.255.252
R1(config)# interface Loopback1
R1(config-if)# ip address 192.168.1.1 255.255.255.0
R1(config)# interface Loopback2
R1(config-if)# ip address 192.168.2.1 255.255.255.0
R1(config)# hostname R1
R1(config)# no ip domain-name lookup
R1(config)# banner motd %Unauthorized access is prohibited%
R1(config)# enable password class
R1(config)# line c 0
R1(config-line)# password cisco
R1(config-line)# login
R1(config-line)# logg s
R1(config-line)# line vty 0 15
R1(config-line)# password cisco
R1(config-line)# login
R1(config)# ip route 0.0.0.0 0.0.0.0 lo0
R1(config)# router ospf 1
R1(config-router)# router-id 1.1.1.1
R1(config-router)# network 192.168.1.0 0.0.0.255 area 1
R1(config-router)# network 192.168.2.0 0.0.0.255 area 1
R1(config-router)# network 192.168.12.0 0.0.0.3 area 0
R1(config-router)# passive-interface lo0
R1(config-router)# passive-interface lo1
R1(config-router)# passive-interface lo2
R1(config-router)# default-information originate
R1(config)# int s0/0/0
R1(config-if)# ip ospf authentication message-digest
R1(config-if)# ip ospf message-digest-key 1 md5 Cisco123
R1(config-router)#area 1 range 192.168.0.0 255.255.252.0

R2

R2(config)# interface Serial0/0/0
R2(config-if)# ip address 192.168.12.2 255.255.255.252
R2(config-if)# interface Serial0/0/1
R2(config-if)# ip address 192.168.23.1 255.255.255.252
R2(config-if)# interface Loopback6
R2(config-if)# ip address 192.168.6.1 255.255.255.0
R2(config)# hostname R2
R2(config)# no ip domain-name lookup
R2(config)# banner motd %Unauthorized access is prohibited%
R2(config)# enable password class
R2(config)# line c 0
R2(config-line)# password cisco
R2(config-line)# login
R2(config-line)# logg s
R2(config-line)# line vty 0 15
R2(config-line)# password cisco
R2(config-line)# login
R2(config)# router ospf 1
R2(config-router)# router-id 2.2.2.2
R2(config-router)# network 192.168.12.0 0.0.0.3 area 0
R2(config-router)# network 192.168.6.0 0.0.0.255 area 3
R2(config-router)# network 192.168.23.0 0.0.0.3 area 3
R2(config)# int s0/0/0
R2(config-if)# ip ospf authentication message-digest
R2(config-if)# ip ospf message-digest-key 1 md5 Cisco123
R2(config-if)# int s0/0/1
R2(config-if)# ip ospf authentication message-digest
R2(config-if)# ip ospf message-digest-key 1 md5 Cisco123
R2(config)#router ospf 1
R2(config-router)#area 3 range 192.168.4.0 255.255.254.0

R3

R3(config)#interface Serial0/0/1
R3(config-if)# ip address 192.168.23.2 255.255.255.252
R3(config-if)# interface Loopback4
R3(config-if)# ip address 192.168.4.1 255.255.255.0
R3(config-if)# interface Loopback5
R3(config-if)# ip address 192.168.5.1 255.255.255.0
R3(config)# hostname R3
R3(config)# no ip domain-name lookup
R3(config)# banner motd %Unauthorized access is prohibited%
R3(config)# enable password class
R3(config)# line c 0
R3(config-line)# password cisco
R3(config-line)# login
R3(config-line)# logg s
R3(config-line)# line vty 0 15
R3(config-line)# password cisco
R3(config-line)# login
R3(config)# router ospf 1
R3(config-router)# router-id 3.3.3.3
R3(config-router)# network 192.168.6.0 0.0.0.255 area 3
R3(config-router)# no network 192.168.6.0 0.0.0.255 area 3
R3(config-router)# network 192.168.4.0 0.0.0.255 area 3
R3(config-router)# network 192.168.5.0 0.0.0.255 area 3
R3(config-router)# network 192.168.23.2 0.0.0.3 area 3
R3(config-router)# passive-interface lo4
R3(config-router)# passive-interface lo5
R3(config-router)#int s0/0/1
R3(config-if)#ip ospf authentication message-digest
R3(config-if)#ip ospf message-digest-key 1 md5 Cisco123

Troubleshooting

Verify that OSPF adjacencies have been established between routers.

show ip ospf neighbor
#  CCNA3  Networking