#Add the loopback IP address and take it as the ID of the OSPF router.
interface Loopback2
ip address 2.2.2.2 255.255.255.0
#Configuring OSPF route protocol
router ospf 1
network 192.168.12.0 0.0.0.255 area 0
network 192.168.23.0 0.0.0.255 area 23
area 23 virtual-link 3.3.3.3
Configuration of device C:
#Configuring Ethernet interface
interface FastEthernet0/0
ip address 192.168.34.3 255.255.255.0
#Configure the WAN port
interface Serial1/0
ip address 192.168.23.3 255.255.255.0
#Add the loopback IP address and take it as the ID of the OSPF router.
interface Loopback2
ip address 3.3.3.3 255.255.255.0
#Configuring OSPF route protocol
router ospf 1
network 192.168.23.0 0.0.0.255 area 23
network 192.168.34.0 0.0.0.255 area 34
area 23 virtual-link 2.2.2.2
Configuration of device D:
#Configuring Ethernet interface
interface FastEthernet0/0
ip address 192.168.34.4 255.255.255.0
#Configuring OSPF route protocol
router ospf 1
network 192.168.34.0 0.0.0.255 area 34
The route generated in the device D by the ospf is shown as follows:
O IA 192.168.12.0/24 [110/66] via 192.168.34.3, 00:00:10, FastEthernet0/0
O IA 192.168.23.0/24 [110/65] via 192.168.34.3, 00:00:25, FastEthernet0/0