R1#configure terminal
R1(config)#interface serial 3/0
R1(config-if)#ip address 192.168.0.1 255.255.255.252
R1(config-if)#no shutdown
R1(config-if)#exit
R1(config)#interface serial 3/1
R1(config-if)#ip address 192.168.2.1 255.255.255.252
R1(config-if)#no shutdown
R1(config-if)#do wr mem
R2#configure terminal
R2(config)#interface serial 3/0
R2(config-if)#ip address 192.168.0.2 255.255.255.252
R2(config-if)#no shutdown
R2(config-if)#exit
R2(config)#interface serial 3/1
R2(config-if)#ip address 192.168.1.1 255.255.255.252
R2(config-if)#no shutdown
R2(config-if)#do wr mem
R3#configure terminal
R3(config)#interface serial 3/1
R3(config-if)#ip address 192.168.2.2 255.255.255.252
R3(config-if)#no shutdown
R3(config-if)#exit
R3(config)#interface serial 3/2
R3(config-if)#ip address 192.168.3.1 255.255.255.252
R3(config-if)#no shutdown changed state to up
R3(config-if)#do wr mem
R4#configure terminal
R4(config)#interface serial 3/1
R4(config-if)#ip address 192.168.1.2 255.255.255.252
R4(config-if)#no shutdown
R4(config-if)#do wr mem
R5#configure terminal
R5(config)#interface serial 3/2
R5(config-if)#ip address 192.168.3.2 255.255.255.252
R5(config-if)#no shutdown
R5(config-if)#do wr mem
R1(config)#router ospf 1
R1(config-router)#network 192.168.0.0 0.0.0.3 area 0
R1(config-router)#network 192.168.2.0 0.0.0.3 area 0
R2(config)#router ospf 1
R2(config-router)#network 192.168.0.0 0.0.0.3 area 0
R2(config-router)#network 192.168.1.0 0.0.0.3 area 1
R3(config)#router ospf 1
R3(config-router)#network 192.168.2.0 0.0.0.3 area 0
R3(config-router)#network 192.168.3.0 0.0.0.3 area 2
R4(config)#router ospf 1
R4(config-router)#network 192.168.1.0 0.0.0.3 area 1
R5(config)#router ospf 1
R5(config-router)#network 192.168.3.0 0.0.0.3 area 2
R1#show ip ospf neighbor
Neighbor ID Pri State Dead Time Address Interface
192.168.3.1 0 FULL/ - 00:00:39 192.168.2.2 Serial3/1
192.168.1.1 0 FULL/ - 00:00:33 192.168.0.2 Serial3/0
R2#show ip ospf neighbor
Neighbor ID Pri State Dead Time Address Interface
192.168.2.1 0 FULL/ - 00:00:39 192.168.0.1 Serial3/0
192.168.1.2 0 FULL/ - 00:00:37 192.168.1.2 Serial3/1
/R3#show ip ospf neighbor
Neighbor ID Pri State Dead Time Address Interface
192.168.2.1 0 FULL/ - 00:00:33 192.168.2.1 Serial3/1
192.168.3.2 0 FULL/ - 00:00:38 192.168.3.2 Serial3/2
R1#show ip route ospf
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
+ - replicated route, % - next hop override
Gateway of last resort is not set
192.168.1.0/30 is subnetted, 1 subnets
O IA 192.168.1.0 [110/128] via 192.168.0.2, 00:07:53, Serial3/0
192.168.3.0/30 is subnetted, 1 subnets
O IA 192.168.3.0 [110/128] via 192.168.2.2, 00:06:32, Serial3/1
R4#ping 192.168.0.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.0.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 4/21/44 ms
R4#ping 192.168.2.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.2.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 8/27/48 ms
R4#ping 192.168.3.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.3.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 52/66/96 ms
R4#